rsync in conjunction with the --link-dest option does not output deleted files

Matthias Schniedermeyer ms at
Tue Jan 8 05:40:04 MST 2013

On 08.01.2013 12:53, Maik Meier wrote:
> But I thought rsync tells me all modifications from "source" to
> "backup_new". I just want to write this information into a log-file. I
> know that the file, that is deleted in "source" is not deleted
> physically after rsyncing, because it still exists in backup_old. But
> the interesting information to me would be: what has changed from
> "source" to "backup_new"? It seems that rsync does not output this
> information. Is the only solution to write a own script which compares
> "source" and "backup_old" to determine the deleted files before
> rsyncing? I am wondering about this.

The alternativ (if possible) is to doing the link separatly and then 
rsync, instead of letting rsync doing the linking.

cp -al <last_backup> <new_backup>
and then rsync with <new_backup> as target

The end-result is identical, if the number of files is large, this can 
take longer as you have to walk the tree twice instead of only once.
If the number of files is small enough to fit into the cache, there 
shouldn't not be a significat change in total runtime.

> ------- Original Message from Matthias Schniedermeyer -------
> > On 08.01.2013 12:23, Maik Meier wrote:
> >> Hi,
> >>
> >> I want to use rsync to make daily backups using hard-links in this way:
> >>
> >> rsync -av --delete --link-dest=../backup_old ./source/. ./backup_new
> >>
> >> Does someone know if this a bug, or ist this intended to be or am I
> >> wrong somethere?
> > I would think it is intented.
> >
> > Technically you don't have anything to delete as you are creating 
> > something new and a "deleted" file just means that you don't have to 
> > link or copy it.
> >
> >
> >
> >



More information about the rsync mailing list