Skip to content
Snippets Groups Projects
Commit a5daaa17 authored by Bob Mottram's avatar Bob Mottram
Browse files

local restore

parent 7f508fef
No related branches found
No related tags found
No related merge requests found
......@@ -919,12 +919,27 @@ function backup_data {
function restore_data_from_storage {
restore_type="$1"
restore_command="${PROJECT_NAME}-restore-local $USB_DRIVE"
if [[ $restore_type != "local" ]]; then
restore_command="${PROJECT_NAME}-restore-remote $remote_domain_name configuration;;"
else
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
utils_installed=(config
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment