Monday, December 24, 2012

TestDisk: A Tool for Backup and Data Recovery on Linux....

Part II:
As we have learnt in my last blog regarding Data recovery in Windows. In this post we will learn the technique to backup and recover the data on Linux Operating System.
To backup and recover the data we will use the testdisk as a recovery tool.
Step I:-
     get install TestDisk on your Linux Distro
E.g :-
On Fedora: - run following command on your terminal
     sudo yum install testdisk
On Ubuntu:- run following command on your terminal
            sudo apt-get install testdisk
TestDisk checks and recovers lost partitions. It works with following file systems:
          - BeFS (BeOS)
          - BSD disklabel (FreeBSD/OpenBSD/NetBSD)
          - CramFS, Compressed File System
          - DOS/Windows FAT12, FAT16 and FAT32
          - HFS and HFS+, Hierarchical File System
          - JFS, IBM's Journaled File System
          - Linux Ext2 and Ext3
          - Linux Raid
            RAID 1: mirroring
            RAID 4: striped array with parity device
            RAID 5: striped array with distributed parity information
           RAID 6: striped array with distributed dual redundancy information
          - Linux Swap (versions 1 and 2)
          - LVM and LVM2, Linux Logical Volume Manager
          - Mac partition map
          - Novell Storage Services NSS
          - NTFS (Windows NT/2K/XP/2003/Vista)
          - ReiserFS 3.5, 3.6 and 4
          - Sun Solaris i386 disklabel
          - Unix File System UFS and UFS2 (Sun/BSD/...)
          - XFS, SGI's Journaled File System 
Test Disk also backups the file. To back up the files one can use testdisk effectively on Linux Operating System by the following steps:
Linux Operating System by the following steps:
Step II:-
Run testdisk by the command “testdisk” on to the terminal.
Step III:-
After running testdisk command you will get the following testdisk window in the same shell....
fig 1. testdisk

Now for backing up the file you can view it in the log file so press enter on the first option i.e. create.
Now it will show the disk detected (normally it is a hard-disk) 
Fig 2. Proceed

fig 3. press enter

fig 4. select your appropriate partition and press enter

fig 5. select analyse as we are backing up 

fig 6. select appropriate drive to backup and press enter on Backup 

fig 7. if you want to search in other OS (here Windows Vista) then press Y otherwise  press N.

fig 8.Select the disk to be backed up

fig 9. Select Write operation to take the backup

fig 10. Confirm to Write Partition Table
fig 11 Reboot the system
Now your new partition is created and the respective drive is backed up.
To see the log file and backup file you can go into your home folder, there you will find two log files i.e.
To see the contents of that file you may view it through log file viewer.
That's all, now you have back up of your files and you are able to restore it back even if it’s   deleted.