2013/03/28

Veeam Cloud Edition: Recovery with another installation

Veeam has recently released the Veeam Backup & Replication Cloud Edition. This new version basically consist of Veeam Backup & Replication + Cloud Backup. The main idea is that you will no longer have to offload your backups to tape but rather use a new media to do your offsite backups : cloud. First you will need to create a backup job. This will generate VBK/VRB/VIB/VBM files in your respository. These files are "portable". It means that you can copy them and import them in any other Veeam Backup & Replication Server. So I asked myself, how easy is it to recover from your the public cloud if everything is gone including your backup server. It turns out to be rather easy!

The first thing I did was create a bucket in our S3 compliant cloud (Eucalyptus Walrus Based). You can see in the screenshot that I just need to add the service point, query id and secret key (=~ server, login and password). Then I create a new bucket called "recoverybucket". In the top left corner you can see this is done on a server 10.x


Now lets create a backup plan using this "recoverybucket" account


Advanced mode was selected so that I could turn on encryption


I selected a backup that was produced by the job "Linux"



In the extension field I specified that only *.vbk and *.vbm (full backups and metadata) should be uploaded to the cloud.



And then finally encryption was enabled



Now it was time to do an upload test. After a successful upload test, the backup plan was deleted as well as the storage account from this 10.x backup server




Lets switch over to another site. Here I have installed a veeam backup server including cloud backup. You can see in the left corner that the RDP session is now connected to an 192.168.x address. The first thing we have to do is add the account. What is interesting is that the cloud edition will recognize the buckets that are linked to the account.


Then when you select the bucket it will warn you that it detects the other backup server. So choose to restore "another computer".


Now I am able to browse the repository. You can see that it even recognizes the whole "path".


So lets try to restore the whole directory where our Linux backup is stored.


Choose to do a one time restore



You can select latest version but I prefer to choose "Manually". Pick the version you like


Then select where you want to restore. I am using another directory because I don't have any F drive on my recovery location.


In the last step you need to enter your encryption key. For the fun I tried an invalid decryption key.



Using the invalid decryption key, the restore will fail as expected. This means that if you use encryption, your key is crucial for restores! Changing the key to the correct key allows the restore to run.


You have now restored the backup file back to a server. Of course if you want to use those backups you have to import them back in a backup server. There are two options here. You can just import them using the import button like shown below:



Or the other way is to create a recovery repository. Just add a new repository in Veeam B&R and point it to the restore directory.



In the final step, choose to import the existing backup automatically


Now the nice thing about this is that you can just rescan the repository if you do another restore to the same directory.

You can see that a backups restored from the cloud will be listed under "imported"




You can read more about Cloud Edition on the official website http://www.veeam.com/cloud-backup-vmware-hyper-v.html.


2013/03/17

Veeam Windows FLR and Spanned Volumes

Windows FLR and spanned volumes is something that seems tricky to do file level restores from. Looking at the documentation and release notes didn't make things more clear for me. The release notes (6.5) only state that it is not supported by Multi-OS FLR. So the question is, can you take backups from a spanned volumes and can you restore files? The answer seems to be, yes you can!


To do the test I created a VM with two 1 GB VMDKs


After that I created a spanned volume over the disks. To simulate a proper restore I put some oracle rpm on the disk so that I could try to restore this big file later on. You can see in the screenshots below how I created the volume, added the file and that the spanned volume is 2 GB big.


Now after I ran a backup, I tried to execute a Windows FLR. You can see that I am able to browse the spanned volume (E:), can find the file and even can restore the guest file back to the original location (Veeam will move the original file if it is still there).

Of course you can browse the c:\veeamflr directory or use Enterprise manager to find the file and restore it if guest indexing is enabled.


2013/03/05

Powershell Show Me How for Veeam

Introducing a small new Powershell tool that will show you how to code Powershell with the Veeam PSSnapIn. It actually uses the SnapIn to generate dynamic code. For example in the screenshot below, you will see that the tool has extracted the options from a Job.
Hence you must run the tool on a Veeam Server to get the best results. Notice that the code is 0.04 and I only tested it on one server so watch out running it on any production server.

That being set, you can actually extend the tool by creating additional XML code in the scriptmap.xml. The scriptmap follows a simple structures


  • A Class is just to define a class or collection of objects you want to work on
  • Class command is the command used to fetch the Powershell objects
  • Listvalue is the value that will be called on the object to get the name in Item box. If you don't give this parameter the script will actually use toString() method on the Object you are listing
  • Listtype is just a unique value that will be used together with listvalue to fill up the "Select your Veeam Item". Notice that it is also used to get the dynamic scripts
  • Script and Scriptname, speak for themselves I guess
  • CDATA is used to put in the code. If you want to use dynamic code enclose it between "##". The object you will be working in will be stored in $selObject.
That being said, you can get version 0.04 here .

The script is not signed so you might have to put your executionpolicy on remotelysigned and unblock the file.

Setting the correct executionpolicy can be done by executing as an administrator "set-executionpolicy remotesigned".

Unblocking the file can be done via the properties of the ps1 file.
You can read more  about this here




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.