ekevu
June 20, 2022, 10:28am
1
I was wondering if I can use the new User Migration app from Nextcloud 24 to move Nextcloud to another server, especially from Snap to manual install.
I have multiple users in my instance, so I would simply run the user migration using the plugin every single time, which is okay.
The only thing I am not seeing is whether the information which file has been shared with whom is being included as well.
Is this something I can do?
1 Like
scsi44
November 3, 2023, 2:57pm
2
Iām also interested in an answer. Maybe there are other migration paths beside the user migration app? I would like to migrate an entire installation to a new server, on the new one I only have access to nextcloud (frontend & backend), no ssh.
I do not think, the app is meant for that, but for single user.
move to a new server is quite simple. copy datafolder to new install, export database and import to new server and you are more or less done.
instead of copy use rsync to preserve permissions and timestamps.
this might help you:
# How to migrate from an already existing Nextcloud installation to Nextcloud AIO?
There are basically three ways how to migrate from an already existing Nextcloud installation to Nextcloud AIO:
1. Migrate only the files which is the easiest way
1. Migrate the files and the database which is much more complicated (and doesn't work on former snap installations)
1. Use the user_migration app that allows to migrate some of the user's data from a former instance to a new instance but needs to be done manually for each user
## Migrate only the files
**Please note**: If you used groupfolders or encrypted your files before, you will need to restore the database, as well!
The procedure for migrating only the files works like this:
1. Take a backup of your former instance (especially from your datadirectory, see `'datadirectory'` in your `config.php`)
1. Install Nextcloud AIO on a new server/linux installation, enter your domain and wait until all containers are running
1. Recreate all users that were present on your former installation
1. Take a backup using Nextcloud AIO's built-in backup solution (so that you can easily restore to this state again) (Note: this will stop all containers and is expected: don't start the container again at this point!)
1. Restore the datadirectory of your former instance: for `/path/to/nextcloud/data/` run `sudo docker cp --follow-link /path/to/nextcloud/data/. nextcloud-aio-nextcloud:/mnt/ncdata/` Note: the `/.` and `/` at the end are necessary.
1. Next, run `sudo docker run --rm --volume nextcloud_aio_nextcloud_data:/mnt/ncdata:rw alpine chown -R 33:0 /mnt/ncdata/` and `sudo docker run --rm --volume nextcloud_aio_nextcloud_data:/mnt/ncdata:rw alpine chmod -R 750 /mnt/ncdata/` to apply the correct permissions. (Or if `NEXTCLOUD_DATADIR` was provided, apply `chown -R 33:0` and `chmod -R 750` to the chosen path.)
1. Start the containers again and wait until all containers are running
1. Run `sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan-app-data && sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ files:scan --all` in order to scan all files in the datadirectory.
This file has been truncated. show original