November 13, 2009

Backing Up home Directory

A few days back, I suddenly started facing many problems, all at the same time. Many of my software started misbehaving, and eth0 (ethernet) failed to connect (two instances). Later, on booting, an error showed up saying that /home couldn't be found. Thankfully, I had another account. Using that account, I did the following.

1. Open the terminal, and type,

oracle@varsha-laptop:~$ su

Enter the root password, when prompted.

2. Go to your home directory, and list all the files and directories.

root@varsha-laptop:/usr/lib/oracle/xe# cd /home
root@varsha-laptop:/home# ls
lost+found samba varsha varsha1

3. See if directories of your home directory are accessible using cd.

root@varsha-laptop:/home# cd varsha
root@varsha-laptop:/home/varsha# ls

4. Estimate file size.

root@varsha-laptop:/home/varsha# du -sh /home/varsha
12G /home/varsha

5. Copy home directory to another disk having free space.

root@varsha-laptop:/home/varsha# cp -R /home/varsha /media/disk-1

You can now install Linux, and copy the important documents to the home directory.

No comments:

Post a Comment