3-way-sync: how to move from one server to the other, or: how does nextcloud handle its files?

Hi there,

I am essentially attempting a 3-way:

I have a nextcloud on a managed server, want to move it to a new server at managed nextcloud hosting.

Now, If I get the clients to transfer everything, it will probably take some hours.

So i thought of a three way:

the synology cloud station reads the nextcloud on our server.

then, i change cloud sync settings and sync the whole data from the synology to the new hosting

when I start up the clients - everything should be there - or should it?

because in trying this i wonder if the process will apply a new “changed at” date on all the files and therefor force the whole system to sync again after all.

what do you think?

Nextcloud is creating a unique file number on upload. If you are on a different setup, you get new unique ids, even if the change date and checksum are the same. And the client can’t detect if the files are identical (based on name, size and checksum). Only way is to really migrate the setup with the database and everything. If your new provider does managed Nextcloud hosting, they should be able to do that?

1 Like

You have to move 3 things: DB, data folder, and optionally NC folder with config and installed Apps.

  1. Enable maintenance mode on Server A.
  2. Do DB Backup on Server B.
  3. Copy nextcloud folder with config and data to Server B.
  4. Restore DB from Server A to Server B.
  5. Start services (Apache, php etc.) on Server B.
  6. Optionally change DNS from Server A to Server B.
    Now your clients will even do not noticed that you are moved to Server B.

I ´ve done some testing.

Interestingly enough, when i will just point the NC client on the mac to the new cloud, it will upload the files and keep the modification date of files, but not of folders

When I upload via synology DS web-dav-cloud system, it will not keep the files modfication dates at all.

However, uploading with the mac NC client seems to be a looooooot slower then Synology from the same connection.

Somewhat of a newbie question: wondering if step #2 oughta be “Do DB backup on Server A”

I suppose this will help you: https://docs.nextcloud.com/server/15/admin_manual/maintenance/backup.html