cp or rsync
What program should I use to copy large folders with important data, cp or rsync? From what I have read, rsync runs checks to make sure the files it creates were copied correctly. Does cp do this? Does gnome run checks when you copy files from the gui?
I frequently transfer files from my main hard disk to my external hard disk and I want to make certain that the copies I am creating are correctly generated, since some of the things being copied are large backup tar files that I won't open unless I need to restore something (so, if there is a copy error, it could go unnoticed for a long time).
Thank you for any help,
cpio is a very good choice for local file-systems, even though
rsync should be sufficiently thorough; it would definitely be
faster since you can set it up to only copy files that were
changed since they last got copied .... :}
Here are some options for you.
I have to do this all the time & so I have researched to a degree, at least to my satisfaction.
There are gui tools for this, but the easiest thing to do is use rsync. rsync will do some manner of file integrity check. With compressed archives I also recommend the use of a file checksum utility, like md5sum or sha*.
My method entails:
1> Compress the archive.
2> Checksum the compressed archive, and copy the checksum string to a text file.
3> Make a directory, labeled appropriately, with the archive & checksum text file.
4> Use rsync to copy it to backup location.
5> Verify integrity of the new file in backup location using checksum.
If the files are really really important I checksum every file prior to compressing & then use the procedure above.
For the truly paranoid, write a script that checksums all the files in all/some backup locations (I use several physical disks in different locations for backup all containing the same data) & compares the output. Then include protocol in the event that the checksums don't match, like asking _you_ what to do, or some form of automation.
If you want to see some of the available tools, search "backup" at gentoo-portage. I am a fan of backuppc & rdiff-backup. In general, the best ones use librsync anyway. Hope this helps!
|All times are GMT -5. The time now is 07:40 AM.|