Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bittner opened this issue Jul 3, 2020 · 5 comments
Open

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

bittner opened this issue Jul 3, 2020 · 5 comments

Comments

@bittner
Copy link
Member

bittner commented Jul 3, 2020

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

  • Whether you compress, encrypt and store to whatever backend, there will always be something like a tarball for every new execution of a backup process. Hence, you have to deal yourself with deleting old copies (and keeping selected ones, e.g. one every week for the last 3 months) to make sure you don't run out of disk space.
  • Also, if there are no changes (be it in the database or the media files) there will still be a backup, which will unnecessarily occupy disk space and/or incur additional cost on a storage service.

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
Copy link
Member Author

bittner commented Oct 10, 2020

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

@jonathan-s
Copy link
Contributor

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

@bittner
Copy link
Member Author

bittner commented Nov 4, 2020

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. 😔 At least, for what I can see.

@jonathan-s
Copy link
Contributor

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
Copy link
Contributor

ZuluPro commented Dec 25, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants