Several of our development servers have flaky SSDs that need to be replaced. The machines are still usable, but we see lots of errors in
dmesg, and every once in a while they need to be rebooted because of I/O errors. We have new SSDs (proven to be reliable in other servers) ready to be installed.
The servers run both Ubuntu 10.04 and 12.04.
There are about half a dozen different accounts that ideally would be restored to the new disks.
Much of the data is in git repositories, but there are also many files not controlled by git.
Many extra packages have been installed, most of which are documented in the various readme files of the projects.
There is still time to make backups of any and all files, and plenty of other servers on which to store the backups.
If restoration is too difficult, we can simply pull down the git repositories and reconfigure the new systems manually, though we would prefer not to.
What I am looking for are recommendations for approaches to restoring the machines to their current state after the new drives go in. Some more specific questions:
Should I just tar up
If I tar up
/home, how do I preserve the user IDs?
Is it better to just tar up individual accounts (
tar zcvf user.tgz /home/user/*) and restore them after adding each user to the new system?
I am hoping that there are standard approaches to this problem I can take. I read this question, but it wasn't quite my problem. This other question recommends clonezilla or
dd. Is that the way to go? I am a little leery of cloning the disk because I want to avoid propagating corrupt files that went bad due to the flaky nature of the current disks.