Incremental Backups of Nextcloud

Hi, I was searching how to implement a incremental backup of Nextcloud which is having a huge data folder.

So I was using an existing project (Nextcloud-Backup-Restore) and modified it to use rsync for incremental backups.

If you like you can give it a try:

Very nice I just don’t like that it stores password in the config file while it can easily retrieved from other config or occ command as you do in setup.

this makes the following obsolete in your config file

/# TODO: The name of the database system (one of: mysql, mariadb, postgresql)
/# ‘mysql’ and ‘mariadb’ are equivalent, so when using ‘mariadb’, you could also set this variable to ‘mysql’ and vice versa.

/# TODO: Your Nextcloud database name

/# TODO: Your Nextcloud database user

I would put maintenance mode in a function and variable.
I see no use of shutting down the webserver as maintenance mode should prevent any modification to files.

Other than that a good universal backup solution.
Thanks for sharing.

1 Like