# HG changeset patch # User Tuomo Valkonen # Date 1516502640 0 # Node ID efa4c61c6f01070e3b7ace45e8fe39f28fe44310 # Parent 94d58d514d690879ed3ad887d7469fde8790f89f Sample configuration file added along with a few words of documentation diff -r 94d58d514d69 -r efa4c61c6f01 README.md --- a/README.md Sun Jan 21 01:53:10 2018 +0000 +++ b/README.md Sun Jan 21 02:44:00 2018 +0000 @@ -11,7 +11,7 @@ - [rumps](https://github.com/jaredks/rumps) (Ridiculously Uncomplicated macOS Python Statusbar apps) - [keyring](https://pypi.python.org/pypi/keyring) -For passphrase use authentication to work correctly, it is useful to create create a standalone Mac app. This can be don with `py2app`. You can install it with +For passphrase use authentication to work correctly, it is useful to create a standalone Mac app. This can be don with `py2app`. You can install it with pip install py2app @@ -21,11 +21,16 @@ The apps hould be placed under `dist/`. -## Usage +## Usage and configuration + +### Configuration file + +See the included `config.example.yaml`, which shoud be relatively self-explanatory. Everything under `common_parameters`, `create_parameters`, and `prune_parameters` are simply Borg command line key–value parameters. +Edit the sample configuration it and copy it to `~/.config/borgend/config.yaml`. ### Passphrases -Passphrases are stored in the OS X Keychain (or whatever the keyring package support on other systems). In the Borgend configuration file, you only configure the ‘account’ of the of the password using `keychain_account` keyword of each backup set. The ‘service’ of the password has to be `borg-backup`. To add a password into the keychain for the ‘my-borg-backup’, you may use: +Passphrases are stored in the OS X Keychain (or whatever the keyring package supports on other systems). In the Borgend configuration file, you only configure the ‘account’ of the of the password using `keychain_account` keyword of each backup set. The ‘service’ of the password has to be `borg-backup`. To add a password into the keychain for the ‘my-borg-backup’, you may use: security add-generic-password -a my-borg-backup -s borg-backup -w [PASSWORD] diff -r 94d58d514d69 -r efa4c61c6f01 config.example.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.example.yaml Sun Jan 21 02:44:00 2018 +0000 @@ -0,0 +1,56 @@ +# +# Borgend example configuration file +# + +borg: + executable: /usr/local/bin/borg + common_parameters: + create_parameters: + - exclude-from: $HOME/lib/borg-exclude-patterns.txt + prune_parameters: + - daily: 7 + - weekly: 50 + +backups: + - name: Home to 'myserver' + # Backup every 6 hours + backup_interval: 21600 + # Retry every 15 minutes if unable to connect / unfinished backup + retry_interval: 900 + repository: ssh://myserver.invalid/~/storage/borg + archive_prefix: '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/" + + - name: Home to 'backup1' + # Manual backup + backup_interval: 0 + retry_interval: 0 + repository: /Volumes/backup1/borg + archive_prefix: 'mylaptop-' + archive_template: '{now:%Y-%m-%d_%H:%M:%S}' + _keychain_account: borg-backup@mylaptop + 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/"