diff options
author | Britney Fransen <brfransen@gmail.com> | 2023-02-18 05:56:05 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2023-02-18 05:56:05 (GMT) |
commit | 6eddeb0330d50d2afaf3ae1458b0e61a0f626bbe (patch) | |
tree | 49152319ac50966d8b2f6922bc21bd9493846920 /linhes/linhes-system/lh_system_backup | |
parent | 6b16aabb0ef8b4dfdbc8c13fdf1363bf5580bcdd (diff) | |
download | linhes_pkgbuild-6eddeb0330d50d2afaf3ae1458b0e61a0f626bbe.zip linhes_pkgbuild-6eddeb0330d50d2afaf3ae1458b0e61a0f626bbe.tar.gz linhes_pkgbuild-6eddeb0330d50d2afaf3ae1458b0e61a0f626bbe.tar.bz2 |
linhes-system: move myth_mtc to lh_mtc and rework
Diffstat (limited to 'linhes/linhes-system/lh_system_backup')
-rwxr-xr-x | linhes/linhes-system/lh_system_backup | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linhes/linhes-system/lh_system_backup b/linhes/linhes-system/lh_system_backup new file mode 100755 index 0000000..f970f4f --- /dev/null +++ b/linhes/linhes-system/lh_system_backup @@ -0,0 +1,29 @@ +#!/bin/bash +. /etc/systemconfig +lh_notify-send "Starting Backup..." +#alert user the database will not be backed up +if [ $SystemType != MasterBackend -a $SystemType != Standalone ] +then + lh_notify-send "This is not the Master backend.\n Skipping backup of database." +fi + +if [ $SystemType = MasterBackend -o $SystemType = Standalone ] +then + backend_control.sh stop 127.0.0.1 +fi + +#do the backup +lh_system_backup_job 2>&1 > /var/run/backup.log +rc=$? +if [ $SystemType = MasterBackend -o $SystemType = Standalone ] +then + backend_control.sh start 127.0.0.1 +fi + +if [ $rc = 0 ] +then + complete_message="Backup completed successfully." +else + complete_message="Backup failed." +fi +lh_notify-send "$complete_message" |