T. Bryan(?) wrote: >Does anyone have experience with this? > >BTW, the laptop is happily running Debian sarge. I'm planning to use g4u to >ghost the drive (if I can get through the entire disk without fatal disk >errors) to one of my desktop machines so that I can restore it to the new >drive. If anyone knows a better option, I'd love to listen to the voice of >experience. :-) > >---Tom > > Assuming the hard drive isn't full, g4u isn't exactly an efficient way to backup your data (yes, with the help of dd, /dev/zero, and gzip you can cut down on this, see slides from TriLUG backup presentation ~18 month ago by jtower, but there are better ways). A more flexible alternative, which will allow you to easily adjust to a potentially larger hard drive size, would be to use something simpler, like tar over ssh. I'd suggest a command something like this, run from your laptop:
cd / echo "/proc /other/dirs/to/exclude " >> /tmp/exclude.txt tar cvzf - -X /tmp/exclude.txt / | ssh <targethost> cat - \> mybackup.tar.gz Now go get some coffee. This changes you to the root directory, creates a file containing files and directories to exclude from the backup in /tmp/exclude.txt, then uses tar to package up your entire drive, and pumps over ssh to the <targethost>, which simply writes it to a single file, which will be easy to restore to any new drive, of any size. Once you have your new drive in place, boot up to Knoppix or your cdrom recovery boot environment of choice, partition your new drive how you'd like it, then run this command: ssh <targethost> cat mybackup.tar.gz | tar xfvz - This simply does the reverse of the previous tar command, pulling down the file via ssh on standard output, pumping that into tar to extract the data back on to the hard drive. Go get another cup of coffee. If you'd like to increase the speed of the backup and restore, at the expense of information output, you can drop the v from each tar command, and it won't write the name of every file as tar encounters it. Often your terminal writes names to the screen much slower than tar writes files to the disk, and tar actually has to wait on your screen in order to continue. The big advantage over this is that you can easily repartition the drive how ever you'd like to at recovery time. If you had a 6G drive and you replace it with a 40G drive, it'll be a bit tricky to restore that g4u image to a larger partition size. This is not to say it can't be done, but the easiest way it going to be to decompress and mount the g4u image, then use tar or some equivalent copy program. Call me crazy, but that seems to make g4u an unnecessary step of complexity in the overall process. :) If you know you're going to be purchasing a larger geometry drive (and the economics of failing hard drive prices makes that extremely likely), it's best to start with a simple partition-level copy program. Another side advantage is that it's easy to extract individual files from the image should you need to do so (such as your resume, or that term paper you forgot was due), before you have your laptop back up and running. A very valid argument could be made at this point for the dump / restore combination of programs, as opposed to tar, but that discussion is beyond the scope of this email. So, use tar. Love tar. Embrace tar, and it will set you free. Aaron S. Joyner -- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
