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.
- Rename /home to /homebad:
- Copy your backup to /home:
cp -a /homegood/* /home
The -a in the command travels subdirectories recursively and preserves links, mode, ownership, and timestamps.
- Use the new copy of /home for a day or two to make sure it worked properly.
- Delete /homebad:
mv /home /homebad
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.
Comment: