Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to use 'cp' as a simple but reliable backup tool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to use 'cp' as a simple but reliable backup tool
Authored by: marriott on Feb 17, '10 09:06:56AM

You mention rsync as an alternative, and I've got to highly recommend that you use it instead of cp. The syntax isn't much worse than your cp command, and it is a much more robust and reliable program. You do not need more robustness for your purposes, but if one wanted to extend this solution to a different situation, they may hit a wall with cp. I say that it is more reliable because you can set rsync to check that files were correctly copied, I'm not sure if cp can recover from an unlikely copy error.

Also, you can ensure that everything with working properly with the "--dry-run" option (along with "--verbose" to see everything that's happening), so you can perfect the command without worrying about file loss. Further, the "--backup" option will never delete files on the source machine.



[ Reply to This | # ]