Move / migrate an user (his data)

Hi,
is it possible to move one user from one NC to another? I am not talking about migrate the whole server - just one user and his data (f.e. via SCP).

Thanks for any hint!

Hi @walhalla

Did you try this app?

Sebastian

Hi and thanks,
yes i have seen - but I didn’t try because there are 30 GB of userdata. Don’t think that upload will be possible :wink:

By the way: just the files would be enough. Calendar, Profile, etc. is not necessary.

Thanks

Walter

Well you could try,

https://docs.nextcloud.com/server/24/user_manual/en/files/federated_cloud_sharing.html

Or if you have console access to one of the systems, you could do a download/upload to the other.

Something like this,

Sebastian

Hi, yes, I have console access on both servers. But at the end of the bill: it is impossible to copy all files /directories) anyhow 1:1 (by SCP) from A to B? Yes, same user will be created before on other system? And afterwords do a files:scan (rescan) on the other system?

Federation is no solution (after transfer the user has to be removed from old system).

Thanks again! :wink:

Just on file to upload. Didnt see the option to upload complete directories (something like -R). And doing this with thousands of files (don’t know how many files - but >30 GB … :frowning:

@walhalla you can zip the directory, then unzip it on the destination end.

1 Like

If you have console access, just rsync or ftp everything over. That will copy and conserve the folder structure. Then run ./occ files:scan command.

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#file-operations

1 Like

Hi,
ist es moeglich, nur einen User, bzw. seine Daten von einer NC in eine andere zu verschieben? Also nicht den ganzen Server migrieren, sondern nur einen User. Z.B. seine Daten via SCP von “links nach rechtes” verschieben und er hat sie dann dort. Nein, ich habs nicht einfach probiert, weil ich auf dem Ziel keine Ueberraschungen / Probleme erleben wollte :wink:

Danke fuer Hilfe / Tipp

Es gibt unterschiedliche Möglichkeiten. Erst mal gibt es sogar eine App User migration, die dann aber auf beiden Servern installiert sein muss. Wenn es nur um Dateien geht, dann kann der Admin natürlich auch die Strukturen auf einen leeren Account kopieren und mit sudo -u www-data php occ files:scan --all diese der neuen Nextcloud bekannt machen.

Natürlich kann der Benutzer sich auch selbst kümmern. Am einfachsten (für den Admin) ist es wohl, wenn auf dem neuen Server ein neuer, leerer Account angelegt wird und der Anwender sich selbst um die Migration der Daten kümmert. Das geht recht unzuverlässig mit Federation direkt zwischen den Nextcloud-Servern siehe hier. Zuverlässiger aber mit dem Umweg über den Client geht es wohl am besten mit einem Nextcloud Client. Es gab dazu auch mal ein gutes Video auf Youtube. Hierzu muss der Anwender dann aber alle Daten auf seinen Client synchronisieren und zum neuen Server zurück synchronisieren und darf dabei einige Fehler nicht machen. Ab er ein Backup wirst du ja wohl haben.

2 Likes

moved separate German topic into this thread - please don’t double post

Sorry. But writing in german → not everybody who has an answer would understand because not everybody speaks german. And vice versa - not everybody speaks english. Therefor I asked the german speaking members and the english speaking. So, for me it was no double post. One for german speaking and one for english speaking. :innocent:

1 Like

@ all: THANK YOU for your help / confirmation! This way (copy via SCP / rsync and rescan) was my idea, my preferred way to solve the problem. Just didn’t want to to try and maybe destroy or get unwanted problems on the other machine. Thanks a lot!

@ alle: VIELEN DANK fuer hilfe und bestaetigung! Der Weg via SCP / rsync und rescan war meine spontane Idee, die bevorzugte Loesung. Wollte es aber nicht einfach ausprobieren und dann irgendwas zerschiessen oder unvorhergesehene Probleme auf der anderen Maschine haben. Vielen Dank!

(P.S.: hoffe, dass das nun nicht als double post gewertet wird - wollte mich nur bei beiden Gruppen bedanken, den englisch und den deutsch sprechenden :)))))))))

3 Likes