Reuse database as is for server migration

Hey guys,

Hope you can clear this out; I’m moving Nextcloud to another server, I already copied the files to the new server, Nextcloud is in maintenance mode.

I’m using an external database server and since no changes will be made I’m wondering if is it really necessary to backup and restore the database. Absolutely everything will be kept as it is, the only change I can think of is the hostname of the server, previously the hostname differed from Nextcloud’s domain name, now they will match. The new server is named after Nextcloud’s existing domain name. Even the OS is the same.

Can I just go to the new server and take it out of maintenance and be done with it?

Thanks a million. :smiley:


I would say, as long as you changed the Nextcloud config accordingly, So that Nextcloud knows the new database, it should be no problem. Make sure the database is reachable from the new NC server.

Anyway, a backup is never a bad idea :wink:

Other opinions still welcome.

1 Like

You can do that, but the new server needs to have the same version or a higher one than the previous server.

If you use a higher version of the nextcloud-server on your new server you need to update the database. I think the command was

sudo -u www-data php occ db:convert-type

1 Like