How can I restore a backup to a specific location?

Hi,
I’m planning on migrating my nextcloud/ncp instance to some new hardware.
I tried “restoring” my latest backup archive (from my old server) on my new PC.
However, it didn’t work.
On my old PC, my datadir is on an external HDD, that’s mounted in /media/nc_ext_hdd/good_ncdata.
On my new PC, after the initial configuration I moved my datadir (which was basically empty) to another external hdd mounted at /media/BACKUP/ncdata.

The problem is that the restoration script tries to restore the backup in the in the same path that it created the backup from, in this case /media/nc_ext_hdd/good_ncdata. But my new server doesn’t have this path. The new path is /media/BACKUP/ncdata.

Is there any way to specify the restoration destination path?
Or do I have to manually rename the mount point/path of my new external HDD?

Thanks!

No there is not. you have to either:

  • manually change the path to data in the config after the restore
    or
  • create an identical path before restoring.
1 Like

I ended up changing the names of the mount points so they coincide on both machines.