Deprecated gpg option
This commit is contained in:
parent
1e0ca1c3e2
commit
d9322df7b4
|
@ -35,7 +35,7 @@ SUSPENDED_SITE=
|
|||
BACKUP_DUMMY_PASSWORD='backup'
|
||||
|
||||
BACKUP_TEMP_DIRECTORY=/root/.backuptemp
|
||||
BACKUPS_GPG_OPTIONS="--no-show-photos --pinentry-mode loopback"
|
||||
BACKUP_GPG_OPTIONS="--pinentry-mode loopback"
|
||||
|
||||
function create_backups_temp_directory {
|
||||
if [ ! -d $BACKUP_TEMP_DIRECTORY ]; then
|
||||
|
@ -264,7 +264,7 @@ function set_obnam_client_name {
|
|||
|
||||
function backup_directory_to_usb_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUPS_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2}
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2}
|
||||
if [ ! "$?" = "0" ]; then
|
||||
umount $USB_MOUNT
|
||||
rm -rf $USB_MOUNT
|
||||
|
@ -278,7 +278,7 @@ function backup_directory_to_usb_duplicity {
|
|||
exit 8352925
|
||||
fi
|
||||
if [[ $ENABLE_BACKUP_VERIFICATION == "yes" ]]; then
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity verify --gpg-options "$BACKUPS_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2}
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity verify --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --encrypt-key $MY_BACKUP_KEY_ID --full-if-older-than 4W --exclude-other-filesystems ${1} file://$USB_MOUNT/backup/${2}
|
||||
if [ ! "$?" = "0" ]; then
|
||||
umount $USB_MOUNT
|
||||
rm -rf $USB_MOUNT
|
||||
|
@ -361,7 +361,7 @@ function restore_directory_from_usb_obnam {
|
|||
|
||||
function restore_directory_from_usb_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity restore --gpg-options "$BACKUPS_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
|
||||
remove_backups_temp_directory
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,7 @@ function restore_directory_from_friend_obnam {
|
|||
|
||||
function restore_directory_from_friend_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity restore --gpg-options "$BACKUPS_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$SERVER_DIRECTORY/backup/${2} ${1}
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$SERVER_DIRECTORY/backup/${2} ${1}
|
||||
remove_backups_temp_directory
|
||||
}
|
||||
|
||||
|
@ -436,7 +436,7 @@ function set_user_permissions {
|
|||
|
||||
function backup_directory_to_friend_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUPS_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --ssh-askpass --encrypt-key ${ADMIN_BACKUP_KEY_ID} --full-if-older-than 4W --exclude-other-filesystems ${1} $SERVER_DIRECTORY/backup/${2}
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity full --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --ssh-askpass --encrypt-key ${ADMIN_BACKUP_KEY_ID} --full-if-older-than 4W --exclude-other-filesystems ${1} $SERVER_DIRECTORY/backup/${2}
|
||||
if [ ! "$?" = "0" ]; then
|
||||
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu ${1}/*
|
||||
|
@ -448,7 +448,7 @@ function backup_directory_to_friend_duplicity {
|
|||
exit 5293526
|
||||
fi
|
||||
if [[ $ENABLE_BACKUP_VERIFICATION == "yes" ]]; then
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity verify --gpg-options "$BACKUPS_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --ssh-askpass --encrypt-key ${ADMIN_BACKUP_KEY_ID} --full-if-older-than 4W --exclude-other-filesystems ${1} $SERVER_DIRECTORY/backup/${2}
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity verify --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --ssh-askpass --encrypt-key ${ADMIN_BACKUP_KEY_ID} --full-if-older-than 4W --exclude-other-filesystems ${1} $SERVER_DIRECTORY/backup/${2}
|
||||
if [ ! "$?" = "0" ]; then
|
||||
if [[ ${1} == "/root/temp"* || ${1} == *"tempbackup" ]]; then
|
||||
shred -zu ${1}/*
|
||||
|
|
Loading…
Reference in New Issue