take your scripts - reworked them to use it with docker installation in the omv forums
so here is the link omv forum - Nextcloud Docker Backup with DB
i also crosslink this post there.
maybe you can need the improvement of getting some needed values from the config.php file
No, this a always a full backup/restore.
The data belonging to one user is scattered in the data dir and the database. That would be a whole lot of (manual) work.
Would you have some explanation on how to run the script when using openmediavault and docker/portainer to run the nextcloud instance? What does it change to your todo list?
the script has to be run in the same machine as the NC instance. So, my first guess would be to include it somehow in the docker container itself.
But there I don’t have any experience as I’m running my NC instances without Docker.
I think for smaler installation you can use “tar” within the script.
But what about with bigger installation?
Perhaps you can better use “rsync” with “–link-dest” for incremental backups.
Indeed, I’ll pack the output in a borg backup repository. This way, the deduplicating really works great and the backups remain pretty small (depends on how many files have changed between two backup runs).
I’m curious about this too, because when running Nextcloud in docker from Rancher if I stop the web server it kills the container. So I have not been stopping the web server when testing updates from 14 --> 15, and 15 --> 16.
I think you could backup and restore a single user without the information from the database, but you would have to php occ file:scan USERNAME after the restore to make sure the files showed up.
One new feature was added:
The scripts for backup/restore can now be initialized by a “setup script”. By running setup.sh, some information are gathered (user input) and all the other variables are obtained using OCC.
This way it should be much easier to install these scripts so that they fit to your Nextcloud installation.
However, you should never rely on the setup script. Always check the backup/restore scripts (line by line) before running these for the first time.
Amazing script! I only have one problem: I cant locate the web server name! Sorry if its a silly question but i m new to all of these. I have to add i ve installed nextcloud 19 through snap.
linux mint 19.3 xfce. I really don’t know which one, both “cant be found” through systemctl.
It does work with my snap installation since ive edited the script to point to the right directories.
Yes, the scripts are for a “standalone” installation of Nextcloud only. With Snap you have a ready to use package which is “all in one”. I don’t have any experience with Snap, but I guess that you have to back up the whole Snap package.
I think you cannot use these scripts for this task.
Linux Mint:
If linux mint, please do not use snap https://www.omgubuntu.co.uk/2020/06/enable-snap-apps-linux-mint-20
Please use Ubunut LTS or Debian (server) versions an not the desktop releases of mint.
Mint is not a good idea for a server service like nextcloud.
If you want to install nextcloud on your desktop:
Install Ubunutu LTS or Debian Buster on your desktop and not mint.