2014/02/10

Linux File Level Recovery: mounting instead of restoring!

If you have ever worked with the other operating system  restore wizard in Veeam, you know that restoring to the original server requires you to add that server to the console. This is because Veeam is agentless but it needs to be able to talk to that server in an efficient way.

A couple of weeks ago I got the question if you would be able to mount the files without copying them. It's a typical problem if you have an in-guest application making it's own backups and you don't want to copy everything, but just extract a bit of data. I was thinking about an helper appliance that would use instant VM recovery to attach the backupped disks to recover files. Then it would export the VMDK via NFS in-guest so that the original server could mount it.

This seemed a big workaround so I thought lets see if I can export it from the FLR appliance itself. Well it's not possible since the appliance is using busybox and no NFS is in there.

After looking around I came up with some cool workaround (well it got me excited but I'm just a techie). Since the FLR appliance does open up SSH, you can actually use SSHFS, a filesystem driver for SSH.

Before we start, know that starting from version 7 you can set the password for the FLR appliance in the credentials manager. Just go to the main menu (blue button in the top left corner) and choose "Manage Credentials"


Once you have started the FLR wizard, you should now be able to login. All partitions shown in the Linux FLR appliance are mounted under /media. My case the partition I'am interested in (or logical volume) is under /media/dm-0 but you can just mount /media if you don't want to login the appliance.





Finally write down the IP of the FLR appliance. You can see it via the VMware tools. This is handy when you used DHCP like I did. In my case it is 172.20.2.66






Now on you main system, you need to have sshfs support installed (as part of the fuse libraries). This depends on the linux version you are running. I'm running Centos and needed to install the EPEL repo. I "borrowed" some of the info from this blog  http://www.centosblog.com/sshfs-how-to-mount-remote-partition-via-ssh-on-centos/

If you don't want to read it, here are the commands to add the EPEL repo  (find the correct EPEL RPM here :https://fedoraproject.org/wiki/EPEL)

yum install wget -y
cd /tmp
wget http://epel.mirror.nucleus.be/6/i386/epel-release-6-8.noarch.rpm
yum install epel-release-6-8.noarch.rpm

After it is added, you can add the sshfs and fuse library

yum install fuse sshfs
modprobe fuse
I created a directory /recovery for mounting the FLR directory. The mount can now be done via the sshfs command
sshfs root@172.20.2.66:/media/dm-0 /recovery
 After this, you should be able to see the files and directory structure you have in your FLR window:






When you are done, just use the umount command, to unmount the volume. Make sure you are no longer browsing the directory

umount /recovery



While testing I used rsync to try to copy a lot of small files to see if it went fast (which was a typical problem in v6.5 but not in v7). Seems to work like a charm!


1 comment:

Note: Only a member of this blog may post a comment.