|
|
@ -27,7 +27,7 @@ echo "" |
|
|
|
check_status.sh |
|
|
|
if [ "${status}" != "0" ]; then |
|
|
|
echo "" |
|
|
|
fn_printwarningnl "${servicename} is currently running." |
|
|
|
fn_print_warning_nl "${servicename} is currently running." |
|
|
|
sleep 1 |
|
|
|
while true; do |
|
|
|
read -p "Stop ${servicename} while running the backup? [y/N]" yn |
|
|
@ -39,13 +39,13 @@ if [ "${status}" != "0" ]; then |
|
|
|
done |
|
|
|
fi |
|
|
|
fn_scriptlog "Started backup" |
|
|
|
fn_printdots "Backup in progress, please wait..." |
|
|
|
fn_print_dots "Backup in progress, please wait..." |
|
|
|
sleep 2 |
|
|
|
if [ ! -d "${backupdir}" ]; then |
|
|
|
mkdir "${backupdir}" |
|
|
|
fi |
|
|
|
tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "backups" ./* |
|
|
|
fn_printoknl "Backup created: ${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size" |
|
|
|
fn_print_ok_nl "Backup created: ${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size" |
|
|
|
fn_scriptlog "Complete, Backup created: ${backupdir}/${backupname}.tar.gz is $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}') size" |
|
|
|
sleep 1 |
|
|
|
echo "" |