Sdb1 Hello,
For our backups, we rsync the entire /opt/zimbra directory. In our test box, we added a second drive. This new drive was recognized by CentOS as sdb1. So, we created a new directory (mkdir /mnt/test) then mounted /dev/sdb1 to /mnt/test (mount /dev/sdb1 /mnt/test). In our case, the sdb1 acts as our backup. Once it was mounted, we rsynced the /opt/zimbra backup to /mnt/test (rsync -avH xxx.xxx.xxx.xxx:/opt/zimbra/ /mnt/test/. This was done for a few reasons:
1. The test box for the Zimbra installation must have the same hostname and IP as the production server. As you can't have two servers with the same IP and hostname on a network, we started with a free IP on the test box, rsynced the data over then changed the IP and hostname after disconnecting it from the network. We also installed Bind (DNS) on the test server as well for the installation of Zimbra.
2. As, in our case, we are dealing with approx 230 GB of data, rsyncing this takes a bit of time so not to bog down the network with this data transfer during the day, the backup data is rsynced to the spare drive at night (after the backup is done - takes about 4-5 hours), then we can do what we need during the day. Once you do the initial rsync of backups to /dev/sdb1, rsyncing this again (for testing purposes) is quick as, with rsync, only the files that changed are transferred. This is where I say use the --delete option.
Once, you have the backup rsynced to the new drive (sdb1) in the test box, from here, you do the clean install of Zimbra, turn off all services for Zimbra (service zimbra stop or su to zimbra then zmcontrol stop) then run the script (after editing it for where ever you put the data you intend to use) and at the end of the script, you should have a clean install of Zimbra with all your data.
Now, having said all this, once you start this process (assuming this will be the end and the server you are building will become the production server), you have to power off the production server so no new email gets processed or rsync your backup at night to the test box, then turn Zimbra off on the production server, and do a quick rsync from the server itself to grab any emails that came in after the backup was done. Either way, you will have some down time for the production server, but how much will be dependent upon how much data you are dealing with and how you approach the data transfer (see point 2).
Sir Bob
Last edited by Sir Bob; 09-08-2009 at 02:18 PM..
|