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

Verify VBKs using PowerShell

Post by lightsout »

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: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin »

You can try our commandline utility called Backup Validator and see whether it suites your needs. Thanks.
lightsout
Expert
Posts: 227
Liked: 62 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout »

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: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin »

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: 227
Liked: 62 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout »

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: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin »

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: 227
Liked: 62 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout »

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: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin »

VBM is metadata file. In this case, it allows rescan procedure to import backup files found in the given location. Thanks.
lightsout
Expert
Posts: 227
Liked: 62 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout »

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: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin »

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: 227
Liked: 62 times
Joined: Apr 10, 2014 4:13 pm
Contact:

Re: Verify VBKs using PowerShell

Post by lightsout »

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: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Verify VBKs using PowerShell

Post by veremin »

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 11 guests