Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack (5) Thread Tools Display Modes
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 06-15-2007, 12:13 PM
Loyal Member
 
Posts: 96
Default OSE rotating backup script

I had a need to backup my server to a NAS using samba. I'm sure there may be others out there with such a need to backup across a network to a samba share.

This script was pieced together in part by script authored by Brice Burgess in an article at the following link:

Linux.com | Backing up your Linux desktop with rsync

As well as a script written by cvidal who is a contributor to Zimbra. I pieced in the areas related to the mounting of network drives. The nice thing about the script is that it keeps rotating backups for better redundancy. You can have a look at it and adjust to your liking. I hope people find it useful.

You will need to do the following to make it executable and then insert as a cron job:

Create a file named multi_backup.sh and copy/paste the contents of the attached text file.

#chmod +x multi_backup.sh
#cp multi_backup.sh /usr/local/bin/
#cd /etc/cron.daily
#ln -s /usr/local/bin/multi_backup.sh .

It will run with cron dailys from there.

The following will rotate the log file:
To rotate the logs, add a file named "zimbak" under /etc/logrotate.d/ with the lines:

/var/log/zimbak.log {
missingok
notifempty
}

Big thanks to cvidal for those inserting pieces above.

script:
multi_backup.txt
Reply With Quote
  #2 (permalink)  
Old 07-04-2007, 05:55 AM
Loyal Member
 
Posts: 96
Default

I've been asked about preserving symbolic links using the rsync method to a samba share. I wanted to answer that question in this thread so anyone concerned can take what they can from my thoughts.

This is a backup script and to my knowledge there is not a way to preserve symbolic links using rsync to a samba share in this manner. It may be possible but the way I look at it is that it's not necessary. As said before, this is a backup script and preserving of symbolic links are not necessary. If you need to restore from one of the backup points, you would rsync over back to the mail server writing over top of the existing information and the symbolic links would still remain intact. If you were doing a disaster recovery, a complete reinstall would be necessary and then you would rsync back to the mail server from backup essentially restoring information. Again, in that case, the symbolic links would already be there and would not be necessary to restore.

Ultimately, the need to backup the symbolic links would not be necessary. Any restore would place the relevant data back in the correct place and the symbolic existing links would look to it.

Again, enjoy.
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0