jazzband / django-dbbackup

Management commands to help backup and restore your project database and media files
BSD 3-Clause "New" or "Revised" License
986 stars 220 forks source link

Deduplicated backups (e.g. Borg or restic) #335

Open bittner opened 4 years ago

bittner commented 4 years ago

IIUC, the current feature set requires you to handle rotating the backups yourself.

These problems are solved by backup applications that do deduplicated backups, such as Borg or Restic. The latter is a Go implementation, the former a Python tool.

Would it be realistic to try and integrate those tools in django-dbbackup? Calling them as external binaries would likely be sufficient.

bittner commented 4 years ago

runrestic is one of the more promising attempts to provide restic for Python.

jonathan-s commented 4 years ago

@bittner What could this package do better than runrestic does?

bittner commented 4 years ago

Integration with Django for both the database data and the static files?

Really, all the restic wrappers are just there because restic itself doesn't provide a way to maintain a configuration. The "promising" from above relates to merely the rather poor state of the other restic-related packages. :pensive: At least, for what I can see.

jonathan-s commented 4 years ago

If you'd like to provide a patch for this it would be welcome. If you take this on, please do describe the approach you'd like to take so that we can agree that it sounds sensible for both of us :).

ZuluPro commented 3 years ago

Hi @bittner dbbackup has a simple retention option: DBBACKUP_CLEANUP_KEEP and DBBACKUP_CLEANUP_KEEP_MEDIA In number of backups

If you add the --clean option to the commands, it will apply this retention by guessing the date from fliename.

https://django-dbbackup.readthedocs.io/en/master/configuration.html#dbbackup-tmp-file-max-size