gpg passphrase
This commit is contained in:
parent
85043cf1a2
commit
99d7f7baa6
|
@ -122,7 +122,13 @@ function restore_local_cryptpad {
|
|||
temp_restore_dir=/root/tempcryptpad
|
||||
function_check restore_directory_from_usb
|
||||
restore_directory_from_usb $temp_restore_dir cryptpad
|
||||
if [ ! -d $temp_restore_dir$CRYPTPAD_DIR/datastore ]; then
|
||||
systemctl start cryptpad
|
||||
echo 'Failed to restore cryptpad'
|
||||
rm -rf $temp_restore_dir
|
||||
fi
|
||||
cp -r $temp_restore_dir$CRYPTPAD_DIR/datastore/* $CRYPTPAD_DIR/datastore/
|
||||
rm -rf $temp_restore_dir
|
||||
systemctl start cryptpad
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -361,7 +361,11 @@ function restore_directory_from_usb_obnam {
|
|||
|
||||
function restore_directory_from_usb_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
|
||||
PASSPHRASE="$BACKUP_DUMMY_PASSWORD" duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$USB_MOUNT/backup/${2} ${1}
|
||||
if [ ! "$?" = "0" ]; then
|
||||
echo "WARNING: failed to restore $USB_MOUNT/backup/${2} to ${1}"
|
||||
fi
|
||||
PASSPHRASE=
|
||||
remove_backups_temp_directory
|
||||
}
|
||||
|
||||
|
@ -390,7 +394,8 @@ function restore_directory_from_friend_obnam {
|
|||
|
||||
function restore_directory_from_friend_duplicity {
|
||||
create_backups_temp_directory
|
||||
echo "$BACKUP_DUMMY_PASSWORD" | duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$SERVER_DIRECTORY/backup/${2} ${1}
|
||||
PASSPHRASE="$BACKUP_DUMMY_PASSWORD" duplicity restore --gpg-options "$BACKUP_GPG_OPTIONS" --tempdir $BACKUP_TEMP_DIRECTORY --force file://$SERVER_DIRECTORY/backup/${2} ${1}
|
||||
PASSPHRASE=
|
||||
remove_backups_temp_directory
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue