PowerShell script exchange
Post Reply
MagnaVis
Influencer
Posts: 10
Liked: 2 times
Joined: Nov 06, 2015 5:05 pm
Full Name: Ricky
Contact:

Specify credentials for Start-VBRZip

Post by MagnaVis »

Our backup destination is on another domain. I've added the credentials in the GUI, and when I trigger a backup in the GUI and specify the credentials, all goes well. When I run the script (just the example script for the free B&R 8 here: https://www.veeam.com/blog/veeam-backup ... shell.html) it fails. Closer inspection indicates a credentials error on the destination storage.

I've looked at the output of:

Code: Select all

get-help Start-VBRZip -full
and it doesn't seem to support credentials directly.

When I run:

Code: Select all

Get-VBRCredentials -Name GLF*
I see the expected credentials I'd like to use.

I don't have a job to apply these credentials to though. The script I use starts a new instance of Start-VBRZip for each server in the list provided.

Is there a way to accomplish this? Thank you!

Additional Info:
When I run the job manually, outside the script, I get the same thing. Looking in the log, this is the part where I identified that it was storage credentials that are the issue:

Code: Select all

[03.03.2016 22:34:59] <17> Error    Processing GL-TMS01
[03.03.2016 22:34:59] <17> Error    PrepStorageForWriteEx failed '\\GLDC01\Backup\GL-TMS012016-03-03T223450.vbk' (Veeam.Backup.Common.CAgentException)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.AgentProvider.CBackupClient.PrepStorageForWriteEx(String storageFilename, Int32 kbBlockSize, Int32 blockAlignmentLogarithm)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CStorageCommanderHelper.PrepareStorageForWrite(CStorage storage, IBackupClient client, Boolean bOptimized4DedupMedia, IFileCommander fileCommander, String agentLink)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CLocalStorageCommander.PrepareStorageForWrite(IStorage storage, IBackupClient client)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CLocalStorageCommander.Create(CStorageInfo storageInfo, IStorageName storageName, IBackupClientHolder clientHolder)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CStorageEx.CreateStorageFile(CStorageInfo storageInfo, IStorageName storageName, CBackup backup, IBackupClientHolder agentHolder, IStorageAccessor storageAccessor, IEncryptedBackupSession cryptoBackupSession)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CFreeBackupStorageAlg.InitStorages(IBackupClientHolder agentHolder)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CFreeBackupJobTarget.CreateTaskTarget(ITask task, CBackupTaskSession taskSession)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CFreeHvBackupJobPerformer.ExecuteTask(CHvVmTask task)
[03.03.2016 22:34:59] <17> Error       at Veeam.Backup.Core.CFreeHvBackupJobPerformer.ExecuteTaskAsync(CHvVmTask task)
[03.03.2016 22:34:59] <17> Error    The user name or password is incorrect. (Veeam.Backup.Common.CCppComponentException)
[03.03.2016 22:34:59] <17> Error       in c++: Error code: 0x0000052e
[03.03.2016 22:34:59] <17> Error       in c++: Failed to open storage for read/write access. Storage: [\\GLDC01\Backup\GL-TMS012016-03-03T223450.vbk].
[03.03.2016 22:34:59] <17> Error       in c++: Failed to upgrade/fix the storage [\\GLDC01\Backup\GL-TMS012016-03-03T223450.vbk].
[03.03.2016 22:34:59] <17> Error       in c++: Client failed to process the command. Command: [prepStorageForWriteEx].
[03.03.2016 22:34:59] <17> Error       in c++ event: ClientErrorEvt
More as a point of interest than anything. I don't want to create a cross domain trust, but will try to if I must. I've gone through steps to enable anonymous authentication on the destination side without success. I'm hoping there's an easy way to do what the console does when I specify specific storage credentials for VeeamZIP jobs. Fingers crossed.
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Specify credentials for Start-VBRZip

Post by veremin »

You're right. Currently GUI allows more than PowerShell does in terms of VeeamZIP capabilities. So, we're thinking at the moment about adding -NetworkCredentials parameter to Start-VBRZip cmdlet in one of the next product releases.

Are trying to a network share? If so, you can try to add it as a network drive, using the required credentials, and then VeeamZIP VM to it. Don't forget to give computer account write permissions to this share.

Honestly, I haven't tested the proposed workaround, so it still needs to be proved in a wild.

Thanks.
MagnaVis
Influencer
Posts: 10
Liked: 2 times
Joined: Nov 06, 2015 5:05 pm
Full Name: Ricky
Contact:

Re: Specify credentials for Start-VBRZip

Post by MagnaVis »

Thanks for the idea, unfortunately it didn't work. Errors out with the same issue.

I'll go about setting up cross forest trusts and getting it to authenticate with the domain accounts. I'm going to watch the change logs of future releases, I do think a -NetworkCredentials switch would be fantastic! Thanks again!
MagnaVis
Influencer
Posts: 10
Liked: 2 times
Joined: Nov 06, 2015 5:05 pm
Full Name: Ricky
Contact:

Re: Specify credentials for Start-VBRZip

Post by MagnaVis » 2 people like this post

Big surprise everyone, SBS 2003 does not support cross forest trusts! Yay! *eye roll @ Microsoft*

I was able to apply some policy to get it to share out the folder without any authentication requirements. Not ideal, if any user were to find the folder, they would be able to do whatever they wanted with it, but that's the price of doing business I guess. Cheap solutions are, by nature, less than perfect.

Just wanted to give an update in case anyone finds themselves in my position. Not the best, but at least it works. I'll be keeping an eye out for a -NetworkCredentials switch in the future *fingers crossed*
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 15 guests