Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

3675

November 7th, 2013 14:00

Proxy VMDK extraction to alternate location?

Hello Guys,

Does anyone know of a way to restore the vmdk files from a backup? l know I could create a test VM and restore to that, but the customer does not want me to add any new VMs to his environment. This is all in an attempt to get the images to an Iomega external device for seeding to a replication grid.

I was thinking if I could figure out a way to mount one of backups onto the proxy so I could copy the vmdk's to an alternate location and then unmount. But I can't figure out how to do this without actually performing a restore, which of course requires a VM. Any ideas? Thanks in advance.

2K Posts

November 14th, 2013 06:00

My apologies, I forgot to mention that when we add a VM to Avamar, there is a UUID appended to the VM name. For example, on my test system I have a client with the display name "centos". The client name associated with this client is "centos_UAtHQOvfGoYjLOMklKhV2g". This UUID doesn't show up in the GUI at all.

The full client name is recorded in several places, some of which are safer / easier to access than others. The safest place to find it is in the MCS database in the v_clients view:

mcdb=# select client_name from v_clients where client_name like '%centos%';

                  client_name

--------------------------------------------------

centos_UAtHQOvfGoYjLOMklKhV2g

There's a section in the manual on accessing the views using the PostgreSQL driver and ODBC on Windows. If you're going to be doing this often, it might be worth setting up.

If this is more of a one-off issue, you can very carefully use the avmgr utility on the utility node to find the client's real name using something like this:
avmgr getl --path=/clients/VirtualMachines/

An important word of warning:

avmgr is probably the single most dangerous command in Avamar. Using it for "get" operations will not cause issues but you should never make changes using avmgr unless you have been given explicit instructions to do so by support.

Edit: Formatting

November 8th, 2013 00:00

Please consider moving this question as-is (no need to recreate) to the proper forum for maximum visibility.  Questions written to the users' own "Discussions" space don't get the same amount of attention and can go unanswered for a long time.

You can do so by selecting "Move" under ACTIONS along the upper-right.  Then search for and select: "Avamar Support Forum".

Avamar Support Forum

2K Posts

November 8th, 2013 07:00

The VMDK files are stored on the Avamar server as if they were regular files. Are you familiar with avtar command line syntax? You can restore the raw VMDKs directly to the Iomega device if you mount / map the device to a system where the regular Avamar client software is installed and use avtar -x.

You can get help with avtar syntax using "avtar --help". The syntax is very similar to the UNIX / Linux "tar" utility.

To view the list of files in the backup:

avtar -t

To restore one or more files:

avtar -x [file2] [...]

The required flags are:

--server=

--path=

--id=

--ap=

You may also want to specify --labelnum if you want to restore a backup other than the most recent one or --target if you want to write the files somewhere other than the current working directory.

17 Posts

November 8th, 2013 16:00

Thanks Ian for the fast reply. I will work with this the next few days and reply back. Great information.

498 Posts

November 11th, 2013 08:00

If I understand correctly you want to restore a whole drive of a server but not the whole server?

Been there done that - had to get help from EMC to learn how - can now do it on my own.

We created a vm called AvamarRestore that had nothing.

we then restored the drive to AvamarRestore (this was a lot of info - ask if you want it   - start by looking at 6.1 VMware User Guide - Restoring the full image or selected drives to a different(existing) virtual machine )

then we just mounted the drive from AvamarRestore(which is powered off) to another server.

Then the person who needed it just did a copy and past from the temp mounted drive to what they needed.

when they were done we removed that drive, then cleaned up AvamarRestore VM to have no drives again.

We have had to do this a lot because you can only restore so much from a File Level Restore of a VM, it does not do a large amount of data.

Remember you can only restore a VM to another VM.

17 Posts

November 12th, 2013 19:00

I can get these commands to work for any Windows File Client and see the backups out there. But when I run these commands against a VM in the Avamar domain structure, I continue to get errors indicating no such domain or DNS , network errors. I enter the following commands with the path to the VM:

avtar --t --list --server=10.16.32.15 -- id=MCUser --ap=MCUser1 --path=/Vcenter.production.server/VirtualMachines/VMName. But when I enter the same command with the path=clients/Windows Client Name, it then finds the backups on a standard file agent client. I've tried every possibility I can think of to get the path recognized for vmdk backups, but no luck. I just don't know what I'm missing here. I do have valid VM backups that I see in Administrator. Shouldn't I be able to see the VM image backups by providing the path for the VM? If this will not work via CLI, I may have to take the other suggestion of restoring to a VM, but what a pain that will be for the amount of VMs I need to copy to the Iomega. Plus having to create all these test VMs to do it. BTW, the Iomega device came with a built in avamar file agent which means if I can get this to work I could restore directly to it and not have to map any drives.

17 Posts

November 13th, 2013 09:00

I think I used the wrong cli commands to do what I need to do. Stay tuned.

498 Posts

November 13th, 2013 09:00

as I did not do cli I am stuck there - but if I remember correctly you cannot restore a vm to any where but another vm.

and I only created 1 AvamarRestore vm and used it over and over again.

but if you want to do a bunch a once, you would have to make a bunch - and the setup is very tedious.

215 Posts

November 14th, 2013 07:00

Another possibility is you can use mccli to obtain the fully qualified name of a vmimage type client.

mccli client show --domain= --name=

and there will be a field displayed called “Fully Qualified Name=”

17 Posts

November 21st, 2013 11:00

I can now see the UUIDs with Adam's suggestion. I think it's safer to view in mccli.

I've performed restores directly to the Iomega via the built in client for File agent based backups very successfully.

I've reached the point where I have turned on ssh on the Iomega and attempting to use avtar for the remaining restores for vmdk backups. When I execute the avtar command, I get command not found. So I performed a Linux search and found the avamar directory under: /mnt/system/opt/apps/emc/Avamar/avamar.

Under there is a bin and var folder. The avtar command is actually there but I cant execute it. Not sure what the extra -r in front of the standard permissions are. I'm not proficient in Linux permissions. Maybe Iomega has locked it down?

I guess I could map this device on a regular client but sure is ashamed I've come this far and cant execute avtar on Iomega.

root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/bin# ls -l

total 13284

-r-xr-xr-x 1 root root 3399304 Feb 12  2013 avagent.bin

-r-xr-xr-x 1 root root 2800168 Feb 12  2013 avscc

-r-xr-xr-x 1 root root    1700 Feb 12  2013 avtar

-r-xr-xr-x 1 root root 7389848 Feb 12  2013 avtar.bin

-r-xr-xr-x 1 root root     121 Feb 12  2013 unix.pin

root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/bin#

root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/bin# avtar --help
-sh: avtar: command not found
root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/bin# ./avtar --help
./avtar: line 23: BASEDIR: command not found
./avtar: line 23: BASEDIR: command not found
./avtar: line 47: unexpected EOF while looking for matching `"'
./avtar: line 49: syntax error: unexpected end of file
root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/bin#


root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/bin# cd ..
root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar# cd var
root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/var# ls -l
total 804
-rw-r----- 1 root root   7779 Nov 19 18:22 MOD-1384906786014-1001-Unix.alg
-rw-r----- 1 root root   7386 Nov 19 18:22 MOD-1384906786014-1001-Unix.log
-rw-r----- 1 root root   8433 Nov 19 23:20 MOD-1384907589160-1001-Unix.alg
-rw-r----- 1 root root 616845 Nov 19 23:20 MOD-1384907589160-1001-Unix.log
-rw-r----- 1 root root   8083 Nov 19 23:43 MOD-1384923637042-1001-Unix.alg
-rw-r----- 1 root root   8027 Nov 19 23:43 MOD-1384923637042-1001-Unix.log
-rw-r----- 1 root root   8291 Nov 20 11:49 MOD-1384926688209-1001-Unix.alg
-rw-r----- 1 root root  20152 Nov 20 11:49 MOD-1384926688209-1001-Unix.log
-rw-r----- 1 root root   8153 Nov 20 15:30 MOD-1384976095505-1001-Unix.alg
-rw-r----- 1 root root   9942 Nov 20 15:30 MOD-1384976095505-1001-Unix.log
-rw-r----- 1 root root   7690 Nov 20 18:01 MOD-1384987398842-1001-Unix.alg
-rw-r----- 1 root root   8457 Nov 20 18:01 MOD-1384987398842-1001-Unix.log
-rw-r----- 1 root root   8170 Nov 20 19:39 MOD-1384995535904-1001-Unix.alg
-rw-r----- 1 root root  15258 Nov 20 19:39 MOD-1384995535904-1001-Unix.log
-rw-r--r-- 1 root root    151 Nov 19 18:02 avagent.cfg
-rw-rw-rw- 1 root root     28 Nov 19 18:02 avagent.lck
-rw-r--r-- 1 root root  33472 Nov 21 12:03 avagent.log
-r-xr-xr-x 1 root root     69 Feb 12  2013 avtar.cmd
-rw-r--r-- 1 root root     85 Nov 19 18:02 cid.bin
root@px6-300d-TIJY3T:/mnt/system/opt/apps/emc/Avamar/avamar/var#

17 Posts

November 21st, 2013 11:00

Thanks Ian. Excellent. avtar.bin does seem to work. I can now experiment with the commands.

2K Posts

November 21st, 2013 11:00

On Linux and some other UNIX / UNIX-like platforms, the "avtar" command is a wrapper script for avtar.bin. It looks like there's some problem with this wrapper script. Try using avtar.bin instead of avtar in your command calls.

17 Posts

November 25th, 2013 17:00

To Restore a backup: CD to the bin directory. Avtar.bin is not in the Iomega path. You must use avtar.bin because the wrapper does not work.

   

cd /mnt/system/opt/apps/emc/Avamar/avamar/bin

 

./avtar.bin --extract --id=MCUser--password=MCUser1--path=/VcenterName/VirtualMachines/"VMName and UUID" --labelnum=XX --target=/nfs/Backups/VMName

This command will restore the entire backup of label#XX to the Iomega device in the local directory of the target option. One thing I've realized is you cannot monitor the backup activity in activity monitor. But I can live with that. Thanks to EMC, Ian Anderson and Adam Kirkpatrick for all the good advise.

No Events found!

Top