RE: [qmailtoaster] Re: Re; rsync question
rsync -avz IP OF System you want to connect to:/home/vpopmail/domains/YOUR_DOMAIN.com/DIR_TO PULL FROM/USER_ID/Maildir/new/ home/vpopmail/domains/YOUR_DOMAIN.com/USER_ID/Maildir/new All one line of coarse. Works slicker that you know what. But I need to pull an entire server. I may experiment with a script with multi line rsync for each account on the server. I'll have to set rsync to run as a daemon with a secrets file to bypass typing the password every line. You can also pull the cur directory and what ever other files you need by changing the paths. And you can exclude files with rsync to. Coarse most of you may already know that. Anyway, thanks for the tip. I'll try and see what works. Take Care Joel _ From: Eric Shubert [mailto:e...@shubes.net] Sent: Tuesday, April 05, 2011 8:16 PM To: qmailtoaster-list@qmailtoaster.com Subject: [qmailtoaster] Re: Re; rsync question On 04/05/2011 02:27 PM, Joel Eddy wrote: I've got an older server running qmail. That sever used the older diredtory structure. Meaning as an example /home/vpopmail/domains/mydomain.com/user_id14 id's in this directory /home/vpopmail/domains/mydomain.com/0/user_id13 id's in this directory /home/vpopmail/domains/mydomain.com/1/user_id5 id's in this directory Anyway you get the idea. It goes all the way to D this way. Variable number of id's per directory. The new qmail toaster structure puts every id in one directory. Now the question is this. I'm thinking of use rsync to copy just the new mail in the new folder from the old server to the new one. I've gotten it to work if I use a one line command to do it. But I don't want to have to do that for 200 accounts. PITA. Can I not use a one liner to get rsync to pull everything from the old servers new folders to the new servers new folder for each account? Pulling my hair out. - I don't think I'd try to do it all in one command. I think I'd use the find command as a driver for rsync, something like: find /home/vpopmail/domains/mydomain.com \ -name Maildir/new \ -exec rsync -avh {} destination \; Or use find to identify each user, then rsync the user with the command you have. Don't beat your head on the wall. ;) P.S. It would be nice to see what you have that works for one user. -- -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 _ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1209 / Virus Database: 1500/3552 - Release Date: 04/05/11
[qmailtoaster] Re: Re; rsync question
On 04/06/2011 07:08 AM, Joel Eddy wrote: rsync -avz IP OF System you want to connect to:/home/vpopmail/domains/YOUR_DOMAIN.com/DIR_TO PULL FROM/USER_ID/Maildir/new/ home/vpopmail/domains/YOUR_DOMAIN.com/USER_ID/Maildir/new All one line of coarse. Works slicker that you know what. But I need to pull an entire server. I may experiment with a script with multi line rsync for each account on the server. I’ll have to set rsync to run as a daemon with a secrets file to bypass typing the password every line. There's another way to avoid typing the password, that doesn't require rsyncd. Using ssh (which I think rsync may use by default), you can put the public key (generated with ssh-keygen command) from the ssh client in a ~/.authorized-keys file on the ssh server. You can also pull the cur directory and what ever other files you need by changing the paths. And you can exclude files with rsync to. Coarse most of you may already know that. Anyway, thanks for the tip. I’ll try and see what works. Take Care Joel -- -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
RE: [qmailtoaster] Re: Re; rsync question
Eric, Would you put this in a script file to run? That's what I'm trying to do. No luck as yet tho. find /home/vpopmail/domains/mydomain.com \ If I use this it scrolls the entire domain structure by FAST by the way. -name Maildir/new \ If I include this I get find: -name/Maildir/new: unknown option -exec rsync -avh {} destination \; Haven't tried this yet. Any suggestions? Joel PS: If I/we get this to work I'll wiki it on the wiki
Re: [qmailtoaster] Re: Re; rsync question
I have this in my cron daily. #!/bin/sh rsync -avz -e ssh -p 5150 --delete root@192.168.2.80:/home/vpopmail/domains /home/*.* This keeps the backup up to date. I have it setup with a ssh-key so no login is required. It's on the LAN and behind a firewall. On 04/06/2011 10:41 AM, Joel Eddy wrote: Eric, Would you put this in a script file to run? That's what I'm trying to do. No luck as yet tho. find /home/vpopmail/domains/mydomain.com \ If I use this it scrolls the entire domain structure by FAST by the way. -name Maildir/new \ If I include this I get find: -name/Maildir/new: unknown option -exec rsync -avh {} destination \; Haven't tried this yet. Any suggestions? Joel PS: If I/we get this to work I'll wiki it on the wiki -- Cecil Yother, Jr. cj cj's 2318 Clement Ave Alameda, CA 94501 tel 510.865.2787 | http://yother.com Check out the new Volvo classified resource http://www.volvoclassified.com
[qmailtoaster] Re: Re; rsync question
On 04/06/2011 10:41 AM, Joel Eddy wrote: Eric, Would you put this in a script file to run? That’s what I’m trying to do. No luck as yet tho. find /home/vpopmail/domains/mydomain.com \ If I use this it scrolls the entire domain structure by “FAST” by the way. That's because there's no -exec yet. It's doing the default action, which is -print. -name Maildir/new \ If I include this I get “find: -name/Maildir/new: unknown option” I don't think that would have worked, come to think of it. -name can only specify a filename, not a directory/filename as I had it. Basically, you want to use find to get a list of all of the new|cur directories, then use the -exec option to run rsync on them. Using just the default -print option initially to get the name part(s) right will make things a little easier, as you have done. How about something more like this: find /home/vpopmail/domains/mydomain.com/*/Maildir/+(cur|new) Does that get them all? -exec rsync -avh {} destination \; Haven’t tried this yet. Any suggestions? Joel PS: If I/we get this to work I’ll wiki it on the wiki You mean when, not if. ;) -- -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
[qmailtoaster] Re: Re; rsync question
Why the *.* at the end? I don't think that's doing much of anything for you. It should be simply taking the domains directory and replicating it to some location on the target. On 04/06/2011 11:24 AM, Cecil Yother, Jr. wrote: I have this in my cron daily. #!/bin/sh rsync -avz -e ssh -p 5150 --delete root@192.168.2.80:/home/vpopmail/domains /home/*.* This keeps the backup up to date. I have it setup with a ssh-key so no login is required. It's on the LAN and behind a firewall. On 04/06/2011 10:41 AM, Joel Eddy wrote: Eric, Would you put this in a script file to run? That’s what I’m trying to do. No luck as yet tho. find /home/vpopmail/domains/mydomain.com \ If I use this it scrolls the entire domain structure by “FAST” by the way. -name Maildir/new \ If I include this I get “find: -name/Maildir/new: unknown option” -exec rsync -avh {} destination \; Haven’t tried this yet. Any suggestions? Joel PS: If I/we get this to work I’ll wiki it on the wiki -- Cecil Yother, Jr. cj cj's 2318 Clement Ave Alameda, CA 94501 tel 510.865.2787 |http://yother.com Check out the new Volvo classified resourcehttp://www.volvoclassified.com -- -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
Re: [qmailtoaster] Re: Re; rsync question
Hello There is an already made solution called snapback2 (based on rsync) http://www.perusion.com/misc/Snapback2/ Either you use it as an incremental backup or just for a single backup You can ssh in or simply do it local (by mounting the destination machine into your qmail) -Philip On 04/06/2011 08:24 PM, Eric Shubert wrote: On 04/06/2011 10:41 AM, Joel Eddy wrote: Eric, Would you put this in a script file to run? That’s what I’m trying to do. No luck as yet tho. find /home/vpopmail/domains/mydomain.com \ If I use this it scrolls the entire domain structure by “FAST” by the way. That's because there's no -exec yet. It's doing the default action, which is -print. -name Maildir/new \ If I include this I get “find: -name/Maildir/new: unknown option” I don't think that would have worked, come to think of it. -name can only specify a filename, not a directory/filename as I had it. Basically, you want to use find to get a list of all of the new|cur directories, then use the -exec option to run rsync on them. Using just the default -print option initially to get the name part(s) right will make things a little easier, as you have done. How about something more like this: find /home/vpopmail/domains/mydomain.com/*/Maildir/+(cur|new) Does that get them all? -exec rsync -avh {} destination \; Haven’t tried this yet. Any suggestions? Joel PS: If I/we get this to work I’ll wiki it on the wiki You mean when, not if. ;)
Re: [qmailtoaster] Re: Re; rsync question
I actually have the domains listed. I should have clarified that it's actually. #!/bin/sh rsync -avz -e ssh -p 5150 --delete root@192.168.2.80:/home/vpopmail/domains /home/maxwell/storage/laetitia I meant for it to indicate the users directory. On 04/06/2011 11:38 AM, Eric Shubert wrote: Why the *.* at the end? I don't think that's doing much of anything for you. It should be simply taking the domains directory and replicating it to some location on the target. On 04/06/2011 11:24 AM, Cecil Yother, Jr. wrote: I have this in my cron daily. #!/bin/sh rsync -avz -e ssh -p 5150 --delete root@192.168.2.80:/home/vpopmail/domains /home/*.* This keeps the backup up to date. I have it setup with a ssh-key so no login is required. It's on the LAN and behind a firewall. On 04/06/2011 10:41 AM, Joel Eddy wrote: Eric, Would you put this in a script file to run? That’s what I’m trying to do. No luck as yet tho. find /home/vpopmail/domains/mydomain.com \ If I use this it scrolls the entire domain structure by “FAST” by the way. -name Maildir/new \ If I include this I get “find: -name/Maildir/new: unknown option” -exec rsync -avh {} destination \; Haven’t tried this yet. Any suggestions? Joel PS: If I/we get this to work I’ll wiki it on the wiki -- Cecil Yother, Jr. cj cj's 2318 Clement Ave Alameda, CA 94501 tel 510.865.2787 |http://yother.com Check out the new Volvo classified resourcehttp://www.volvoclassified.com -- Cecil Yother, Jr. cj cj's 2318 Clement Ave Alameda, CA 94501 tel 510.865.2787 | http://yother.com Check out the new Volvo classified resource http://www.volvoclassified.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! - 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] Re: Re; rsync question
On 04/05/2011 02:27 PM, Joel Eddy wrote: I've got an older server running qmail. That sever used the older diredtory structure. Meaning as an example /home/vpopmail/domains/mydomain.com/user_id14 id's in this directory /home/vpopmail/domains/mydomain.com/0/user_id13 id's in this directory /home/vpopmail/domains/mydomain.com/1/user_id5 id's in this directory Anyway you get the idea. It goes all the way to D this way. Variable number of id's per directory. The new qmail toaster structure puts every id in one directory. Now the question is this. I'm thinking of use rsync to copy just the new mail in the new folder from the old server to the new one. I've gotten it to work if I use a one line command to do it. But I don't want to have to do that for 200 accounts. PITA. Can I not use a one liner to get rsync to pull everything from the old servers new folders to the new servers new folder for each account? Pulling my hair out. - I don't think I'd try to do it all in one command. I think I'd use the find command as a driver for rsync, something like: find /home/vpopmail/domains/mydomain.com \ -name Maildir/new \ -exec rsync -avh {} destination \; Or use find to identify each user, then rsync the user with the command you have. Don't beat your head on the wall. ;) P.S. It would be nice to see what you have that works for one user. -- -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