two suggestions about backup

KOMORIYA Takeru komoriya at
Tue Aug 12 22:02:45 EST 2003

Hi all,

I am now trying to use rsync for incremental backup these days, and I
have two suggestions.

First, I found rsync does not make backup files in case destination
files have the same name with source files.
I tested in some situations as below.

   [Source]       [Destination]    [Backup]
   Regular file   Directory        Created
   Regular file   Symlink          Not created
   Regular file   Device File      Not created
   Directory      Regular file     Not created
   Directory      Symlink          Not created
   Directory      Device file      Not created
   Symlink        Any type         Not created
   Device file    Any type         Not created

Yes, these are rare cases, but I believe it's better to backup all
kind of files. 

So I wrote the patch against nightly snapshot
(rsync-HEAD-20020808-1120Z.tar.gz), and attached it as

Additionally, this patch includes bug fix to correct the problem that
FIFO files are sometimes backuped when src and dst files are the same.
(rdev treatment problem)

Second suggestion:

How about adding now option "--backup-only"  that means making backups
only and don't change any destination files?

I want to use rsync with LVM snapshot to make incremental backups like

  1) Make LVM snapshot of file system.
  2) Mount shapshots of today and yesterday.
  3) Compare it to yesterday's snapshot, and backup files which are
     updated/deleted using rsync.
     (Snapshots are read-only.)
  4) Delete yesterday's snapshot.

So I need rsync not to modefy any destination files, and to make
backups only.

I attached the trial patch as "rsync-2.5.6cvs-backuponly.patch".
(This patch needs rsync-2.5.6cvs-backupfix.patch to be applied first.)

With this patch, new options "--backup-only" is added, and the
"--backup-dir" option implies "--backup".
This patch works fine for me.

How do you think of my suggestions?

  AutonomousAgentFarm Sendai Lab., Japan
    E-mail: komoriya at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsync-2.5.6cvs-backupfix.patch
Type: application/octet-stream
Size: 2801 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsync-2.5.6cvs-backuponly.patch
Type: application/octet-stream
Size: 10864 bytes
Desc: not available
Url :

More information about the rsync mailing list