Skip to content

Instantly share code, notes, and snippets.

@BenjaminHerbert
Created January 23, 2020 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenjaminHerbert/641080e209139493a2082fd66a0407ce to your computer and use it in GitHub Desktop.
Save BenjaminHerbert/641080e209139493a2082fd66a0407ce to your computer and use it in GitHub Desktop.
Restic Backups

Restic

Ich bin schon länger auf der Suche nach einem guten und verschlüsselten Backup.

Initalisieren des Repos

Einmalig setzen

RESTIC_REPOSITORY=<ordner>
restic init --repo RESTIC_REPOSITORY

Das vergebene Passwort kann in ein File gespeichert werden: .resticpassword

Environment Variablen

Variablen machen die Bedienung viel komfortabler:

  • RESTIC_REPOSITORY=
  • RESTIC_PASSWORD_FILE=.resticpassword

Backup

restic --verbose backup ~/work
restic check

Excludes definieren

Wichtig: restic vergleicht den vollen Pfad einer Datei!

Datei anlegen

touch restic-excludes.txt

und Ordner hinzufügen

echo ~/.local >> restic-excludes.txt
echo ~/.cache >> restic-excludes.txt
echo /srv/restic-repo >> restic-excludes.txt

Backup anfertigen

restic --verbose backup --exclude-file=restic-excludes.txt --one-file-system ~/projects

Backup prüfen

restic check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment