Francis.Montagnac at inria.fr
2011-Jul-14 09:24 UTC
copy /backup/current/home/???user>/Maildir -> /home/???user>/Maildir ?
On Sat, 09 Jul 2011 15:04:24 +0200 Louis-David Mitterrand wrote:> Is there also a pure rsync solution (without any shell loop) maybe based > on --include/--exclude?I thing the following will do: cd /backup/current/home rsync -av --delete \ --include '/*/' \ --include '*/Maildir/***' \ --exclude '*' \ . /home Beware that the *** needs at least version 2.6.7. -- Francis.Montagnac at inria.fr, Tel: (33) 04 92 38 79 11, Bur: C113 INRIA Sophia, 2004, rte des Lucioles, B.P.93 - 06902 Sophia Antipolis Cedex
Louis-David Mitterrand
2011-Jul-15 06:55 UTC
copy /backup/current/home/???user>/Maildir -> /home/???user>/Maildir ?
On Thu, Jul 14, 2011 at 11:24:46AM +0200, Francis.Montagnac at inria.fr wrote:> > On Sat, 09 Jul 2011 15:04:24 +0200 Louis-David Mitterrand wrote: > > > Is there also a pure rsync solution (without any shell loop) maybe based > > on --include/--exclude? > > I thing the following will do: > > cd /backup/current/home > rsync -av --delete \ > --include '/*/' \ > --include '*/Maildir/***' \ > --exclude '*' \ > . /home > > Beware that the *** needs at least version 2.6.7.Thanks for that suggestion. It's always nice to have working examples of include/exclude patterns in one's toolbox. Have a nice day,