Backup a hard-drive through the CLI.
Dont quite know if this is the right area to post this in but here it goes.
Lately my external 500gb hard drive has been having some read write errors on certain files. If this happens when I'm using Windows then I have to close the program trying to access it and unmount and remount the hard drive to get it working again.
If this happens in Linux I just get a read-write error which is fine because its just a case of clicking "ok".
I just bough a new external hard drive and I am looking for a command which will copy all the files on one hard drive to other while outputting a list of all files which failed to copy (and obviously save me from clicking OK each time).
Would the following command do what I want?
Where FIRST_DRIVE is the root of the old drive and NEW_DRIVE is (unsurprisingly) the new hard drives root directory.
cp -r FIRST_DRIVE NEW_DRIVE 2>>failed_files