Re: Question about rsyncing to a slightly different folder structure on target
On 2014-01-01 2:02 PM, Wayne Davison way...@samba.org wrote: On Tue, Dec 31, 2013 at 3:59 AM, Charles Marcus cmar...@media-brokers.com mailto:cmar...@media-brokers.com wrote: On the old server, dovecot is configured to just use .../example.com/user http://example.com/user for the maildirs. On the target server, I want to change this to .../example.com/user/Maildir http://example.com/user/Maildir One thing you can do is to add a symlink on the sending side to point the Maildir to '.', and then run rsync with -R --no-implied-dirs and both the normal top-level dir and a path down to the Maildir/ (with the trailing slash) plus an exclude of the files in the user dir and the symlink itself. For instance: mkdir -p /tmp/src/user touch /tmp/src/user/{one,two,three} ln -s . /tmp/src/user/Maildir rsync -aivR --no-implied-dirs \ --include='/src/user/Maildir/' --exclude='/src/user/Maildir/Maildir' \ --exclude='/src/user/*' \ /tmp/./src /tmp/./src/user/Maildir/ /tmp/dest/ Thanks Wayne... I've filed this (in my 'tips-n-tricks' folder) for future reference. However, since this won't be an ongoing thing forever, I'll just keep things the way they are now (same layout on both), then when I'm ready to flip the switch, stop dovecot on the new server, do the transformation, change the dovecot config and start it back up. Then all I have to do is deal with the users complaining about all of their folders showing up as subfolders of the Inbox, and explain to them how to remove the INBOX. namespace prefix in their mail client (this is a system that was converted some time ago from an old courier-imap setup)... -- Best regards, */Charles/* -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: Question about rsyncing to a slightly different folder structure on target
On Tue, Dec 31, 2013 at 3:59 AM, Charles Marcus cmar...@media-brokers.comwrote: On the old server, dovecot is configured to just use .../example.com/userfor the maildirs. On the target server, I want to change this to .../ example.com/user/Maildir One thing you can do is to add a symlink on the sending side to point the Maildir to '.', and then run rsync with -R --no-implied-dirs and both the normal top-level dir and a path down to the Maildir/ (with the trailing slash) plus an exclude of the files in the user dir and the symlink itself. For instance: mkdir -p /tmp/src/user touch /tmp/src/user/{one,two,three} ln -s . /tmp/src/user/Maildir rsync -aivR --no-implied-dirs \ --include='/src/user/Maildir/' --exclude='/src/user/Maildir/Maildir' \ --exclude='/src/user/*' \ /tmp/./src /tmp/./src/user/Maildir/ /tmp/dest/ ..wayne.. -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Question about rsyncing to a slightly different folder structure on target
Hi all, Ok, if this isn't possible with some kind of wildcard, I can adjust the target manually, but if I can just modify the command to allow for the different folder structure on the target, I'd rather do that. I'm incrementally rsync'ing my mailstore from the old server to the new server, doing testing along the way. The command I'm currently using is: rsync -rltgovDHP --delete --delete-excluded --exclude-from '/path/to/excludes.txt' /mnt/oldvmail/example.com/ /var/vmail/example.com/ On the old server, dovecot is configured to just use .../example.com/user for the maildirs. On the target server, I want to change this to .../example.com/user/Maildir Is there a way to modify the above command, so that rsync automatically syncs what is currently in .../example.com/user to .../example.com/user/Maildir using wildcards or something? Thanks -- Best regards, */Charles/* -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html