Migrating users and merging instances

Nextcloud version 20.0.1
Operating system and version Ubuntu 20.04
Apache or nginx version Apache 2.4.41
PHP version 7.4.3

The issue you are facing: I’d like to selectively migrate a couple of users to a separate instance of nextcloud.

There are plenty of topics I’ve been able to search for that include instructions like exporting the full DB and then importing it in the new instance while copying files across, but this is not what I want. I have two instances, each with their own set of users and I want to merge them, I do not want to drop users from either instance. Is this possible?

Thanks in advance.

1 Like

First problem is the fact that the old shares and other stuff not work anymore for the migrated users.

I think i would add the users to the leading nextcloud and then every user can migrate his/her data with Federation . And then the users must add all shares, … again. Fedaration Documenation

After the migration you can give your leading nextcloud additional the name of the old nextcloud. Perhaps some user like the old name more than the new name :wink:

1 Like

are you talking just about files or is it more like calendars, notes, etc?

If this is just files I think

  • create user on new instance
  • copy the files from old user directory to the new one
  • rescan user directory with occ

… and repeat for each user to transfer. could do the job. shares are gone as @devnull stated already.

If there are applications/data which heavily use DB like calendar I think you have more or less no easy way to go. then you have to check each application to migrate which DB tables it is using and how to merge them into new instance…

1 Like

same when encrypted ?