Little Girl's Mostly Linux Blog

RestoreHome

Restore Home

This page was last updated on October 11, 2009.

In this example, the backed up copy is in the /homegood directory. Replace /homegood with the path to your backup when following the steps.

  1. Rename /home to /homebad:
  2. mv /home /homebad
  3. Copy your backup to /home:
    cp -a /homegood/* /home

    The -a in the command travels subdirectories recursively and preserves links, mode, ownership, and timestamps.

  4. Use the new copy of /home for a day or two to make sure it worked properly.
  5. Delete /homebad:
  6. rm -rf /homebad

    This deletes the directory and its contents without confirmation. If you’d rather be asked for confirmation, use rm -r /homebad instead.


Obligatory Happy Ending

And they all lived happily ever after. The end.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Comment:

Create a free website or blog at WordPress.com.