Tariq Azad/OPS wrote:
Did any body tried using rsync to replicate between backup and primary qmail servers. Is it recommended for a Qmail hosting multiple domains having more then 7000 users.

I  back up our mysql db hourly with mysqldump,  on 24 hour x 7day basis and
with rsync I do it on all servers regardless of how many users they have, we also do it on a rolling 7 day basis

Pretty simple, you can expend on this greatly like I do in my main scripts by using logging, timeouts and alarms
but starting point would be:

#!/usr/bin/perl
@weekDays = qw(Sun Mon Tue Wed Thu Fri Sat);
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
$dayOfWeek = $dayOfWeek - '1';
$TODAYIS = "$weekDays[$dayOfWeek]";

$RSYNCP = "/usr/local/bin/rsync -vazH --stats --password-file=/etc/rsync.secret --delete --delete-after /home/vpopmail/domains [EMAIL PROTECTED]::vpop-$TODAYIS";
system("$RSYNCP") ;

....
/etc/rsyncd.conf
[vpop-Sun]
       path = /backups/machine-or-mailstore_name/vpopmail/sun
       auth users = backupuser
       secrets file = /etc/rsyncd.secrets
       max connections = 50
       hosts allow = 203.h.i.dd.en
       uid = 0
       gid = 0
       list = no
       read only = no

...just repeat that block for all 7 days changing /sun to what_ever_day

Theres probably better ways of doing it, but this way has worked for me for years.


!DSPAM:47a3ca62310545201136119!

Reply via email to