Manually moving one user to new server

I have an existing Next Cloud install that is used by multiple people. I made a new one based on docker. I would like to move one of the users from the older server to the new one.

I do not care about anything other then the files and file histories. This user account has not done much of anything through the web interface or used any other apps in Next Cloud.

I tried to use the User Migration app, but that does not work for me thorough the web interface or the command line. I have ask for help with that and tried every option I can think of but nothing makes it work. The only time I got it to complete successfully it failed to load.

I have given up on the User Migration app. That is why I am asking for ideas on how to move just one user manually.

A simple option would be to (1) make a new user, (2) copy over the files to the new users files directory, (3) use occ files:scan to update the users files.

But before I do that, is there a better way? Would that get the histories for the files?

Thanks for your help.

I can confirm that the above works. I used rsync to copy the files and used -a flag to keeps dates. I than ran occ files:scan on the user and all the files were there and I checked one that had two versions and they were both there. I did not have any deleted files so I could not check that.

The commands I ran where like:


sudo rsync -av /backup/nextcloud/data/ocdata/old-username/ /data/path/nextcloud/data/newuser/

docker exec --user www-data nextcloud-app-name php occ files:scan newuser

P.S. I highly recommend this method over the user migration tool. I spend many hours over the course of two to three weeks trying to get that tool to work and in the end it never did. The one export that I think was successful took about three days to run (‘I think’ because I never got it imported), but this was done with both the copy and scan in less than an hour.

I hope this helps someone.

Thanks