Subversion Repositories oZimbraBackup

Compare Revisions

Ignore whitespace Rev 3 → Rev 4

/branches/1.0.x/oZimbraBackup.sh
23,8 → 23,8
#
# Developer: oSource Development(as of 2009-07-01)
# DevTeam: Marcus Uddenhed
# Version: 1.0.6
# Updated: 2014-05-18 16:00
# Version: 1.0.7
# Updated: 2015-12-14 22:17
#
 
#### Global Settings ####
517,7 → 517,7
echo "`date "+%Y-%m-%d %H:%M:%S"` - Zimbra services starting..." >> $ZimLogFile
 
# Starting Zimbra
su zimbra -c -l "zmcontrol start" >> $ZimLogFile
su zimbra -c -l "$ZimInstPath/$ZimHome/bin/zmcontrol start" >> $ZimLogFile
 
# Send task stop time to log
echo "`date "+%Y-%m-%d %H:%M:%S"` - Zimbra services started." >> $ZimLogFile
525,7 → 525,7
else
 
# Starting Zimbra
su zimbra -c -l "zmcontrol start"
su zimbra -c -l "$ZimInstPath/$ZimHome/bin/zmcontrol start"
 
fi
fi
540,7 → 540,7
echo "`date "+%Y-%m-%d %H:%M:%S"` - Zimbra services stopping..." >> $ZimLogFile
 
# Stopping Zimbra
su zimbra -c -l "zmcontrol stop" >> $ZimLogFile
su zimbra -c -l "$ZimInstPath/$ZimHome/bin/zmcontrol stop" >> $ZimLogFile
 
# Sending task stop time to log
echo "`date "+%Y-%m-%d %H:%M:%S"` - Zimbra services stopped." >> $ZimLogFile
551,7 → 551,7
else
 
# Stopping Zimbra
su zimbra -c -l "zmcontrol stop"
su zimbra -c -l "$ZimInstPath/$ZimHome/bin/zmcontrol stop"
 
# Sleep for 10 seconds to give shutdown some extra time before backup starts
sleep 10
659,10 → 659,6
mkdir -p $ZimMsgDiffTmpPath
}
 
restore_guide() {
echo "Restore Guide"
}
 
script_help() {
# Show help for script
echo "oZimBackup.sh Usage:"
673,9 → 669,6
echo "--msg-diff For differential message backup (Hot)"
echo "--check Check if needed software is installed, depends"
echo " on script configuration"
echo "--restore-guide Shows a short guide on how to restore Zimbra"
#echo "--full-restore Does a complete restore"
#echo "--diff-restore Restores a differential backup"
echo "--help Shows this help"
echo ""
echo "--no-start Tells Zimbra to stay offline after backup"
684,9 → 677,6
echo "Ex. Full backup:"
echo " oZimBackup.sh --full"
echo ""
#echo "Ex. Complete restore:"
#echo " oZimBackup.sh --full-restore /path/to/file/zimbackup.tar.gz"
echo ""
echo "Ex. Full differential backup leaving Zimbra in offline mode:"
echo " oZimBackup.sh --diff --no-start"
echo ""
725,15 → 715,6
file_transfer
log_end
;;
--full-restore)
full_restore
;;
--diff-restore)
diff_restore
;;
--restore-guide)
restore_guide
;;
--check)
pre_check
;;
743,4 → 724,4
*)
script_help
;;
esac
esac