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

Hi! Great initiative! Using rsync for incremental backups is a smart choice. Ensure that your modified Nextcloud-Backup-Restore 21 project is configured to run regular scheduled backups, and verify the integrity of your backups periodically. Keep up the good work!