oZimbraBackup
Menu: Installation Configuration Scheduling

Installation
To install this script, simply put it where you want, edit it and add it to crontab, make sure it is executable.
You can make it executable by doing this as root.
# chmod +x oZimBackup.sh
Configuration
The script comes with some configuration options available and some of them must be set before the script will be usable. Here you can see all of the options in the script with an explanation of their purpose.
Global Settings
This is the core settings for the script and is used to build up the environment for the rest of the functions found in this script.
- ZimInstPath=/opt
Installation path for Zimbra, excluding the Zimbra folder. - ZimHome=zimbra
The Zimbra installation folder, excluding path to folder. - ZimBackupPath=/opt/backup
Root folder for backup where backup files will be placed.
Log Settings
The log options enables you to keep track of what happens during a backup for later review or historical purpose.
- ZimLogEnable=yes
Turns logging on or off(yes/no). - ZimLogLogRotate=no
Enables log rotating(yes/no) - ZimLogRotateInt=day
How often should we rotate logs(day, week or month) - ZimLogPath=/opt/logs
Folder for log files - ZimLogVerbose=no
Activates extra logging information(yes/no), useful for debugging.
File Transfer Settings
File transfer is a way to automate the off site transfer for the backup file when a backup is done.
- ZimFtpEnable=no
Enable/Disable ftp file transfer(yes/no) - ZimScpEnable=no
Enable/Disable scp file transfer(yes/no) - ZimFtpOpt=”
Extra options for ftp file transfer, see manual for ftp command - ZimScpOpt=”
Extra options for scp file transfer, see manual for scp command - ZimFilehostUser=
Username for file transfers - ZimFilehostPass=
Password for file transfers - ZimFilehostAddress=
Host address for file transfers - ZimFilehostFolder=
Folder on host where files will be placed during file transfer
File Delete Settings
Backup files can hog up quite a lot of storage space and sometimes it is not needed to keep all files locally, especially not when used in conjunction with off site transfer.
- ZimDeleteLocalFile=no
Enable/Disable compressed backup file deletion after successful backup(yes/no) - ZimDeleteTimeSet=0
Set in minutes above 0 to keep a desired amount of files locally, be sure to match the time with your backup schedules.
Scheduling
The scheduling of backups is highly individual depending on server load, amount of users a.s.o.
Some possible examples of scheduling with crontab:
# m h dom mon dow command
00 3 * * * /opt/scripts/oZimbraBackup.sh –full > /dev/null 2>&1
00 12 * * * /opt/scripts/oZimbraBackup.sh –msg-full > /dev/null 2>&1
00 6,16,23 * * * /opt/scripts/oZimbraBackup.sh –msg-diff > /dev/null 2>&1
News




