image05 image06 image07

300x250 AD TOP

Feature Label Area

Thursday, 6 March 2014

Tagged under: ,

Know how to recover Lost Data on Unix

Unlike any other applications, UNIX was developed for enhanced computing. In fact, UNIX is a multitasking computer operating system and well characterized by different features that allows usage of plain text for storing data and a hierarchical file system. Definitely, there are many machines using Microsoft file systems, but UNIX file systems have been in this field much longer. UNIX operating systems have provided stable environments for companies. In fact, most of the servers that are part of the infrastructure of the Internet are making the most utilization of a variant of the UNIX operating system, but there are incidents when data stored in Unix operating system too gets corrupt. However, even if a situation arises where you got to restore the damaged or inaccessible data on Unix, then too you don’t have to worry.

To restore data on Unix, you got to take help of snapshots. In Unix, a snapshot is nothing more than a read-only copy of the entire file system and generally entire files are contained in the file system. The content of each snapshot replicates nothing more than the state of the file system at the time the snapshot was created. It is easy to navigate through each snapshot as your directories/folders and files gets appear as they were at the time when snapshot was created. 

Any individual who stores files on the EGR network space can easily access snapshots and eventually restore files. The following procedure shows an example to recover a file located in a specific folder.
Go to the directory where you actually desire the restored file to be stored once the file gets recovered. Now, within this and all directories, there is a hidden directory called ".snapshot". 

Note: This directory does not appear with "ls" using any options, but is accessible with "cd".
<71 scully:~ >cd .snapshot
<72 scully:~/.snapshot >pwd

Note: However, in case you are just not sure about the location of the file(s) you are attempting to recover, remember that you can change into the .snapshot directory then move into the .snapshot directory/folder where the file you want to recover is stored.
  • Type ls and you will be able to view the hourly, nightly and weekly snapshot archives.
  • Type ls –lu and you will be able to view the timestamps associated with the creation of each of the snapshots.
The timestamps will assist you in the selection of the appropriate snapshot to use to restore your file(s).
Note: These timestamps are an approximation. Though, you got to remember that if there have not been any modification to file(s) in your directory a new snapshot will not be created.
  • Change to the snapshot directory that you consider contains the version of the file(s) you desire to recover.
For example, "cd hourly.2". The most recent backup copy has the lowest value (i.e., hourly.0 is the most recent, and hourly.22 is the oldest).
Now, if you type "pwd", you will be able to view the two directory levels below the directory in the active file system.
<73 scully:~/.snapshot/hourly.2 >pwd

<74 scully:~/.snapshot/hourly.2 >ls -a
... file1 file2 file3
  • To overwrite your current file with the file that you want to restore and recover, just ensure you simply copy it to its original location.
For a copy of the file, use the cp command as follows:
<75 scully:~/.snapshot/hourly.2 >cp file2 ~/.
  • In order to save the recovered file to a different file name, so that you could easily distinguish it from the current active file, use the following command:
<75 scully:~/.snapshot/hourly.2 >cp file2 ~/file2.R
  • Return to the active file system and finally chances are high that you would be able to view your file.
<76 scully:~/.snapshot/hourly.2 >cd ~
<77 scully:~ >pwd

<78 scully:~/path >ls -a
... file1 file2 file3

Nevertheless, in case by opting this manual method, you are still not able to recover the lost data then take help of a third party Unix data recovery tool. Such application identifies the device, identifies all the partition(s) on the inaccessible disk. It then displays the file structure along with the data area of the inaccessible drive and recover files and directories. Using such application, one can easily perform volume recovery of damaged Super Block or on systems with damaged VTOC. Adding to that, a user can also easily copy the recovered file to the desired location on the preferred drive. For further information, you can visit  our official link and know more about the product and its usage :