I would like to make a back up of my nextcloud on the raspberry-pi. Nc is running on the docker, the data is stored on an external USB device. I was thinking to do an image back up with commit from the docker, and separately a backup from the usb stick where the nc data is stored. Or is there a better method?
I don’t have much knowledge of Docker but I’ve heard comments that both the commands and the file structure are similar.
In this case I recommend that you take a look at these scripts
If you don’t want to download the entire repository, all you need is the setup.sh script, then you can download it and change the commands to match Docker or, if you’re interested, you can run this script within the nextcloud container itself.
As I said, my nextcloud installation is based on Nginx + php8.2-fpm + Mariadb and I’m not an expert in docker
Just one more observation when running the setup.sh script it will already download the backup.sh and restore.sh scripts and schedule it in cron and if you want to run it manually the files will be in /root/Scripts