config.example.yaml

Mon, 02 Jun 2025 15:50:05 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Mon, 02 Jun 2025 15:50:05 -0500
changeset 150
f94987ced25e
parent 148
ff975e768112
permissions
-rw-r--r--

StrictHostKeyChecking in example config

25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
1 #
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
2 # Borgend example configuration file
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
3 #
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
4
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
5 # General parameters for borg
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
6 borg:
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
7 executable: /usr/local/bin/borg
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
8 common_parameters:
150
f94987ced25e StrictHostKeyChecking in example config
Tuomo Valkonen <tuomov@iki.fi>
parents: 148
diff changeset
9 - rsh: ssh -o StrictHostKeyChecking=yes
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
10 create_parameters:
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
11 - exclude-from: $HOME/lib/borg-exclude-patterns.txt
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
12 prune_parameters:
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
13 # Set borg pruning parameters. The pruning interval is configured
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
14 # in each separate backup. NOTE: Pruning parameters can also be
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
15 # configured separately for each backup.
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
16 #
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
17 # Keep a daily archive for the last week
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
18 - keep-daily: 7
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
19 # Keep a weely archive for the last year
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
20 - keep-weekly: 52
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
21 # Keep a montly archive forever
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
22 - keep-monthly: -1
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
23 # Set to true to enable a dry-run
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
24 - dry-run: False
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
25
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
26 # Repositories: configure here locations, passphrases,
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
27 # and general access parameters
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
28 repositories:
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
29 - name: myserver
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
30 location: ssh://myserver.invalid/~/storage/borg
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
31 keychain_account: borg-backup@mylaptop
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
32 # Borg parameters
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
33 common_parameters:
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
34 # Borg is installed on remote host at ~/bin, which might not be on path
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
35 - remote-path: ~/bin/borg
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
36 create_parameters:
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
37 - compression: lzma
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
38 - checkpoint-interval: 600
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
39
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
40 - name: backup1
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
41 location: /Volumes/backup1/borg
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
42 keychain_account: borg-backup@mylaptop
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
43
148
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
44 - name: homeserver
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
45 ssdp_uuid: borg@home.c5fad77dbff6157eba56597e9c404631
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
46 ssdp_path: /mnt/backup/borg
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
47 keychain_account: borg-backup@mylaptop
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
48
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
49 # Backups: configure here which files should be backed up, how frequently, and to
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
50 # which repositires.
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
51 backups:
148
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
52 # 1. Most files in $HOME to homeserver, discovered by SSDP
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
53 - name: Home to 'homeserver'
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
54 # Scheduling mode: dreamtime/realtime/manual
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
55 # Dreamtime scheduling discounts system sleep periods.
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
56 scheduling: dreamtime
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
57 # Backup every 24 hours
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
58 backup_interval: 86400
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
59 # Retry every 15 minutes if unable to connect / unfinished backup
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
60 retry_interval: 900
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
61 # Prune interval: once every two weeks
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
62 prune_interval: 1209600
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
63 # Repository and archive configuration
148
ff975e768112 SSDP server discovery
Tuomo Valkonen <tuomov@iki.fi>
parents: 97
diff changeset
64 repository: homeserver
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
65 archive_prefix: 'all@mylaptop-'
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
66 archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
67 # Files to include
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
68 paths:
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
69 - $HOME
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
70 create_parameters:
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
71 - pattern: "- $HOME/Downloads/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
72 - pattern: "- $HOME/Library/Mail/V*/MailData/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
73 - pattern: "+ $HOME/Library/Mail/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
74 - pattern: "+ $HOME/Library/Mobile Documents/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
75 - pattern: "- $HOME/Library/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
76 - pattern: "- $HOME/.config/borg/security/"
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
77
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
78 # 2. A subset of files $HOME more frequently to ssh://myserver.invalid
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
79 - name: Work to 'myserver'
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
80 # Scheduling mode: dreamtime/realtime/manual
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
81 scheduling: dreamtime
76
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
82 # Backup every 3 hours
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
83 backup_interval: 10800
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
84 # Retry every 15 minutes if unable to connect / unfinished backup
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
85 retry_interval: 900
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
86 # Prune interval: once every two weeks
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
87 prune_interval: 1209600
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
88 # Repository and archive configuration
76
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
89 repository: myserver
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
90 archive_prefix: 'work@mylaptop-'
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
91 archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
92 paths:
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
93 - $HOME/work
65
6fed67863b00 README and config.example.yaml updates to describe queuing features
Tuomo Valkonen <tuomov@iki.fi>
parents: 25
diff changeset
94
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
95 # 3. Manual backup to external hard drive
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
96 - name: Home to 'backup1'
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
97 # Manual backup
76
4b08fca3ce34 Dreamtime scheduling: discount system sleep periods
Tuomo Valkonen <tuomov@iki.fi>
parents: 74
diff changeset
98 scheduling: manual
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
99 backup_interval: 0
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
100 retry_interval: 0
97
96d5adbe0205 Pruning support
Tuomo Valkonen <tuomov@iki.fi>
parents: 76
diff changeset
101 prune_interval: 0
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
102 repository: backup1
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
103 archive_prefix: 'mylaptop-'
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
104 archive_template: '{now:%Y-%m-%d_%H:%M:%S}'
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
105 paths:
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
106 - $HOME
25
efa4c61c6f01 Sample configuration file added along with a few words of documentation
Tuomo Valkonen <tuomov@iki.fi>
parents:
diff changeset
107 create_parameters:
74
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
108 - pattern: "- $HOME/Downloads/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
109 - pattern: "- $HOME/Library/Mail/V*/MailData/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
110 - pattern: "+ $HOME/Library/Mail/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
111 - pattern: "+ $HOME/Library/Mobile Documents/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
112 - pattern: "- $HOME/Library/"
4f56142e7497 Separated repository configuration form backup configuration;
Tuomo Valkonen <tuomov@iki.fi>
parents: 65
diff changeset
113 - pattern: "- $HOME/.config/borg/security/"

mercurial