As Matt pointed out, the rsync "--backup-dir" option will do exactly what
you requested. However, you may also be interested in the "--link-dest"
option.

This rsync "--link-dest" option is used by LBackup. This option instructs
rsync to create hard links for files which have not changed. The result,
in most situtations is a reduction in the space requirmnets for each
backup snapshot.

If you are planning to write a backup system, script or system which uses
rsync, then I would suggest that you read the following document, written
by Mike Rubel :
http://www.mikerubel.org/computers/rsync_snapshots/

In addition, you may find the Link-Backup project of interest. Link-Backup
in some situations is able to further reduce the space requirments of each
backup snapshot. This is done by tracking files as they move within the
file system and the use of hard links :
http://www.scottlu.com/Content/Link-Backup.html

Finally, the LBackup may be of interest to you. This is particularly
ture, if you want to quickly get your backup running. Configuring LBackup
should take no more than 10 miniutes. Also, if your machine is configured
to send emails, then it should take only a couple more miniutes to
configure LBackup to email you the backup reports. There are screen casts
online to help you with get started with your first backup :
http://www.lucidsystems.org/tools/lbackup

Hope this information is helpful. All the best with your backup.



================================================
Disclaimer : I am an active developer on the LBackup project.


>> I have got three folders:
>> - /home/backup/2008-10-20 - place for differential backup
>> - /mnt/for_backup - folder with files for backup
>> - /home/backup/2008-10-01 - place where the last full backup is
>>
>> My question: is below command prepared correctly to make differential
>> backup?
>>
>> rsync -avPbn --backup-dir=/home/backup/2008-10-20/ --exclude "System
>> Volume Information" --exclude "RECYCLER" /mnt/do_backup
>> /home/backup/2008-10-01

>
>No. --backup-dir does not do what you think it does. To make a forward
>differential backup, you want to use --compare-dest:
>
>rsync -avPbn --compare-dest=/home/backup/2008-10-01/ \
> --exclude "System Volume Information" --exclude "RECYCLER" \
> /mnt/do_backup /home/backup/2008-10-20
>
>Consider whether you want a trailing slash on the source; see the second
>and third examples in the "USAGE" section of the man page.
>
>Matt
>


--
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