Doubts on incremental backup and command repetition

Kevin Korb kmk at sanitarium.net
Thu Sep 3 13:52:25 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This doesn't quite make sense.  Your target and compare-dest dirs are
the same dir (the compare-dest is relative to the target so ../dest is
the same thing).  Also, --backup only matters when rsync is deleting
or overwriting something which it isn't doing.

I would suggest using --link-dest instead of --compare-dest or --backup

On 09/03/2015 08:45 AM, Celso de Sousa Junior wrote:
> Hi,
> 
> I am trying to use rsync for incremental backup and I am facing
> some issues. I would like to ask your help to understand what is
> going on and have the proper command line.
> 
> 1) my goal is
> 
> I the following folders:
> 
> ./dest: file3.txt
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt
> 
> And I would like to have as incremental backup
> 
> ./dest: backup      file1.txt     file2.txt  file3.txt
> 
> ./dest/backup: file1.txt   file10.txt  file2.txt   file20.txt
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt
> 
> 
> However, I got the following. Also, if I repeat the command, the
> files are deleted from /dest.
> 
> ./dest: backup      file1.txt   file10.txt  file2.txt   file20.txt
> file3.txt
> 
> ./dest/backup:
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt
> 
> 
> 
> 2) simulation that I did
> 
> [billqap1:/tmp/edbcdsj/rsynctests]: rsync --backup
> --backup-dir=backup -avi --compare-dest=../dest
> /tmp/edbcdsj/rsynctests/orig/ /tmp/edbcdsj/rsynctests/dest/ sending
> incremental file list
>> f+++++++++ file1.txt f+++++++++ file10.txt f+++++++++ file2.txt 
>> f+++++++++ file20.txt
> 
> sent 283 bytes  received 92 bytes  750.00 bytes/sec total size is 0
> speedup is 0.00 [billqap1:/tmp/edbcdsj/rsynctests]: ls -R 
> backup-fullincremental.sh   backup-fullincremental2.sh dest
> orig
> 
> ./dest: backup      file1.txt   file10.txt  file2.txt   file20.txt
> file3.txt
> 
> ./dest/backup:
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt 
> [billqap1:/tmp/edbcdsj/rsynctests]: rsync --backup
> --backup-dir=backup -avi --compare-dest=../dest
> /tmp/edbcdsj/rsynctests/orig/ /tmp/edbcdsj/rsynctests/dest/ sending
> incremental file list
> 
> sent 123 bytes  received 12 bytes  270.00 bytes/sec total size is 0
> speedup is 0.00 [billqap1:/tmp/edbcdsj/rsynctests]: 
> [billqap1:/tmp/edbcdsj/rsynctests]: 
> [billqap1:/tmp/edbcdsj/rsynctests]: ls -R backup-fullincremental.sh
> backup-fullincremental2.sh dest                        orig
> 
> ./dest: backup     file3.txt
> 
> ./dest/backup:
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt 
> [billqap1:/tmp/edbcdsj/rsynctests]:
> 
> Thanks, Regards, CJ
> 
> 
> 
> Em Quinta-feira, 3 de Setembro de 2015 9:13, Celso de Sousa Junior 
> <celso_de_sousa_junior at yahoo.com.br> escreveu:
> 
> 
> Hi,
> 
> I am trying to use rsync for incremental backup and I am facing
> some issues. I would like to ask your help to understand what is
> going on and have the proper command line.
> 
> 1) my goal is
> 
> I the following folders:
> 
> ./dest: file3.txt
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt
> 
> And I would like to have as incremental backup
> 
> ./dest: backup      file1.txt     file2.txt  file3.txt
> 
> ./dest/backup: file1.txt   file10.txt  file2.txt   file20.txt
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt
> 
> 
> However, I got the following. Also, if I repeat the command, the
> files are deleted from /dest.
> 
> ./dest: backup      file1.txt   file10.txt  file2.txt   file20.txt
> file3.txt
> 
> ./dest/backup:
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt
> 
> 
> 
> 2) simulation that I did
> 
> [billqap1:/tmp/edbcdsj/rsynctests]: rsync --backup
> --backup-dir=backup -avi --compare-dest=../dest
> /tmp/edbcdsj/rsynctests/orig/ /tmp/edbcdsj/rsynctests/dest/ sending
> incremental file list
>> f+++++++++ file1.txt f+++++++++ file10.txt f+++++++++ file2.txt 
>> f+++++++++ file20.txt
> 
> sent 283 bytes  received 92 bytes  750.00 bytes/sec total size is 0
> speedup is 0.00 [billqap1:/tmp/edbcdsj/rsynctests]: ls -R 
> backup-fullincremental.sh   backup-fullincremental2.sh dest
> orig
> 
> ./dest: backup      file1.txt   file10.txt  file2.txt   file20.txt
> file3.txt
> 
> ./dest/backup:
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt 
> [billqap1:/tmp/edbcdsj/rsynctests]: rsync --backup
> --backup-dir=backup -avi --compare-dest=../dest
> /tmp/edbcdsj/rsynctests/orig/ /tmp/edbcdsj/rsynctests/dest/ sending
> incremental file list
> 
> sent 123 bytes  received 12 bytes  270.00 bytes/sec total size is 0
> speedup is 0.00 [billqap1:/tmp/edbcdsj/rsynctests]: 
> [billqap1:/tmp/edbcdsj/rsynctests]: 
> [billqap1:/tmp/edbcdsj/rsynctests]: ls -R backup-fullincremental.sh
> backup-fullincremental2.sh dest                        orig
> 
> ./dest: backup     file3.txt
> 
> ./dest/backup:
> 
> ./orig: file1.txt   file10.txt  file2.txt   file20.txt 
> [billqap1:/tmp/edbcdsj/rsynctests]:
> 
> Thanks, Regards, Celso
> 
> 
> 
> 
> 

- -- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
- -*~
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
- -*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlXoUJkACgkQVKC1jlbQAQd/awCdFRIH+b4CY4iMur5H/fSrbUve
vSkAn3x2OeVbgoNV8P+UeBrQwcMyQ7MW
=E/US
-----END PGP SIGNATURE-----



More information about the rsync mailing list