NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
winger
Sep 21, 2011Tutor
How does RSYNC "verify" integrity of a backup???
I have performed a factory reset my ReadyNAS Pro Pioneer (RNPP) unit. and now want to ensure the restore of the original data from an external USB drive (connected to the NAS' USB port) is copied without any data corruption. I am trying to confirm color=#0000FF]whether RSYNC is a good tool to use to verify the copied data's integrity[/color].
I have ready many posts that suggest using RSYNC to verify a backup. One such example:
viewtopic.php?f=66&t=51339&p=292769
My questions are:'
1) After the initial restore to the RNPP unit (using FrontView's backup job, Source=Share-USBDrive; Target=Share-RNPP Share Drive), I set the backup type to RSYNC.
Do I then perform a FULL backup again?
2) The expectation is nothing changes during this first RSYNC backup. Question - so, how does RSYNC actually verify the backup? Does it to a byte-for-byte comparison or just a date/time comparison?
I have ready many posts that suggest using RSYNC to verify a backup. One such example:
viewtopic.php?f=66&t=51339&p=292769
mdgm wrote: ...
After doing the backup to the USB disk you can verify it using a Rsync backup to USB disk
My questions are:'
1) After the initial restore to the RNPP unit (using FrontView's backup job, Source=Share-USBDrive; Target=Share-RNPP Share Drive), I set the backup type to RSYNC.
Do I then perform a FULL backup again?
2) The expectation is nothing changes during this first RSYNC backup. Question - so, how does RSYNC actually verify the backup? Does it to a byte-for-byte comparison or just a date/time comparison?
23 Replies
Replies have been turned off for this discussion
- wingerTutor
ewok wrote: Rsync, by default, will use the timestamp and filesize to determine if a file has changed. The Backup Manager has no facility to use rsync checksums, but feel free to create a post in the Feature Requests forum.
From the rsync man page:
Rsync finds files that need to be transferred using a "quick check"
algorithm (by default) that looks for files that have changed in size
or in last-modified time.
Thanks for responding, Ewok.
Do you know the answer to my question above (when using the FrontView RSync), which is:.... Will even the slightest corruption result in a file size difference that can/will be detected by the Rsync process?
For your suggestion on placing a post in the requested features section, will do. - ewokNETGEAR Expert
winger wrote:
Do you know the answer to my question above (when using the FrontView RSync), which is:.... Will even the slightest corruption result in a file size difference that can/will be detected by the Rsync process?
The answer is no. Consider, for example, the transfer of a text file that contains "hello world". If the file gets corrupted such that the file now contains "hallo wurld", the filesize and timestamp would still be the same. The best you could do without opening up the ReadyNAS would probably be to run checksumming software from your PC, but that would involve a lot of network traffic. An interesting idea for an addon would be one that does an md5sum on every file in the data volume and makes the output available. - or run rsync with -c and then it will compare checksums of both source and destination to determine whether to copy the file/delta data.
:) - ewokNETGEAR ExpertOf course, that would be a good option, but you'd have to open up the NAS. :)
- wingerTutor
ewok wrote: winger wrote:
Do you know the answer to my question above (when using the FrontView RSync), which is:.... Will even the slightest corruption result in a file size difference that can/will be detected by the Rsync process?
The answer is no. Consider, for example, the transfer of a text file that contains "hello world". If the file gets corrupted such that the file now contains "hallo wurld", the filesize and timestamp would still be the same. The best you could do without opening up the ReadyNAS would probably be to run checksumming software from your PC, but that would involve a lot of network traffic. An interesting idea for an addon would be one that does an md5sum on every file in the data volume and makes the output available.
I wonder what checksum freefilesync uses. I just completed freefilesync checks on over 800+ GB of data (this took a few days!), and only two files were found to be different. I simply re-copied (teracopy) those two back files to the NAS and used freefilesync to re-check. - wingerTutor
ewok wrote: TeknoJnky wrote: or run rsync with -c and then it will compare checksums of both source and destination to determine whether to copy the file/delta data.
:)
Of course, that would be a good option, but you'd have to open up the NAS. :)
Guys, so I have SSH enabled now. Is this Rsync with -c option something I can run directly from the NAS using Putty (comparing NAS data versus data on a USB-connected HardDrive) ? If yes:
1) what are the exact commands to run for my setup? Here is one set of folders I would want to compare:
NAS:
Share name = Data01
USB Harddrive:
NAS volume name: USB_HDD_3
Folder: /backups/Data01
2) would running this -c Rsync process produce an output of differences ? or will the Rsync process just copy (from the USB to the NAS) when differences are detected? - ewokNETGEAR Expert
TeknoJnky wrote: or run rsync with -c and then it will compare checksums of both source and destination to determine whether to copy the file/delta data.
:)
One problem I see with this is that if rsync detects differences due to corruption, it really doesn't know on which side the corruption exists. For example, if the corruption exists on the source side, then it will just copy the corrupted file over to the destination. - yes, the source always takes precedence, but that would be the same regardless if backed up via -c or by timestamp/size.
- I have no way to verify if it did or didn't work, but putting --checksum in the rsync exclusion fields didn't cause any errors and in theory would be passed along to the backup job command line

- wingerTutor
Maybe I can test this. The question is, how can I get two files, maybe different only by a bit or two AND also have same date/timestamp last updated?TeknoJnky wrote: I have no way to verify if it did or didn't work, but putting --checksum in the rsync exclusion fields didn't cause any errors and in theory would be passed along to the backup job command line 
So, that "--checksum", where is the "-c" ? (btw, I am not a programmer, by any means.)
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!