Browse Source

added comments and improved variable naming

Toastie 4 years ago
parent
commit
a35f3ef0c6
2 changed files with 19 additions and 4 deletions
  1. 18 3
      restic/.env.template
  2. 1 1
      restic/data/restic/run.sh

+ 18 - 3
restic/.env.template

@@ -1,9 +1,24 @@
+# Directory on the docker host to bind-mount to be backed up
+# BACKUP_SOURCE is bind-mounted to /mnt/source
 BACKUP_SOURCE=/home
-BACKUP_FOLDERS=/mnt/source/john /mnt/source/jane
-RESTIC_ARGS=--limit-upload 244 --limit-download 244
+
+# Folders to be backed up in the format /mnt/source/<folder>
+BACKUP_BACKUP_FOLDERS=/mnt/source/john /mnt/source/jane
+
+# Additional arguments for restic backup
+RESTIC_BACKUP_ARGS=--limit-upload 244 --limit-download 244
+
+# Additional arguments for restic forget
 RESTIC_FORGET_ARGS=--keep-weekly 2 --prune
+
+# Passphrase to encrypt the backup
+ESTIC_PASSWORD=AnotherSetOf30RandomCharacters
+
+# S3 Bucket + Credentials
 AWS_ACCESS_KEY_ID=example-TwelveChar
 AWS_SECRET_ACCESS_KEY=30RandomAlphaNumericCharacters
-RESTIC_PASSWORD=AnotherSetOf30RandomCharacters
 RESTIC_REPOSITORY=s3:https://example.ulm-store.de/mybackup
+
+# Timezone (see https://github.com/restic/restic/issues/2534)
 TZ=Europe/Berlin
+

+ 1 - 1
restic/data/restic/run.sh

@@ -5,7 +5,7 @@ restic snapshots &>/dev/null || restic init
 
 # Run backup job, using parameters from AWS_ACCESS_KEY_ID,
 # AWS_SECRET_ACCESS_KEY, RESTIC_PASSWORD, RESTIC_REPOSITORY
-restic backup $RESTIC_ARGS $BACKUP_FOLDERS
+restic backup $RESTIC_BACKUP_ARGS $RESTIC_BACKUP_FOLDERS
 
 # Cleanup old backups
 restic forget $RESTIC_FORGET_ARGS