Lost links during server transfer

Hello,
I had to change my nextcloud from old server to a new server.

I made a backup of the database, which I re-imported to the new server, and an rsync to the cloud folder.

Everything went well, except that all the sharing links were reset. Files are no longer even noted as shared. Why is this? How can I restore them? I have a lot of links going around, it’s a huge job to regenerate everything and get the information out.

I have always access on the old server (but he is in at the end of his life), so I can “import” this old link, but I don’t know where they are (bdd ? file ? other ? and why it is not tranfered ?)…

Question:

With database restore are only the links or also users gone? If yes i think the databse import got wrong.

https://docs.nextcloud.com/server/20/admin_manual/maintenance/backup.html

https://docs.nextcloud.com/server/20/admin_manual/maintenance/restore.html

User are restored well, like their right on files. Everything seems to work, except this share links.

I find where are shared links in database : in oc_share. And I see all sharing, like this :

(31, 3, NULL, NULL, 'user1', 'user1', NULL, 'file', '2263', NULL, 2263, '/Partages/FINAL3.pdf', 1, 1586670587, 0, NULL, 'G2wfWQ6wMq8BnE6', 0, NULL, 0, NULL, 0, ''),

But the link “https://domain.com/s/G2wfWQ6wMq8BnE6” give me the web page “file not find”.

What is wrong this this sort of line ?