I would like to switch from my bare metal install to All-in-One instead. This is on the same server (Ubuntu 24.04.03 LTS). I have read this guide: all-in-one/migration.md at main · nextcloud/all-in-one · GitHub
I’m completely lost on how to navigate from step #5 and #6. It seems to be written for a reader who wants to move the data to a new location. But what if I don’t want to move it?
- Restore the datadirectory of your former instance: for
/path/to/old/nextcloud/data/runsudo docker cp --follow-link /path/to/old/nextcloud/data/. nextcloud-aio-nextcloud:/mnt/ncdata/Note: the/.and/at the end are necessary.- Next, run
sudo docker run --rm --volume nextcloud_aio_nextcloud_data:/mnt/ncdata:rw alpine chown -R 33:0 /mnt/ncdata/andsudo docker run --rm --volume nextcloud_aio_nextcloud_data:/mnt/ncdata:rw alpine chmod -R 750 /mnt/ncdata/to apply the correct permissions. (Or ifNEXTCLOUD_DATADIRwas provided, applychown -R 33:0andchmod -R 750to the chosen path.)
If my data directory is: /mnt/4TB01/Nextcloud/data, is there any way I can just re-use this as-is?
Step 8 sounds hopeful:
- 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 --allin order to scan all files in the datadirectory.
I guess I’m hoping for something even simpler than the supposed simplest migration option which is “migrate the files only”. As in, just point AIO at the existing data directory.
Am I way out in space in here? Any guidance will be appreciated. I did scour the internet and these forums but I seem to be on a special newbie island.
PS. I’d gladly take tips for whether to run docker compose as a systemd unit/service, that runs as a lesser user than root (e.g., in the Unit file: user=nextcloud and group=nextcloud. I’m struggling to determine if this is what running containers “rootless” means.