Re: rsync read block size

2009-05-22 Thread Ming Zhang
it become a BDD question now.. ;) On Fri, May 22, 2009 at 5:37 PM, Matthias Schniedermeyer wrote: > On 22.05.2009 16:25, Ming Zhang wrote: >> Hi All >> >> We want to use rsync to backup a live Berkley db to a remote site. BDB >> has a requirement that read has to be in the unit of db page size. S

Re: rsync read block size

2009-05-22 Thread Matthias Schniedermeyer
On 22.05.2009 16:25, Ming Zhang wrote: > Hi All > > We want to use rsync to backup a live Berkley db to a remote site. BDB > has a requirement that read has to be in the unit of db page size. So > wonder how could we make sure that rsync can follow that? If we need > to change the code, where we s

rsync read block size

2009-05-22 Thread Ming Zhang
Hi All We want to use rsync to backup a live Berkley db to a remote site. BDB has a requirement that read has to be in the unit of db page size. So wonder how could we make sure that rsync can follow that? If we need to change the code, where we should begin to look at? Thanks! Ming -- Please us

Re: Rolling algorithm vs CRC

2009-05-22 Thread Jamie Lokier
Hasanat Kazmi wrote: > Hello, > I have previously mailed on list that I am trying to port rsync to NT. I was > wondering that whether CRC can be used to find check sums rather then rolling > algorithm. I havnt found any document on web comparing rolling algorithm with > CRC. It will only find non-

Re: Rolling algorithm vs CRC

2009-05-22 Thread Jamie Lokier
Ryan Malayter wrote: > On Fri, May 22, 2009 at 9:02 AM, Hasanat Kazmi wrote: > > Hello, > > I have previously mailed on list that I am trying to port rsync to NT. I was > > wondering that whether CRC can be used to find check sums rather then > > rolling algorithm. I havnt found any document on we

Re: Rolling algorithm vs CRC

2009-05-22 Thread Ryan Malayter
On Fri, May 22, 2009 at 9:02 AM, Hasanat Kazmi wrote: > Hello, > I have previously mailed on list that I am trying to port rsync to NT. I was > wondering that whether CRC can be used to find check sums rather then > rolling algorithm. I havnt found any document on web comparing rolling > algorithm

Re: Does rsync detect file corruption?

2009-05-22 Thread Daniel Carrera
Matthias Schniedermeyer wrote: Exactly. But you can (periodically) add "-c", then rsync while checksum the whole content of all files. Thanks. I'll add a -c for the Saturday backup. But IF you have (or suspect) such type of corrution, you have have an even greater problem: Your hardware is

Re: Does rsync detect file corruption?

2009-05-22 Thread Matthias Schniedermeyer
On 22.05.2009 13:43, Daniel Carrera wrote: > Hello, > > Suppose that every day cron runs this: > > rsync -a --times --delete $HOME /my/backups/dir/latest > > > In general, rsync will only update a file if it has been modified. Now, > imagine that one of the files becomes corrupted in the backup d

Rolling algorithm vs CRC

2009-05-22 Thread Hasanat Kazmi
Hello, I have previously mailed on list that I am trying to port rsync to NT. I was wondering that whether CRC can be used to find check sums rather then rolling algorithm. I havnt found any document on web comparing rolling algorithm with CRC. -- hasanatka...@gmail.com "I hate Capitalism,so natu

Re: weird access function in rsync code.

2009-05-22 Thread Daniel.Li
On Fri, 2009-05-22 at 13:10 +0200, Paul Slootman wrote: > On Fri 22 May 2009, Daniel.Li wrote: > > On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > > > > > > > > access("/home/admin/test",F_OK) > > > > > > > > Result: Failed with -1, just mean the test folder is NOT existed, but it > > >

Re: Does rsync detect file corruption?

2009-05-22 Thread Giorgos Gaganis
Hello Daniel The default check is the time of last modification and size so if your corruption also leaves the file size the same the file will not be included for update. You can use the --checksum option that also checks the file contents but this will significantly increase your disk I/O.

Re: Does rsync detect file corruption?

2009-05-22 Thread Daniel Carrera
Ok, thanks. Do you have any idea if a corruption that leaves the file size intact is common or rare? What I could do is add the --checksum option only once a week: if [ `date +%a` = "Sat" ]; then OPT='-a --numeric-ids --delete --times --checksum' else OPT='-a --numeric-ids --del

Re: Does rsync detect file corruption?

2009-05-22 Thread Paul Slootman
On Fri 22 May 2009, Daniel Carrera wrote: > > In general, rsync will only update a file if it has been modified. Now, > imagine that one of the files becomes corrupted in the backup directory, > but the timestamp hasn't changed. Will rsync detect this? Not in the usual case. You may want to

Does rsync detect file corruption?

2009-05-22 Thread Daniel Carrera
Hello, Suppose that every day cron runs this: rsync -a --times --delete $HOME /my/backups/dir/latest In general, rsync will only update a file if it has been modified. Now, imagine that one of the files becomes corrupted in the backup directory, but the timestamp hasn't changed. Will rsync

Re: weird access function in rsync code.

2009-05-22 Thread Paul Slootman
On Fri 22 May 2009, Daniel.Li wrote: > On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > > > > > > access("/home/admin/test",F_OK) > > > > > > Result: Failed with -1, just mean the test folder is NOT existed, but it > > > does exist. > > > Perhaps at that point rsync has chroot()ed somew

Re: weird access function in rsync code.

2009-05-22 Thread Daniel.Li
On Fri, 2009-05-22 at 10:47 +0200, Paul Slootman wrote: > On Fri 22 May 2009, Daniel.Li wrote: > > > When I use "access" function to find out if the folder exist in rsync > > code. I found that it's will NOT act as normal function. > > > > I have tried 2 test: > > > > a) embedded in rsync functi

Re: weird access function in rsync code.

2009-05-22 Thread Paul Slootman
On Fri 22 May 2009, Daniel.Li wrote: > When I use "access" function to find out if the folder exist in rsync > code. I found that it's will NOT act as normal function. > > I have tried 2 test: > > a) embedded in rsync function "int recv_files(int f_in, char > *local_name)" and hard coded with f

Re: weird access function in rsync code.

2009-05-22 Thread Daniel.Li
Really weird! root folder is OK, but others returned -1. Why? I'm in recv_files access / ret = 0 I'm in recv_files access /home ret = -1 I'm in recv_files access /home/admin ret = -1 I'm in recv_files access /home/admin/test ret = -1 Thoese folder does exist. I use rsync --daemon to launch the p

weird access function in rsync code.

2009-05-22 Thread Daniel.Li
Dear List, When I use "access" function to find out if the folder exist in rsync code. I found that it's will NOT act as normal function. I have tried 2 test: a) embedded in rsync function "int recv_files(int f_in, char *local_name)" and hard coded with following line. access("/home/admin/test