Explorer with ArchivistaVM: Restoring files
Egg, 10th March 2014: As already announced in the last blog entry, we are hoping to provide guests backed up with Archivista with an Explorer, so as to be able to extract individual files directly into ArchivistaVM from backed-up data. This blog entry is firstly intended to impart the basic knowledge (as to how it can be done on the root console) and then to briefly introduce the solution in ArchivistaVM.
ArchivistaVM: Opening RAW files on the console
The following remarks are addressed to those wishing to process RAW files under Linux on the console and are intended to aid technical understanding; the second part contains information on how these files can be reviewed in ArchivistaVM.
What do virtualised guests in ArchivistaVM consist of? A minimum of two files: a conf file containing the virtualised “hardware basic data” and a file for the data of each emulated hard drive. The conf file is very simple (around 10 to 20 lines in ANSI-Format); the following concerns the hard drive files and, in particular, those in the RAW format. The RAW format is mostly used because it allows a hard drive to be replicated 1:1 for virtualisation purposes.
The first step is to consider the hard drive layout as the root user. “sfdisk -d” can be used:
sfdisk -d vm-101.raw
# partition table of vm-101-disk.raw
vm-101-disk.raw1 : start= 1, size= 8380415, Id=83, bootable
vm-101-disk.raw2 : start= 8380416, size= 8380416, Id=83
vm-101-disk.raw3 : start= 16760832, size= 16760832, Id=82
vm-101-disk.raw4 : start= 33521664, size= 33581840, Id=83
The start position in the blocks is located immediately behind “start”. So, assuming the fourth partition in the hard drive file is to be opened, the start position is located at Block 33521664. There are 512 bytes per block, so the product to be calculated is 33521664*512. This gives a start position in bytes of 17163091968. The file can now be opened directly using “mount -o loop,offset=xy”.
mount -o loop,offset=17163091968 vm-101-disk.raw /tmp/disk
This allows the fourth partition after /tmp/disk to be mounted. At this point, the files can now be viewed.
Explorer in ArchivistaVM
Should the above information be too console-intensive, click on the “files” tab under “data backup” in ArchivistaVM. This should list all the available backed-up RAW files.
Clicking on a file should now allow the available partitions to be viewed.
Any partition can now be opened directly. An example is given below.
Entries that have a number in brackets following the file name [e.g. zerofree (7336)] are files. All the remaining entries are folders. Clicking on a folder allows the associated sub-folders to be opened. Clicking on a file prepares the file for download.
Note: Clicking on the “Files” tab immediately displays the top level (i.e. all the RAW files).