Saturday, June 26, 2010

Using avtar.exe to restore files

Using avtar.exe to restore files

Avtar.exe is an executable which gets installed on a client when the Avamar agent is installed. Unless a non-default path was chosen during the install, it can be found in c:\program files\avs\bin. Avtar.exe can be used to list backups, list backup content, create backups, delete backups and restore files. In this entry I will focus on listing and restoring files using Avtar.exe.

Basic command line:

avtar.exe --id= --password= --path=\Domain\fully qualified DNS name of client\


Listing backups for a client using Avtar.exe

avtar.exe --backups --id= --password= --path=\test\testserver.testdomain.com

This lists all the backups in Avamar for this client. The list looks similar to this:

Date Time Seq Label Size Plugin Working directory Targets
---------- -------- ----- ----------------- ---------- -------- --------------------- -------------------
2010-06-16 14:32:09 140 MOD-127671661 18783K Windows C:\Program Files\avs\var R:/test/
2010-06-15 22:03:50 139 MON-PM-Test-testserver-127665720 32478034K Windows C:\Program Files\avs\var
2010-06-14 22:18:19 138 MON-PM-Test-testserver-127657080 32477794K Windows C:\Program Files\avs\var
2010-06-13 22:32:53 137 MON-PM-Test-testserver-127648440 32479575K Windows C:\Program Files\avs\var

The important infomration you will need from this is Label. This will be provided as an option when doing a restore to tell Avamar to use this backup.

Listing files for a client using Avtar.exe

avtar.exe --list --id= --password= --path=\test\testserver.testdomain.com --label="MON-PM-Test-testserver-127665720"

All files that belong to the backup labeled as "MON-PM-Test-testserver-127665720" will be listed. There is no limit of 50,000 files as in the gui. The list can be very long, and I haven't found an option in avtar.exe to list files that match a pattern. Maybe using grep or qgrep in Windows would be appropriate here.

Restoring ALL files for a client using Avtar.exe

avtar.exe --extract --id= --password= --path=\test\testserver.testdomain.com --label="MON-PM-Test-testserver-127665720"

This will restore all files for the client, but it will not overwrite files.

Restoring only certain files for a client using Avtar.exe

avtar.exe --extract --id= --password= --path=\test\testserver.testdomain.com --label="MON-PM-Test-testserver-127665720" c:\test\temp.txt

This will restore the file c:\test\temp.txt to the original location.If the file needs to be overwritten, then use --overwrite=always before the file name. Multiple filenames can be seperated by a space. Multiple files cannot be selected using an *.

No comments:

Post a Comment