--delete and --backup - Backup file gets deleted

Marc St-Onge marc.st-onge at canadiansignals.com
Tue Sep 21 13:43:31 GMT 2004


Thanks Wayne,

I have been using rsync as a mean to backup and archive my filesystems onto
another hard disk because I got tired of managing tapes and ATA drives are
much cheaper than tapes nowadays.  Using the --suffix option has given me
the possibility to make custom dated suffix for my deleted files and
archives.  This has made the --exclude option more complicated and perhaps I
could have been crafty about my naming convention but it's a bit late for me
to change my backup system so that's why I came up with the code change.

I will send you the patch file separately later today.

Marc St-Onge

-----Original Message-----
From: rsync-bounces+mstonge=jkl.net at lists.samba.org
[mailto:rsync-bounces+mstonge=jkl.net at lists.samba.org]On Behalf Of Wayne
Davison
Sent: September 21, 2004 3:01 AM
To: Marc St-Onge
Cc: rsync at lists.samba.org
Subject: Re: --delete and --backup - Backup file gets deleted


On Mon, Sep 20, 2004 at 07:27:54PM -0400, Marc St-Onge wrote:
> when you execute the [--backup] command a second time [...] the backup
> file gets deleted forever.

Yes, that is what happens if you don't use --backup-dir and you don't
exclude the backup files.  If you want more than just the backups of the
last transfer you can use this option:

    --exclude='*~'

(for the default --suffix setting when --backup-dir is not used).  Since
this is easy to specify, I don't think we need a --keep-backup option.

> I also added two other options that I find convenient,  the
> --delete-suffix and the --delete-dir because I like to treat deleted
> files different than archived files that are still in use but modified
> from time to time.

An interesting idea.  If you provide a patch I'll put it in the
"patches" dir for now.

..wayne..
--
To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html



More information about the rsync mailing list