local restore

This commit is contained in:
Bob Mottram 2016-10-20 16:35:25 +01:00
parent 7f508fef8e
commit a5daaa17ef
1 changed files with 17 additions and 2 deletions

View File

@ -919,12 +919,27 @@ function backup_data {
function restore_data_from_storage { function restore_data_from_storage {
restore_type="$1" restore_type="$1"
restore_command="${PROJECT_NAME}-restore-local $USB_DRIVE"
if [[ $restore_type != "local" ]]; then if [[ $restore_type != "local" ]]; then
restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;" restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;"
else else
remote_domain_name="$1" remote_domain_name="$1"
restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name" if [ ! -b $USB_DRIVE ]; then
if [ -b /dev/sdb1 ]; then
USB_DRIVE=/dev/sdb1
fi
if [ -b /dev/sdc1 ]; then
USB_DRIVE=/dev/sdc1
fi
if [ -b /dev/sdd1 ]; then
USB_DRIVE=/dev/sdd1
fi
if [ -b /dev/sde1 ]; then
USB_DRIVE=/dev/sde1
fi
write_config_param USB_DRIVE "$USB_DRIVE"
fi
restore_command="${PROJECT_NAME}-restore-local $USB_DRIVE"
fi fi
utils_installed=(config utils_installed=(config