Skip to content

Instantly share code, notes, and snippets.

@gideonstar-git
Last active October 23, 2021 12:00
Show Gist options
  • Save gideonstar-git/b924b72b55c07b5e47699f2c26094600 to your computer and use it in GitHub Desktop.
Save gideonstar-git/b924b72b55c07b5e47699f2c26094600 to your computer and use it in GitHub Desktop.
borg.sh
#!/bin/sh
#
# borg init /target/directory -e none
#
path=/target/directory
target="/etc /opt"
date=$(date +'%Y%m%d')
borg create $path::$date $target
borg prune --keep-daily 7 $path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment