> I am using rsync to backup files. Is it possible to specify an option
> not to delete files from backup directory if the files are deleted
> from source? In that way, I can always keep something I may or may not
> need in the backup disk, but remove it from a work computer.

As Alex mentioned the omitting the --delete option is the way to go. 

However, you should keep in mind that (depending upon the rsync options you 
provide) if you update a file (within the source directory) the then older 
version of this file in the destination directory will be overwritten. 

If you want to preserve old revisions of files, there are various rsync options 
which will allow various actions to be take place to the older versions which 
already exist in the destination directory.

Below is an example of what I am talking about with regards older versions 
being overwritten in the destination directory when using the --archive rsync 
option.

> $ mkdir 1 2
> $ ls
> 1 2
> $ touch 1/hello
> $ rsync -a 1 2
> $ echo "hello there" >> 1/hello 
> $ rsync -a 1 2
> $ cd 2/1
> $ ls -a
> .     ..    hello
> $ cat hello 
> hello there


You will notice that there is no copy of the original (blank) file only the 
more recent version which contains the "hello there" text.

If you check the rsync manual page and perform some www searches, you will find 
many options and approaches relating to what happens to updated 
files/directories when you run rsync.


----------------------------------
This email is protected by LBackup
http://www.lbackup.org


-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to