Skip to content

Instantly share code, notes, and snippets.

@isaiahnixon
Last active October 29, 2021 23:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save isaiahnixon/f452cb1a0d505ed1381312c18e767295 to your computer and use it in GitHub Desktop.
Save isaiahnixon/f452cb1a0d505ed1381312c18e767295 to your computer and use it in GitHub Desktop.
Borg Automated Backups Setup - Ubuntu 18.04
mkdir bkp
sudo apt install borgbackup -y
borg init --encryption none bkp/
crontab -e
# 0 12 * * * borg create ~/bkp::Downloads-$(date '+\%m-\%d-\%Y') ~/Downloads/
tail -f /var/log/syslog | grep CRON
borg list bkp
mkdir test-extraction
cd test-extraction
borg extract ../bkp::Downloads home/e/Downloads
cd ..
du -sh ~/Downloads
du -sh test-extraction
crontab -e
# 0 13 * * * borg prune -v --list --keep-within=7d ~/bkp
mkdir bkp
sudo apt install borgbackup -y
borg init --encryption none bkp/
crontab -e
# 0 12 * * * borg create ~/bkp::Downloads-$(date '+\%m-\%d-\%Y') ~/Downloads/
# 0 13 * * * borg prune -v --list --keep-within=7d ~/bkp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment