Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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 .... :}
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.