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

2012/08/29

Installing ESXi and update via USB stick

If you have a standalone esxi 5 server and you want to upgrade it, you can use an usb stick to update the server. Notice that the USB key or disk device media is formatted with a FAT16 partition and has a maximum size of 2GB.

First of all you need the following article

Basically because you can now assign usb devices to VMs, you need to stop the service that does so
/etc/init.d/usbarbitrator stop

You will then be able to find the usb under /vmfs/volumes after you reconnect it. You don't need to restart the service as you will reboot after the updates

Now put your ESXi in maintenance mode 
vim-cmd hostsvc/maintenance_mode_enter

Then to apply patches, use the following command
esxcli software vib install -d /vmfs/volumes/[USB]/[PATCH_FILE].zip


Reboot when done and you should be setup!

2012/04/16

Removing avast from Mac

After removing avast from my Mac (the old drag-drop-to-trashcan) I still had some processes running from avast. To make things worse I still had an Icon in my toolbar and system preferences. The latter one I could remove easily, the other one a bit harder. Hope the next bit helps someone else on removing this way-too-much-overhead-av-scanner

First open a shell and make your self root
$ sudo su -
Then navigate to launch map
# cd /Library/LaunchDaemons
Now Unload the correct services
# launchctl unload com.avast.daemon.plist
# launchctl unload com.avast.fileshield.plist
# launchctl unload com.avast.kexts.plist
# launchctl unload com.avast.proxy.plist
# launchctl unload com.avast.proxy.plist
Finally remove residu
rm -i /Library/LaunchDaemons/com.avast.*
rm -i /Library/LaunchAgents/com.avast.*

2012/03/15

Storwize and ESX: change default path selection to RR

Round robin is now an acceptable psp for storwize. However if you don't want to change the psp for every lun you create, it might be handy to adjust the default satp for svc so that it uses RR for every (new) lun it detects.

First of all, lets see all the possible path selection protocols we can use (PSP)
~ # esxcli storage nmp psp list
Name Description
------------- ---------------------------------
VMW_PSP_MRU Most Recently Used Path Selection
VMW_PSP_RR Round Robin Path Selection
VMW_PSP_FIXED Fixed Path Selection

We can see the default MRU for storwize/svc, which we are going to change to RR

First of all we can see that ESX will use a certain SATP if it detects an SVC / Storwize
~ # esxcli storage nmp satp rule list
Name Device Vendor Model Driver Transport Options Rule Group Claim Options Default PSP PSP Options Description
------------------- ------ ------- ---------------- ------ --------- -------------------------- ---------- ----------------------------------- ----------- ----------- --------------------------------------------------------------------------
VMW_SATP_SVC IBM 2145 system

Conveniently this is VMW_SATP_SVC . We can now check which default PSP is associated with this SATP by executing the list rule
~ # esxcli storage nmp satp list
Name Default PSP Description
------------------- ---------------- ------------------------------------------
VMW_SATP_SVC VMW_PSP_MRU Supports IBM SVC

You can see that by default MRU is chosen. We can change with the following command
esxcli storage nmp satp set --default-psp yourpsp --satp yoursatp

So execute
~ # esxcli storage nmp satp set --default-psp VMW_PSP_RR --satp VMW_SATP_SVC
Default PSP for VMW_SATP_SVC is now VMW_PSP_RR


Now reboot your server, the paths should be reclaimed with RR



2012/03/14

Centos 6.2 and Deluge 1.3.4

The following instructions might not be fined grained but they get the job done :). I executed everything as root :)

First of all you will need to get the source from deluge
http://dev.deluge-torrent.org/wiki/Download#Source

I got the tar.gz version 1.3.4

Then you will need the following key components. These are libraries/tools you need for compiling libtorrent
yum groupinstall "Development tools"
yum install boost-* python-setuptools m2crypto pyOpenSSL openssl openssl-devel python-devel

Then untar the package you've download
tar -xzvf deluge-1.3.4.tar.gz
cd deluge-1.3.4

Build and install the package (time to get some coffee)
python setup.py build
python setup.py install

Lastly you will need to install some extra python packages (eggs). Otherwise you will see import errors
easy_install chardet
easy_install twisted

You can now start deluge by running
deluge