execute instead of echo restore commands
This commit is contained in:
parent
1e5ad4ba71
commit
0a72e082c3
|
@ -124,9 +124,9 @@ if [[ $verify_back_dir == FALSE ]]; then
|
|||
fi
|
||||
|
||||
# perform restore
|
||||
# Still in testing mode, display command instead of running it
|
||||
echo "To restore $pathtorestore from $backup run this command:"
|
||||
echo "/usr/bin/rsync -vn --archive --numeric-ids --one-file-system --delete $pathtobackup $pathtorestore"
|
||||
echo "Running:"
|
||||
echo "/usr/bin/rsync -v --archive --numeric-ids --one-file-system --delete $pathtobackup $pathtorestore"
|
||||
/usr/bin/rsync -v --archive --numeric-ids --one-file-system --delete $pathtobackup $pathtorestore
|
||||
|
||||
bashup::unmount_storage_dir
|
||||
|
||||
|
|
|
@ -100,10 +100,9 @@ fi
|
|||
# check that dump exists and restore it now
|
||||
if [ -d $backup_storage_dir/$backup ]; then
|
||||
if [ -f $backup_storage_dir/$backup/mysql/$dump ]; then
|
||||
# Still in testing mode, display command instead of running it
|
||||
echo "To restore database $database from backup $backup run this command:"
|
||||
echo "running:"
|
||||
echo "/usr/bin/zcat $backup_storage_dir/$backup/mysql/$dump | mysql --defaults-extra-file=$defaults_extra_file $database"
|
||||
# echo "SUCCESS: Database $database from backup $backup has been restored."
|
||||
/usr/bin/zcat $backup_storage_dir/$backup/mysql/$dump | mysql --defaults-extra-file=$defaults_extra_file $database
|
||||
else
|
||||
echo "ERROR: Dump for database $database does not exist in the $backup backup dir."
|
||||
exit 1
|
||||
|
|
|
@ -100,10 +100,9 @@ fi
|
|||
# check that dump exists and restore it now
|
||||
if [ -d $backup_storage_dir/$backup ]; then
|
||||
if [ -f $backup_storage_dir/$backup/pdns/$zone_file ]; then
|
||||
# Still in testing mode, display command instead of running it
|
||||
echo "To restore zone $zone from backup $backup run this command:"
|
||||
echo "running:"
|
||||
echo "/usr/bin/pdnsutil load-zone $zone $backup_storage_dir/$backup/pdns/$zone_file"
|
||||
# echo "SUCCESS: Zone $zone from backup $backup has been restored."
|
||||
/usr/bin/pdnsutil load-zone $zone $backup_storage_dir/$backup/pdns/$zone_file
|
||||
else
|
||||
echo "ERROR: Zone file for zone $zone does not exist in the $backup backup dir."
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user