From cc6feac775f15a091800a36a131d90fcaa25713d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 23 May 2018 12:44:36 -0300 Subject: Support for local backups --- README.md | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 55398d1..c358987 100644 --- a/README.md +++ b/README.md @@ -12,35 +12,58 @@ A script for home folder backups using [Borg](https://borgbackup.readthedocs.io) Create a config for your `servername` destination at `~/.config/borger/servername`: - # Backup destination - export SSH_SERVER="user@host" - export SSH_PORT="2202" + # Backup destination + export SSH_SERVER="user@host" + export SSH_PORT="2202" - # Repository path - export BORG_REPO_DIR="/var/backups/users/$USER/borg" - export BORG_REPO="ssh://$SSH_SERVER:$SSH_PORT/$BORG_REPO_DIR" + # Repository path + export BORG_REPO_DIR="/var/backups/users/$USER/borg" + export BORG_REPO="ssh://$SSH_SERVER:$SSH_PORT/$BORG_REPO_DIR" - # Setting one of those, so you won't be asked for your repository passphrase: - #export BORG_PASSPHRASE='HACKME' - #export BORG_PASSCOMMAND='pass show backup' - #export BORG_PASSCOMMAND='keyringer default decrypt borg 2> /dev/null' + # Setting one of those, so you won't be asked for your repository passphrase: + #export BORG_PASSPHRASE='HACKME' + #export BORG_PASSCOMMAND='pass show backup' + #export BORG_PASSCOMMAND='keyringer default decrypt borg 2> /dev/null' - # Backup config - keepdaily="7" - keepweekly="4" - keepmonth="6" - encryption="keyfile" - placeholder="{user}" + # Backup config + keepdaily="7" + keepweekly="4" + keepmonth="6" + encryption="keyfile" + placeholder="{user}" Then run borger: borger servername +If you want to backup to local folder or a locally-mounted USB disk, use the +following config at `~/.config/borger/my-disk`: + + # Repository path + export BORG_REPO="/media/my-disk/backups/users/$USER/borg" + + # Setting one of those, so you won't be asked for your repository passphrase: + #export BORG_PASSPHRASE='HACKME' + #export BORG_PASSCOMMAND='pass show backup' + #export BORG_PASSCOMMAND='keyringer default decrypt borg 2> /dev/null' + + # Backup config + keepdaily="7" + keepweekly="4" + keepmonth="6" + encryption="keyfile" + placeholder="{user}" + +Then run borger normally: + + borger my-disk + # Checking your backups As simply as borger servername --check + borger mydisk --check # WARNING -- cgit v1.2.3