I need some help getting a validation script to run. Basically what I'm trying to achieve here is to import jobs from a repository, and then verify each job's .VBK file only.
I feel like I've got reasonably far with this with the little powershell knowledge I have but just can't work out how to pipe the CreationTime of the .vbk into the Veeam.backup.validator.exe
How about reading the folder for files matching .VBK and then run the validator? This way you don't have to worry about a job or something not being in the Veeam infrastructure anymore.
The timestamp we write into the file is the processing start time of the specific VM and is a bit harder to get via PowerShell.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
vmniels wrote:How about reading the folder for files matching .VBK and then run the validator?
Yes I'd be happy to do that, I just can't work out how to get PowerShell/Validator to recursively look through folders and only validate .vbk files. I'm not good with PowerShell at all really.
v.Eremin wrote:Can you elaborate on it a little bit? Do you want to validate only .vbks older than X days? Thanks.
I only want to validate .vbk files. I was trying to use the CreationTime so I can tell the Veeam.backup.validator.exe to validate the file with a specific date (the .vbk). Otherwise the validator attempts to scan only the latest .vib file in the chain and in this case I have copied only the .vbk to a secondary location without the .vib's. (Basically to a staging repository, validating the files and then writing them off to tape).
I wish there was a switch for the validator to just validate .vbk's only
I think what Niels was trying to recommend is to search the given directory (where the backups are located), using .vbk as a file mask and pass resulting data to validator tool as a /file parameter. Just a rough example:
I'd love to do this but I think I have 2 things that prevent me from doing this:
1.) The backups are encrypted so need to be imported into the console and decrypted first.
2.) Secondly the files are located on a separate repository server and the Validator doesn't appear to work with UNC paths.
Hence why I've tried to import the jobs and then run the validator on the imported job, but trying to specify the full as the target.
I'm still a little bit confused. If you need to confirm only .vbk files, why are you importing a backup job as a whole instead of importing only full backup files?
Sticking to that approach would make even the search query easier, as you would have to find only those jobs (backups) that have "imported" postfix in their names.