Fix backup script for remote repositories.
This commit is contained in:
parent
4d70971359
commit
3eae7e731a
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@ if grep -q "$MNT" /etc/fstab ; then
|
||||||
[ -d "$BORG_REPO" ] || mount -v "$MNT" && MOUNTED="TRUE"
|
[ -d "$BORG_REPO" ] || mount -v "$MNT" && MOUNTED="TRUE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$BORG_REPO" ] ; then
|
if [ ! -e "$KEY_BACKUP" ] ; then
|
||||||
mkdir -vp --mode=0750 "$BORG_REPO"
|
[[ "$BORG_REPO" =~ @ ]] || mkdir -vp --mode=0750 "$BORG_REPO"
|
||||||
borg init --encryption=repokey
|
borg init --encryption=repokey
|
||||||
borg key export "$BORG_REPO" "$KEY_BACKUP"
|
borg key export "$BORG_REPO" "$KEY_BACKUP"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue