Restoring from a tarball

Joe Zeff joe at zeff.us
Tue Oct 18 18:24:34 UTC 2011


Recently, my sister's Ubuntu box had a puzzling network problem: it 
wouldn't accept any DNS numbers but could ping by IP.  She didn't have a 
backup, recent or otherwise, and there was no practical way to install 
any.  I created the directory /backup, and in that directory ran this 
command:

sudo tar -cjf marcia.tar.bz2 /home/marcia

Then, I used ftp to transfer it to my laptop, as there's more room on it 
than on my desktop.

This was a Good Thing!  Upgrading from a LiveCD worked, but it wouldn't 
boot.  Nuke/pave/reinstall, ditto.  After checking, the boot failure 
message told my hardware guru that her hard drive's failed, and that 
this might have been the root cause of the other issue.  Now, of course, 
we need to replace it, reinstall and restore from backup.  Assuming that 
the username hasn't changed and that I've put the backup in the same 
place that I made it, what arguments to I give tar to make it put 
everything back exactly where it was?  I ask because I once got it wrong 
and ended up with everything in a subdirectory instead of where it 
belonged, and I'd rather Get It Right the first time.


More information about the users mailing list