[opensuse] rsync like function need
I should know this, but .. I'm moving hundreds of thousands of files from USB drives to a new destination drive. I've used rsync to make a copy of the files which is great. But I need to ensure all the files are exact copies. I don't think rsync has a "hash destination and report disagreements with source" feature. Is there a tool for doing that? fyi: I have a windows cmd line tool for doing this, but I'd rather work in linux. Thanks Greg -- Greg Freemyer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On December 6, 2016 8:12:20 PM PST, Greg Freemyer <greg.freemyer@gmail.com> wrote:
I should know this, but ..
I'm moving hundreds of thousands of files from USB drives to a new destination drive.
I've used rsync to make a copy of the files which is great.
But I need to ensure all the files are exact copies. I don't think rsync has a "hash destination and report disagreements with source" feature.
Is there a tool for doing that?
fyi: I have a windows cmd line tool for doing this, but I'd rather work in linux.
Thanks Greg -- Greg Freemyer
Doesn't rsync hash files on both ends to find which files need to be synced? If so, wouldn't another rsync run find any differences? Why would you need another tool? -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2016 11:34 PM, John Andersen wrote:
Greg Freemyer
Doesn't rsync hash files on both ends to find which files need to be synced?
If so, wouldn't another rsync run find any differences?
Why would you need another tool?
Indeed. From the man page: -c, --checksum ... Note that rsync always verifies that each transferred file was correctly reconstructed on the receiving side by checking a whole-file checksum that is generated as the file is transferred, but that automatic after-the-transfer verification has nothing to do with this option’s before-the-transfer "Does this file need to be updated?" check. Note from that: rsync *always* verifies ... after the transfer. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-07 13:26, Anton Aylward wrote:
On 12/06/2016 11:34 PM, John Andersen wrote:
Greg Freemyer
Doesn't rsync hash files on both ends to find which files need to be synced?
If so, wouldn't another rsync run find any differences?
Why would you need another tool?
Indeed. From the man page:
-c, --checksum ... Note that rsync always verifies that each transferred file was correctly reconstructed on the receiving side by checking a whole-file checksum that is generated as the file is transferred, but that automatic after-the-transfer verification has nothing to do with this option’s before-the-transfer "Does this file need to be updated?" check.
Note from that: rsync *always* verifies ... after the transfer.
Yes. You can do a second run with checksum enabled, and it will compare the checksums at both sides, again. I do this for archival media. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
* Greg Freemyer <greg.freemyer@gmail.com> [2016-12-06 22:13]:
I should know this, but ..
I'm moving hundreds of thousands of files from USB drives to a new destination drive.
I've used rsync to make a copy of the files which is great.
But I need to ensure all the files are exact copies. I don't think rsync has a "hash destination and report disagreements with source" feature.
Is there a tool for doing that?
fyi: I have a windows cmd line tool for doing this, but I'd rather work in linux.
I've used something like the following: $ rsync -n -cv [other rsync args...] do to the comparison. The "-c" flag directs rsync to use a 128-bit checksum to compare the files. Of course, "-n" inhibits any actual copying. I also generally use the "--log-file=<log-file>" arg to direct the output in to a file instead of the terminal. Using the "-c" arg can be rather slow, but more certain than relying on file size and mtime only. Hope this helps!
Thanks Greg
--Phil -- Philip Amadeo Saeli psaeli@zorodyne.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, Dec 6, 2016 at 11:49 PM, Philip Amadeo Saeli <psaeli@zorodyne.com> wrote:
* Greg Freemyer <greg.freemyer@gmail.com> [2016-12-06 22:13]:
I should know this, but ..
I'm moving hundreds of thousands of files from USB drives to a new destination drive.
I've used rsync to make a copy of the files which is great.
But I need to ensure all the files are exact copies. I don't think rsync has a "hash destination and report disagreements with source" feature.
Is there a tool for doing that?
fyi: I have a windows cmd line tool for doing this, but I'd rather work in linux.
I've used something like the following:
$ rsync -n -cv [other rsync args...]
do to the comparison. The "-c" flag directs rsync to use a 128-bit checksum to compare the files. Of course, "-n" inhibits any actual copying. I also generally use the "--log-file=<log-file>" arg to direct the output in to a file instead of the terminal.
Using the "-c" arg can be rather slow, but more certain than relying on file size and mtime only.
Hope this helps!
-- Philip Amadeo Saeli psaeli@zorodyne.com
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Thanks very much. That seems to be exactly what I was looking for. I'm not sure how I didn't know about that already. Greg -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday 2016-12-07 05:12, Greg Freemyer wrote:
Date: Wed, 7 Dec 2016 05:12:20 From: Greg Freemyer <greg.freemyer@gmail.com> To: suse <opensuse@opensuse.org> Subject: [opensuse] rsync like function need
I should know this, but ..
I'm moving hundreds of thousands of files from USB drives to a new destination drive.
I've used rsync to make a copy of the files which is great.
But I need to ensure all the files are exact copies. I don't think rsync has a "hash destination and report disagreements with source" feature. Hi,
You can use rsync using the --checksum (short -c) option manpage: -c, --checksum This changes the way rsync checks if the files have been changed and are in need of a transfer. Without this option, rsync uses a "quick check" that (by default) checks if each file’s size and time of last modification match between the sender and receiver. This option changes this to compare a 128-bit checksum for each file that has a matching size.
Is there a tool for doing that?
fyi: I have a windows cmd line tool for doing this, but I'd rather work in linux.
Thanks Greg -- Greg Freemyer
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (6)
-
Anton Aylward
-
Carlos E. R.
-
Greg Freemyer
-
John Andersen
-
Paul Neuwirth
-
Philip Amadeo Saeli