copy /backup/current/home/???user>/Maildir -> /home/???user>/Maildir ?

Louis-David Mitterrand vindex+lists-rsync at apartia.org
Sat Jul 9 07:04:14 MDT 2011


On Sat, Jul 09, 2011 at 02:26:07PM +0200, Matthias Schniedermeyer wrote:
> On 09.07.2011 11:23, Emilien Kenler wrote:
> > Louis-David Mitterrand <vindex+lists-rsync <at> apartia.org> writes:
> 
> That statement contains several errors. And is also slightly offtopic 
> (doesn't use rsync).
> 
> This should work:
> 
> cd /backup/current/home
> for i in *
> do
>   rsync -av --delete "/backup/current/home/$i/Maildir/" "/home/$i/Maildir/"
> done
> 
> I made a few assumptions:
> - Only directories under home
> - All directories have a Maildir
> - No user-dir is missing on target-side
> - There is nothing special, like hardlinks, ACL, xattr ...

Yes, this works, but only if the remote user-dir exists.

Thank you for sending it.

Is there also a pure rsync solution (without any shell loop) maybe based
on --include/--exclude?


More information about the rsync mailing list