I am using NextCloudPi to run my NextCloud.
I would like to use rsync to create snaphots of my NextCloud data directory (nc-data) onto an ext4 formatted HDD. I have successfully used this incremental, snapshot-style rsync backup system with my personal laptop home directory and have restored my data onto my laptop a number of times when upgrading my system or buying a new machine.
Would the following steps be enough to successfully restore my nc-data into a new installation of NextCloudPi?
Starting with a new installation of NextCloudPi, with the data dir being set as /media/USBdrive/nc-data:
Import my saved NextCloudPi configuration:
nc-import-ncp
Restore my NextCloud configuration and database from a data-less backup:
nc-restore
Turn on maintenance mode while deleting and copying data files:
ncc maintenance:mode βon
Empty the nc-data directory which was just created in this new installation:
rm -r /media/USBdrive/nc-data/*
Copy and paste my nc-data-snapshot into the nc-data directory
cp -r /path/to/nc-data-snapshot/* /media/USBdrive/nc-data/
Make the Nextcloud instance aware of the restored data files:
nc-scan
Turn maintenance mode back off again:
ncc maintenance:mode -off