2013/01/18

Veeam File Restore and Permissions (III)

In this last series, I'll describe some problems I encountered when doing file restores with Veeam B&R / Centos 6.3 . I used a very basic centos install and so most people will not encounter these problems. But just in case you do, here are the solutions. Remember, these are Centos solutions but the problems should be resolved in a similar way on other distributions. Please add your solution for other distributions as a comment if you find them.

First Problem is the "Error during copy of file: STDERR: SCP bash: scp: command not found" error. Basically the error says everything. We don't have scp installed because I choose for a base install.

To solve it, just install the openssh-clients package. You can do this by executing "yum install openssh-clients". Afterwards you will be able to browse the Linux server successfully


The second problem occurs when you execute the restore. The error is something like "Failed to connect to agent , EP :2500 A connection attempt failed because the connected party did not properly respond ..."

Again the error says it all. The firewall is blocking the request. So what ports does Veeam use? Well you can specify the range when you add/edit the Linux server.

If you are in the SSH connection section, you can click the advanced option. There you can set the port range. I actually modified the range to 2500 to 2520. I'm not saying it is a best practice but this way, I don't have to open/reserve to much ports.

So now connect to your Linux server and configure your firewall. I like to use the Firewall tui which can be installed by executing "system-config-firewall-tui" . Again if you don't have it, install it via "yum  install system-config-firewall-tui"


 Click the customize button to edit your firewall rules


Click Forward until you can manually add rules. Add a new rule.


Now add your port range, in this case 2500-2520 (if you use the default options enter 2500-5000). As protocol, enter tcp.

If you now click Ok, Close and the Ok your firewall should be set. If you look at "/etc/sysconfig/iptables", you will see that a new rule has been added.

You should now be able to restore your files.


Veeam File Restore and Permissions (II)

In this second post we will look at Linux guest file restores via Veeam B&R. During this test I encountered some problems because of missing packages/firewall rules on Centos. I will discuss them in the third post.

 Again we have created a special file on a Linux VM called centos02. The file is "with_permissions.txt" and is owned by a user/group eskimo. We also chmod'ed it with "266" permissions (which doesn't make any sense but is just for the test)



We proceed by creating a backup of the Linux VM. If we launch the Other Guest File Restore wizard, Veeam will automatically deploy a small FLR appliance which will read the disk. This is all transparant for the user and when it is done, the file browser will pop up


With Linux there is only one option "Copy to". When you select it, you can see a similar "Preserve" option. However you can not select it. This is because you need to add the Linux server first to B&R.


To do this, go to the Backup Infrastructure section. There add a new server to your managed servers. At the bottom you can select to add a Linux server.


The wizard is rather easy so just add the IP, Name and credentials and you should be all set up.

If you did this successfully, you should see your server added to the managed server. In my case I added the server "10.140.121.52"


Now if you go back to the Guest file restore wizard, you can select your server in the Server destination field. If you do this, you should be able to now select the "Preserve" option. Then browse the Linux server to select your destination


In this case I selected to restore to /home/eskimo/recovery. Make sure to select the "Preserve" option

If you then click the restore option, the file should be restored successfully.


If we check the permissions in the recovery directory, we can see that the file is successfully restored. You can see that the file has an 266 permission ACL and is owned by eskimo user/group.




Veeam File Restore and Permissions (I)

Yesterday I was wondering about restoring guest files with Veeam B&R and their corresponding file permissions. So I thought to myself, lets just test it out. The test contained a Windows file restore as well as a Linux file restore which I will discuss in part 2

For the windows machine I started with a machine called SP1. To do a successful test we have to create a file with special permissions. In this example we will add a local user "localtestuser" to the access list. This user has only be defined locally. You can also see that the "Date modified" is 15:13


After the permission is set, we kick off a new backup so that we can start a Windows Guest File Restore.


When you start the Windows Guest File Restore, you can easily browse and find the file. If you right click the file and click the properties option you can see that the permission are intact. Because "localtestuser" is not known by the B&R server, the ACL entry is shown by its UID. If you want to restore a windows file, you have two options. "Copy to" or "Restore to the original location".

Let us start by testing the restore to original location. Select the file and click restore.


This will restore the file to its original location in the original VM.



In my case the original file was still in place. You can see that Veeam has renamed the original file and then restored the text file. If we look at both ACL lists, we can see that B&R has succesfully restored the permissions. You can also see that the "Date modified" is in both case 15:13 as you would expect.

Now let us try the "Copy to" option



If you select the copy to option, you can see a check-box to preserve the permissions. Obviously we check it as we want to preserve the permissions. In this case, we are restoring to a local folder c:\restore on the backup server.



If we check the permissions after the restore, you can see that the permissions are successfully restored. Again the UID shows up and the "Date modified" is correct.

We can conclude that Windows Guest File Restores, do restore the file permissions succesfully