LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2012, 08:05 AM   #1
tezarin
Member
 
Registered: Nov 2007
Posts: 133

Rep: Reputation: 0
Backing up Zimbra using rsync?


Hi all,

I have a CentOS based mail server, the mail software is called Zimbra. I have been given some info on how to backup this server. Basically I need to backup a directory name /opt/zimbra and save it in a safe place so if the server crashes, I could easily set up a new machine and swap them. This is the info I was given which advised me to use rsync and I just never used it before:

- rsync the zimbra directory while it is running to another location on the same server
- stop zimbra
- rsync --delete the zimbra directory to the same location used in the first step. This makes sure to backup the locked/changed files which is very important!
- start zimbra
- tar the location from the first step
- copy tar file to backup computer

Now my questions are:

1) Can someone please post the actual commands for step 1 and 3? I am planning to rsync to /home/backup/zimbra

Would that be something like:
Code:
rsync -avz servername: opt/zimbra /home/backup/zimbra
? Or I should add a trailing slash after /opt/zimbra? The reason I am asking this is because we will need to do a --delete and per the info I found on this page, we need to be careful and type the correct command: http://linux.about.com/library/cmd/blcmdl1_rsync.htm


2) What other directoried on the server needs to be backed up? /etc or host file, etc?

Thanks in advance
 
Old 11-16-2012, 01:10 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
step 1:
Code:
rsync -av /opt/zimbra  /home/backup/
or, (same thing, since trailing slash on source directory does not create target directory)
Code:
rsync -av /opt/zimbra/  /home/backup/zimbra
step 3:
Code:
rsync -avn --delete /opt/zimbra  /home/backup/  # test run
rsync -av --delete /opt/zimbra  /home/backup/ # do it
i don't know where the zimbra configs are (/etc is a good guess), but it's good idea to back up /etc regardless.

Last edited by Berhanie; 11-16-2012 at 01:12 AM.
 
Old 11-19-2012, 07:55 AM   #3
tezarin
Member
 
Registered: Nov 2007
Posts: 133

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Berhanie View Post
step 1:
Code:
rsync -av /opt/zimbra  /home/backup/
or, (same thing, since trailing slash on source directory does not create target directory)
Code:
rsync -av /opt/zimbra/  /home/backup/zimbra
step 3:
Code:
rsync -avn --delete /opt/zimbra  /home/backup/  # test run
rsync -av --delete /opt/zimbra  /home/backup/ # do it
i don't know where the zimbra configs are (/etc is a good guess), but it's good idea to back up /etc regardless.
Berhanie
Thanks much, really appreciate it. I know Zimbra has all its files in /opt/zimbra so everything will be backed up when the opt directory gets backed up. But my plan is to have another CentOS box which I will install Zimbra on it and move the backed up directory there then if something happens to the original box, I would like to be able to swap boxes quickly, so was wondering what else should be backed up on that original machine beside the /etc directory? The original machine does not play any other role but being the mail server (zimbra), so in general what else should be backed up? (interfaces, host info, etc.)and where are those?

Thanks in advance
 
Old 11-19-2012, 08:29 PM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
The original machine does not play any other role but being the mail server (zimbra), so in general what else should be backed up? (interfaces, host info, etc.)and where are those?
the most important thing, then, is the mail store itself, assuming you keep the mail on the one server. i think you should bring up the replacement server online as soon as possible (i.e. don't wait for the original to crash). the process should inform you of everything you need to back up or duplicate. once the replacement is operational, you just need to rsync the mail store regularly.

some comments:
all the interface configs on a redhat-type system are under /etc (/etc/sysconfig/network-scripts/). backing up /etc will also give you a copy of the local firewall settings. you might want to take a look at /var to see if there's anything you need there (e.g. cron jobs). you should make a copy of scripts that you run on that machine. take a look at the /home directories to see what's there, and at /root. maybe make a dump of all the rpms that you've installed (rpm -qa), making note of those that came from a third-party.

Last edited by Berhanie; 11-19-2012 at 08:42 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync keeps backing up same folders over and over Red Squirrel Linux - Server 9 01-04-2009 11:37 PM
Rsync not backing up MySQL cabron Linux - Server 3 12-26-2007 07:56 AM
backing up to the net with ftp or rsync rblampain Linux - General 2 04-27-2006 12:40 AM
rsync and backing up danimalz Linux - Software 12 10-24-2005 12:01 PM
RSync or another way? Backing Up Off-site. kemplej Linux - Software 0 08-19-2004 04:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration