Skip to content
672E2064616E edited this page Sep 3, 2019 · 5 revisions

automate borg backups using a yaml config file

borg is a deduplicating backup solution

Other solutions to automate borg backups

I didn't want to use a UI and the other solutions were not a good fit.

Goals

  • Terminal interface which was easy enough that supporting shell scripts were not needed
  • Local and remote repositories
  • Handle logging
  • Define backups handing multiple types of snapshots.
    Thus development and Documents can be separate snaps and have different exclusions and pruning

./borgrunner.py {yaml file} options [commands...]

commands: backup prune info list

not implimented yet: check fullcheck, mount, umount, break-lock

options: -h, --help show help message -P PASSWORD, --password PASSWORD passphrase for repo keyfile, can override borgPass -i path to ssh key for remote repository, can override sshKey -v, --verbose verbose mode -l LOGPATH, --logpath LOGPATH log path

example: ./borgrunner.py borg.yaml info list ./borgrunner.py borg.yaml info backup info ./borgrunner.py borg.yaml list -P password -i /home/uid/.ssh/borg-key

where -i -> path to ssh private key for remote repo -P -> passphrase for borg repo

running using keyfile encryption and ssh private key with no passphrase ./borgrunner.py borg.yaml info backup prune info -P 1234 -i /home/uid/.ssh/key

if sshkey file path is in yaml and passphrase is encoded in yaml:

./borgrunner.py borg.yaml info backup prune info

Clone this wiki locally