I am trying to implement an automatic remote backup strategy of the Nextcloud data. For other systems I just use
rsync to sync relevant content via SSH onto the backup destination. However, the Nextbox setup does not make this too easy.
Since Nextcloud is set up in a Docker environment, with the data directory in a Docker volume, the physical place of the relevant data is at
/srv/docker/volumes/nextbox-compose_nextcloud/_data/data. The files and directories in there are owned by
www-data:www-data, so the default user account
nextuser is not able to read these files per default.
nextuser to the
www-data group will not help, because the directories above the actual Nextcloud data belong to
root since this is all managed by Docker. So I would have to give
nextuser permissions to read root data, which really should not be the case from a security point of view.
Going back to what’s actually available, I mounted the home directories of all the Nextcloud users using the WebDAV protocol and
davfs2 on the remote machine and now I try to rsync from there to the actual backup directory. This turns out to be really very slow, because the Nextbox and the backup machine are not in a LAN but connected via Cable/DSL.
So I wonder whether there is something else here to do backups than just attaching another drive to the Nextbox via USB, something that works with a remote backup destination. Any ideas?