I really deserve at least a CD (ama...@shubes.net) for this:

#!/bin/sh
# backup mail directories to offsite backup
# shubes 07/05/10 - don't run on Sundays - clashes with raid-check
# shubes 02/11/09 - created

if [ "$(date +%a)" = "Sun" ]; then
  exit 0
fi

userid=<remoteuser>
backoff_url=<remotehost.domain.com>
backoff_port=<remoteport>
destdir="/home/$userid/backup/$(hostname -s)"
dirlist="/etc /home/vpopmail/domains /var/lib/mailman"

for dir in $dirlist; do
  echo ""
echo -n "$(date "+%b %e %Y %H:%M:%S") $(hostname --fqdn) $(basename $0): rsyncing $dir ..."

  rsync -azh --stats --delete --numeric-ids \
        --rsh="ssh -p $backoff_port" \
        --rsync-path="sudo /usr/bin/rsync" \
        $dir \
        $userid@$backoff_url:$destdir 2>&1 \
        | grep -v "^!!"
done

On 03/29/2011 12:41 PM, Scott Hughes wrote:
Thanks Eric.  Can you post your rsync script as we can shamelessly copy that?  
*Grin*

Thanks,
Scott

-----Original Message-----
From: Eric Shubert [mailto:e...@shubes.net]
Sent: Tuesday, March 29, 2011 12:56 PM
To: qmailtoaster-list@qmailtoaster.com
Subject: [qmailtoaster] Re: qtp-backup

http://qtp.qmailtoaster.com/trac/browser

On 03/29/2011 10:52 AM, Scott Hughes wrote:
Eric,

How does one get to and use this subversion repo you speak of?

Thanks,
Scott




On Mar 29, 2011, at 12:06 PM, Eric Shubert<e...@shubes.net>   wrote:

I using rsync to back up the /home/vpopmail/domains directory. Then I run a 
modified version of qtp-backup which backs up everything except said directory. 
This is much more efficient, as messages aren't repeatedly backed up.

The modified version of qtp-backup will be included in the next release of QTP, 
and is presently in the QTP subversion repo, so you can download it from the 
web site. See comments in the source for how to use it. :)

--
-Eric 'shubes'

On 03/29/2011 09:30 AM, Patrick Ring wrote:
I find it has been server-dependant (...age, load, amount of storage).
My storage is about half of what you have, and I know it seems to take
around :45mins. ...though the servers here are not new by any means (HP
Proliant DL320 G3's).
The process, if I remember correctly, makes the copy of the data by
using a compression statement (tar/gz). It could be the compression that
is taking a while (especially on older equipment).
-Pat.

------------------------------------------------------------------------
*From:* Scott Hughes [mailto:sc...@renshawauto.net]
*Sent:* Tuesday, March 29, 2011 11:24 AM
*To:* qmailtoaster-list@qmailtoaster.com
*Subject:* [qmailtoaster] qtp-backup

I was just curious. I am testing qtp-backup to see how long it runs. I’m
currently at 1 hour and 25 minutes and still going. Current directory
(/backup/qmailbkup) size is 7.2 Gig (/home/vpopmail/domains is 16 Gig
uncompressed). Is this normal? Am I running to correct/best/fastest
backup script?

My goal here is to put qtp-backup (or the best backup script) into a
cron job that runs every night, then after waiting MORE than the amount
of time it takes to run the qtp-backup script, rsync the backup file(s)
over to a another server.

Thanks,

Scott



---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
    Vickers Consulting Group offers Qmailtoaster support and installations.
      If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
     Please visit qmailtoaster.com for the latest news, updates, and packages.
          To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
     For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com



---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
      Vickers Consulting Group offers Qmailtoaster support and installations.
        If you need professional help with your setup, contact them today!




--
-Eric 'shubes'


---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
   Vickers Consulting Group offers Qmailtoaster support and installations.
     If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
    Please visit qmailtoaster.com for the latest news, updates, and packages.
To unsubscribe, e-mail: qmailtoaster-list-unsubscr...@qmailtoaster.com
    For additional commands, e-mail: qmailtoaster-list-h...@qmailtoaster.com


Reply via email to