Q: rsync examples, missing parameters?

Wayne Davison wayned at samba.org
Mon Jun 21 18:43:41 GMT 2004

On Thu, Jun 17, 2004 at 04:39:41PM +0200, bzels123 wrote:
> My problem is that in /home/bart2/backup/%day% where %day% is
> (Mon,Tue,Wed,Thu,...) only files that existed before and modified on
> another day are backed up. Neither new files nor directories are
> backed up, how come?

I think you're misunderstanding the backup option -- it makes a backup
of older files that get replaced in the main transfer, so new files have
nothing in the way to get backed up.  The %day% dirs would thus contain
the old version of any files that got replaced, allowing you to go back
in time several days (of course, if the file hasn't changed recently, it
would only exist in the main destination dir).

If your destination filesystem supports hard links, you may prefer to
use --link-dest and transfer the files directly into an empty %day%
destination dir (which would create a full copy in each %day% dir with
unchanged files hard-linked together).  Something like this:

ssh -l bart2 rm -rf $TODAY
rsync -ave ssh --delete --backup --link-dest=$YESTERDAY /cygdrive/c/Doc/backup/desktop2/ bart2 at$TODAY


More information about the rsync mailing list