mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
25 lines
655 B
Bash
Executable file
25 lines
655 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if [[ -z "$1" ]]
|
|
then
|
|
echo Error: Not settings file specified!
|
|
exit
|
|
fi
|
|
|
|
. "$1"
|
|
|
|
echo "Backing up to ${BACKUP_DIRECTORY}."
|
|
|
|
if [[ ! -w "${BACKUP_DIRECTORY}" ]]
|
|
then
|
|
notify-send --icon "deja-dup" "Backup Cancelled" "The target directory is not currently available."
|
|
exit
|
|
fi
|
|
|
|
env PASSPHRASE=${PASSWORD} SIGN_PASSPHRASE=${PASSWORD} duplicity --encrypt-sign-key ${ENCRYPTION_KEY} "${SOURCE_DIRECTORY}" "${BACKUP_SOURCE_PREFIX}${BACKUP_DIRECTORY}"
|
|
|
|
notify-send --icon "deja-dup" "Backup Complete" "Riftgate was backed up to Data Shape successfully."
|
|
|
|
# Delete old backups
|
|
#duplicity remove-all-but-n-full 3 --force ${BACKUP_DIRECTORY}
|
|
|