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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypted backups to S3-compatible storage using restic #1371

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

thomasheller
Copy link
Contributor

@thomasheller thomasheller commented Oct 31, 2021

This feature allows to create encrypted backups of the Nextcloud data directory and (optionally) Nextcloud database to any S3-compatible storage using restic.

Workflow:

  • Create a bucket at the S3 provider of your choice
  • Run nc-restic-s3-init to initialize the encrypted repository (once)
  • Run nc-restic-s3-backup to create a backup when desired (password not stored for security reasons; optionally prune old backups)
  • On a fresh NextCloudPi install, restore using nc-restic-s3-restore

Limitations:

Notes:

  • You can also restore specific files using restic restore --include via SSH
  • Use restic forget --prune to remove old backups when needed via SSH (there are many more sophisticated options beyond the number of days to keep)

If you have any suggestions for improving this PR, feel free to comment. 馃檪

@nachoparker
Copy link
Member

This is very interesting, let me know when it's ready to take a look.

Thanks!

@thomasheller
Copy link
Contributor Author

@nachoparker Ready

install()
{
apt-get update
apt-get install --no-install-recommends -y restic

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick note from a passerby. Perhaps also add:

restic self-update

Restic version available from Bullseye repository is v0.9.6 while self update will get you v0.14.0.

@ristomatti
Copy link

Are there plans to complete this? And later add support for other backends, like B2?

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

Successfully merging this pull request may close these issues.

None yet

3 participants