backup option

Henri Shustak
2010-08-12T02:46:07Z

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