config.example.yaml

changeset 74
4f56142e7497
parent 65
6fed67863b00
child 76
4b08fca3ce34
--- a/config.example.yaml	Fri Jan 26 10:35:00 2018 +0000
+++ b/config.example.yaml	Fri Jan 26 19:04:04 2018 +0000
@@ -2,77 +2,84 @@
 # Borgend example configuration file
 #
 
+# General parameters for borg
 borg:
- executable: /usr/local/bin/borg
- common_parameters:
- create_parameters:
-  - exclude-from: $HOME/lib/borg-exclude-patterns.txt
- prune_parameters:
-  - daily: 7
-  - weekly: 50
+  executable: /usr/local/bin/borg
+  common_parameters:
+  create_parameters:
+    - exclude-from: $HOME/lib/borg-exclude-patterns.txt
+  prune_parameters:
+   - daily: 7
+   - weekly: 50
 
+# Repositories: configure here locations, passphrases,
+# and general access parameters
+repositories:
+  - name: myserver
+    location: ssh://myserver.invalid/~/storage/borg
+    keychain_account: borg-backup@mylaptop
+    # Borg parameters
+    common_parameters:
+      # Borg is installed on remote host at ~/bin, which might not be on path
+      - remote-path: ~/bin/borg
+    create_parameters:
+      - compression: lzma
+      - checkpoint-interval: 600
+
+  - name: backup1
+    location: /Volumes/backup1/borg
+    keychain_account: borg-backup@mylaptop
+
+# Backups: configure here which files should be backed up, how frequently, and to
+# which repositires.
 backups:
- # 1. Most files in $HOME to ssh://myserver.invalid
- - name: Home to 'myserver'
-   # Backup every 24 hours
-   backup_interval: 86400
-   # Retry every 15 minutes if unable to connect / unfinished backup
-   retry_interval: 900
-   repository: ssh://myserver.invalid/~/storage/borg
-   archive_prefix: 'all@mylaptop-'
-   archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
-   keychain_account: borg-backup@mylaptop
-   paths:
-    - $HOME
-   common_parameters:
-    # Borg is installed on remote host at ~/bin,
-    # which might not be on path
-    - remote-path: ~/bin/borg
-   create_parameters:
-    - compression: lzma
-    - checkpoint-interval: 600
-    - pattern: "- $HOME/Downloads/"
-    - pattern: "- $HOME/Library/Mail/V*/MailData/"
-    - pattern: "+ $HOME/Library/Mail/"
-    - pattern: "+ $HOME/Library/Mobile Documents/"
-    - pattern: "- $HOME/Library/"
-    - pattern: "- $HOME/.config/borg/security/"
+  # 1. Most files in $HOME to ssh://myserver.invalid
+  - name: Home to 'myserver'
+    # Backup every 24 hours
+    backup_interval: 86400
+    # Retry every 15 minutes if unable to connect / unfinished backup
+    retry_interval: 900
+    repository: myserver
+    archive_prefix: 'all@mylaptop-'
+    archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
+    paths:
+      - $HOME
+    create_parameters:
+      - pattern: "- $HOME/Downloads/"
+      - pattern: "- $HOME/Library/Mail/V*/MailData/"
+      - pattern: "+ $HOME/Library/Mail/"
+      - pattern: "+ $HOME/Library/Mobile Documents/"
+      - pattern: "- $HOME/Library/"
+      - pattern: "- $HOME/.config/borg/security/"
 
- # 2. A subset of files $HOME more frequently to ssh://myserver.invalid
- - name: Work to 'myserver'
+  # 2. A subset of files $HOME more frequently to ssh://myserver.invalid
+  - name: Work to 'myserver'
    # Backup every 3 hours
    backup_interval: 10800
    # Retry every 15 minutes if unable to connect / unfinished backup
    retry_interval: 900
-   repository: ssh://myserver.invalid/~/storage/borg
+   repository: myserver
    archive_prefix: 'work@mylaptop-'
    archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
-   keychain_account: borg-backup@mylaptop
    paths:
-    - $HOME/work
-   common_parameters:
-    # Borg is installed on remote host at ~/bin,
-    # which might not be on path
-    - remote-path: ~/bin/borg
-   create_parameters:
-    - compression: lzma
-    - checkpoint-interval: 600
+     - $HOME/work
 
- # 3. Manual backup to external hard drive
- - name: Home to 'backup1'
+  # 3. Manual backup to external hard drive
+  - name: Home to 'backup1'
    # Manual backup
    backup_interval: 0
    retry_interval: 0
-   repository: /Volumes/backup1/borg
+   repository: backup1
    archive_prefix: 'mylaptop-'
    archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
-   _keychain_account: borg-backup@mylaptop
    paths:
-    - $HOME
+     - $HOME
    create_parameters:
-    - pattern: "- $HOME/Downloads/"
-    - pattern: "- $HOME/Library/Mail/V*/MailData/"
-    - pattern: "+ $HOME/Library/Mail/"
-    - pattern: "+ $HOME/Library/Mobile Documents/"
-    - pattern: "- $HOME/Library/"
-    - pattern: "- $HOME/.config/borg/security/"
+     - pattern: "- $HOME/Downloads/"
+     - pattern: "- $HOME/Library/Mail/V*/MailData/"
+     - pattern: "+ $HOME/Library/Mail/"
+     - pattern: "+ $HOME/Library/Mobile Documents/"
+     - pattern: "- $HOME/Library/"
+     - pattern: "- $HOME/.config/borg/security/"
+
+

mercurial