PowerShell script exchange
Post Reply
lightsout
Expert
Posts: 211
Liked: 55 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Verify VBKs using PowerShell

Post by lightsout » Jun 25, 2014 1:51 pm

All,

I'm using robocopy to copy my VBKs from local storage to my deduplicator. What I'd like to do is verify this works ok, so is there any PowerShell cmdlet that allows me to tell if a VBK is valid?

Thanks!

veremin
Product Manager
Posts: 16682
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin » Jun 25, 2014 3:03 pm

You can try our commandline utility called Backup Validator and see whether it suites your needs. Thanks.

lightsout
Expert
Posts: 211
Liked: 55 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout » Jun 25, 2014 3:39 pm

Ok, wasn't aware of that, but looks good! But it requires the VBKs to be imported.

I've copied my files to a CIFS location, but when I rescan the repository, Veeam doesn't find any backups. Do I need to run an Import-vbrbackup instead?

veremin
Product Manager
Posts: 16682
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin » Jun 25, 2014 3:51 pm

I've copied my files to a CIFS location, but when I rescan the repository, Veeam doesn't find any backups.
You mean the CIFS share where copies of backup reside is added as a repository to backup console, but the rescanning procedure doesn't populate the data stored there? You can try to import backup either manually (GUI) or automatically (PS) and then perform validation. Thanks.

lightsout
Expert
Posts: 211
Liked: 55 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout » Jun 25, 2014 4:49 pm

Yes exactly, I do a rescan of the repository and no jobs appear. If I do an import, then they do appear.

One issue, so if I re-import a file that already exists using import-vbrbackup, it gives me a pop-up error in a window to the screen saying "Backup <blah> already exists". I've tried setting "WarningAction" to "SilentlyContinue" but it still does the same behave. Is there anyway to suppress this?

veremin
Product Manager
Posts: 16682
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin » Jun 25, 2014 9:07 pm

Is there .vbm file along with .vbk's, .vib's? Try to copy it to a target location, and perform rescan procedure again, the backup data should be populated. Thanks.

lightsout
Expert
Posts: 211
Liked: 55 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout » Jun 25, 2014 9:32 pm

I only copied the .vbks.... so I copied the .vbm too, and the rescan finds 23 skipped backups. I guess because these .vbks already exist.

How does the .vbm relate? Which Veeam scan that directory for all .vbks, or is the .vbm some sort of index and Veeam will only scan for files that are listed?

veremin
Product Manager
Posts: 16682
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin » Jun 25, 2014 9:55 pm

VBM is metadata file. In this case, it allows rescan procedure to import backup files found in the given location. Thanks.

lightsout
Expert
Posts: 211
Liked: 55 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout » Jun 25, 2014 9:56 pm

Just so I'm clear. Currently I have 3 .vbks and 1 .vbm. My plan is to keep copying these repeatedly to the same location.

So in a few months I'll have 12 .vbks and 1.vbm. Will Veeam still see all of the backups, including the old ones?

veremin
Product Manager
Posts: 16682
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin » Jun 26, 2014 9:40 am

Rescan procedure populates backups .vbm file has reference to. So, you will have to copy a pair (.vbm, .vbk) to target location. Probably, you will have to rename .vbm files, as well, in order to avoid name repeating.

By the way, wouldn't it be easier to use backup copy job, instead of scripts?

Thanks.

lightsout
Expert
Posts: 211
Liked: 55 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout » Jun 26, 2014 12:56 pm

I'd really like to use backup copy jobs, but the tranformation I/O kills my deduplicator sadly. So I'm doing this as a workaround. I will use PowerShell to do the GFS schedule.

So I guess I will need to do the import job, and just make sure I only ever run it once per file!

Unless you have any other suggestions?

veremin
Product Manager
Posts: 16682
Liked: 1392 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin » Jun 26, 2014 1:12 pm

Sounds reasonable. I would suggest to test .vbm part - whether or not the renamed .vbm is able to populate corresponding backup file. I believe it is, but it's worth doublechecking.

I've created the GFS script already; might be used a source for inspiration.

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests