Well, the hard drive in sonata, my desktop machine at work, is dying a slow death. I saw the writing on the wall a few months ago, and now it’s finally biting the big one. I’m typing on the box now, but it’s slowly getting wonkier and wonkier as it churns out ever more i/o errors, read errors etc.
A new drive is forthcoming, but in the meantime, I’ve managed to back up what’s left of the old drive, so I can restore it onto the new one. And, I’ve found that when it comes to archiving drives with errors, cpio beats tar hands down. I started out doing
tar cvplf - . |
ssh other-box "cd /backup/disk; tar xpf -"
But, it dies as soon as it hits a bad spot.
I ended up doing
find . -xdev -depth -print |
cpio -o --verbose -H newc |
ssh other-box "cd /backup/disk; cpio -id -H newc"
-H option is needed to back up files with inode numbers greater than 65535.
Cpio is even more obfuscated than tar WRT command line options, etc., but it seems to do a better job at disaster recovery.