-
- Lurker
- Posts: 2
- Liked: never
- Joined: Dec 16, 2015 7:20 pm
Re: Start-VBRZip in Veeam Backup Free Edition
Hoping someone can help with an Access is Denied error when running the PS script.
The script runs and the job starts successfully but generates an "Access is Denied" error after a few minutes indicating it cannot create the bkup file at the destination.
The destination is accessible under the account that I am using to run the script. I am even able to move items to and from the folder in powershell.
I am able to create and execute the job to the shared folder location from the GUI without error but when I run the script, I am presented with the "Access is Denied" error.
I have tried removing the saved credentials for the account from the GUI and re-adding them. I have tried creating a backup repository to the shared location. I have tried mapping the drive locally to the system and then running the script. When I map the drive, I do get a different error:
"Error: The system cannot find the specified file."
Though again, the shared folder is there.
Is there some PS command to force the script to use a specific set of credentials? I'd rather not open the share without a password if at all possible.
The script runs and the job starts successfully but generates an "Access is Denied" error after a few minutes indicating it cannot create the bkup file at the destination.
The destination is accessible under the account that I am using to run the script. I am even able to move items to and from the folder in powershell.
I am able to create and execute the job to the shared folder location from the GUI without error but when I run the script, I am presented with the "Access is Denied" error.
I have tried removing the saved credentials for the account from the GUI and re-adding them. I have tried creating a backup repository to the shared location. I have tried mapping the drive locally to the system and then running the script. When I map the drive, I do get a different error:
"Error: The system cannot find the specified file."
Though again, the shared folder is there.
Is there some PS command to force the script to use a specific set of credentials? I'd rather not open the share without a password if at all possible.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Are you positive computer account has a write permissions of the given share?
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Dec 16, 2015 7:20 pm
Re: Start-VBRZip in Veeam Backup Free Edition
It should, shouldn't it? It's a QNAP NAS sharing over SMB. The NAS is domain joined. Do I need to manually add the computer AD object to the permissions?
I just also tested enabling full guest access to the share and the PS script still fails with an Access denied error.
I'd like to remove all of the associated credentials for that share from the GUI but am unable to do so as the console indicates that the credentials are in use when I try to remove them. I cannot find anywhere that I can remove a shared folder from the GUI so that I can then remove the credentials. I'd like to do that so that I can setup the VeeamZIP job in the GUI to connect to the share without any credentials. Any ideas on that?
I just also tested enabling full guest access to the share and the PS script still fails with an Access denied error.
I'd like to remove all of the associated credentials for that share from the GUI but am unable to do so as the console indicates that the credentials are in use when I try to remove them. I cannot find anywhere that I can remove a shared folder from the GUI so that I can then remove the credentials. I'd like to do that so that I can setup the VeeamZIP job in the GUI to connect to the share without any credentials. Any ideas on that?
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
The most typical cause of "Access Denied" error that I've seen is computer account lacking write permission on the given share. It's been confirmed several times on both side communities and blog comments that giving the computer account write permissions on the share solves the problem.
If that doesn't help, you might want to investigate it further with our support team.
Thanks.
If that doesn't help, you might want to investigate it further with our support team.
Thanks.
-
- Novice
- Posts: 3
- Liked: never
- Joined: Dec 24, 2015 3:38 pm
- Full Name: Timur
- Contact:
[MERGED] : Issues with using powershell script for Veeam Bac
Hello everybody,
I'm trying to use powershell script described here: https://www.veeam.com/blog/veeam-backup ... shell.html
But when I'm trying to launch it, have following errors:
I've looked for comments on mentioned page and tried to Google but not so much info about that error. Could you please help figure this out? Thank you.
I'm trying to use powershell script described here: https://www.veeam.com/blog/veeam-backup ... shell.html
But when I'm trying to launch it, have following errors:
Code: Select all
PS C:\Users\Administrator\desktop\VeeamZIP> .\VeeamZIP.ps1
Find-VBRViEntity : Cannot validate argument on parameter 'Server'. The argument is null. Provide a valid value for the
argument, and then try running the command again.
At C:\Users\Administrator\desktop\VeeamZIP\VeeamZIP.ps1:76 char:48
+ $VM = Find-VBRViEntity -Name $VMName -Server $Server
+ ~~~~~~~
+ CategoryInfo : InvalidData: (:) [Find-VBRViEntity], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Command.FindVBRViEntity
Start-VBRZip : Cannot validate argument on parameter 'Entity'. The argument is null. Provide a valid value for the
argument, and then try running the command again.
At C:\Users\Administrator\desktop\VeeamZIP\VeeamZIP.ps1:81 char:40
+ $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp ...
+ ~~~
+ CategoryInfo : InvalidData: (:) [Start-VBRZip], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Commands.Backup.StartVBRZip
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\desktop\VeeamZIP\VeeamZIP.ps1:91 char:5
+ $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Issues with using powershell script for Veeam Backup
Are you using Hyper-V or VMware environment? What happens if you input name of your VMware/Hyper-V host as $HostName and then pass it to Get-VBRServer commandlet, will it return anything?
Thanks.
Code: Select all
$HostName = "Name of your host"
Get-VBRServer -name $HostName
-
- Novice
- Posts: 3
- Liked: never
- Joined: Dec 24, 2015 3:38 pm
- Full Name: Timur
- Contact:
Re: Issues with using powershell script for Veeam Backup
Hi. I'm using VmWare environment.
Running your commands:
Actually, nothing happens.
Running your commands:
Code: Select all
PS C:\Users\Administrator> $hostname = "172.16.170.128"
PS C:\Users\Administrator> Get-VBRServer -name $hostname
PS C:\Users\Administrator>
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Issues with using powershell script for Veeam Backup
Is the said server added to the backup console? If so, is it added via the same name (172.16.170.128)?
-
- Novice
- Posts: 3
- Liked: never
- Joined: Dec 24, 2015 3:38 pm
- Full Name: Timur
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Yeah, problem was server was added to console with public IP address instead of internal. I re-added it with local address and it worked. But now there is another error:
I use free version of Veeam Backup and trial version of ESXi. But this is test environment and later on I will be using it with Essential version of ESXi.
Code: Select all
PS C:\Users\Administrator\desktop\VeeamZIP-VI-updated> & '.\VeeamZIP (VI - updated).ps1'
Start-VBRZip : License is not installed.
At C:\Users\Administrator\desktop\VeeamZIP-VI-updated\VeeamZIP (VI - updated).ps1:86 char:19
+ $ZIPSession = Start-VBRZip -Entity $VM -Folder $Directory -Compression $Comp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VBRZip], CLicenseNotInstalledException
+ FullyQualifiedErrorId : Veeam.Backup.LicenseLib.CLicenseNotInstalledException,Veeam.Backup.PowerShell.Commands.B
ackup.StartVBRZip
You cannot call a method on a null-valued expression.
At C:\Users\Administrator\desktop\VeeamZIP-VI-updated\VeeamZIP (VI - updated).ps1:91 char:5
+ $TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
What product version are you using? (version 8, U1, U2, U3, etc.) In some cases reported in this thread update, as well as, snap-in re-installation might be needed to resolve the said issue. Thanks.
-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Jan 10, 2016 12:28 pm
- Contact:
[MERGED] : Veeam Backup Free writing Backup to network share
Hey guys,
I'm new at using veeam and I want to backup a virtual machine (hyper-v) to a network share. I found some great skripts for this on the veeam blogs.
The password is saved in a separate file ($Credfile). Mapping the share seems to be working fine, the ps output confirmed this.
I'm getting the following error, but I can't find out the cause:
Do you have an idea what I can do to get this work?
Best regards from sunny Germany
Klaus
I'm new at using veeam and I want to backup a virtual machine (hyper-v) to a network share. I found some great skripts for this on the veeam blogs.
The password is saved in a separate file ($Credfile). Mapping the share seems to be working fine, the ps output confirmed this.
Code: Select all
$Password = Get-Content $Credfile | ConvertTo-SecureString
$cred = New-Object System.Management.Automation.PsCredential("\myuser",$Password)
$Path = "\\server\backup"
New-PSDrive –Name myShare -PSProvider FileSystem -Root $Path -Credential $cred
$Folder = “myShare:\” # For instance, myShare:\Backup Job 1
$Folder += "virtualmachine1"
Write-Host "$Folder"
foreach ($VMHost in $VMHosts)
{
$Server = Get-VBRServer -name $VMHost
$VMNames = Get-VM -ComputerName $VMHost | Where-Object {$_.State –eq 'Running'} | Select Name
foreach ($VMName in $VMNames)
{
if ($VMSkipNames -notcontains $VMName.Name)
{
$VM = Find-VBRHvEntity -Name $VMName.Name -Server $Server
If ($EnableEncryption)
{
$EncryptionKey = Add-VBREncryptionKey -Password (cat $EncryptionKey | ConvertTo-SecureString)
$ZIPSession = Start-VBRZip -Entity $VM -Folder $Folder -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention -EncryptionKey $EncryptionKey
}
Else
{
$ZIPSession = Start-VBRZip -Entity $VM -Folder $Folder -Compression $CompressionLevel -DisableQuiesce:(!$EnableQuiescence) -AutoDelete $Retention
}
If ($EnableNotification)
{
$TaskSessions = $ZIPSession.GetTaskSessions().logger.getlog().updatedrecords
$FailedSessions = $TaskSessions | where {$_.status -eq "EWarning" -or $_.Status -eq "EFailed"}
if ($FailedSessions -ne $Null)
{
$MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},Result,@{n="Details";e={$FailedSessions.Title}})
}
Else
{
$MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},Result,@{n="Details";e={($TaskSessions | sort creationtime -Descending | select -first 1).Title}})
}
}
}
}
}
If ($EnableNotification)
{
$Message = New-Object System.Net.Mail.MailMessage $EmailFrom, $EmailTo
$Message.Subject = $EmailSubject
$Message.IsBodyHTML = $True
$message.Body = $MesssagyBody | ConvertTo-Html -head $style | Out-String
$SMTP = New-Object Net.Mail.SmtpClient($SMTPServer, $EMailPort)
$SMTP.EnableSsl = $true
$SMTP.Credentials = New-Object System.Net.NetworkCredential($EmailUser, $EmailUser);
$SMTP.Send($Message)
}
I'm getting the following error, but I can't find out the cause:
10.01.2016 13:27:27 :: Error: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. Error code: 123
Cannot create folder. Folder path: [myShare:\virtualmachine1].
--tr:FC: Failed to create directory. Directory path: [myShare:\virtualmachine1].
--tr:Failed to call DoRpc. CmdName: [FcCreateDir].
Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. Error code: 123
Cannot create folder. Folder path: [myShare:\virtualmachine1].
Do you have an idea what I can do to get this work?
Best regards from sunny Germany
Klaus
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Seems to be the problem with the rights. Make sure that Veeam account has necessary read/write permissions on the given share and so does computer account. Thanks.
-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Jan 10, 2016 12:28 pm
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
The Veeam account does not have any rights on this share, because it's an external share (cloud) which is not in the same domain/workgroup. I have only one single user with read/write rights for accessing this share.
I think I have the same problem as posted here http://forums.veeam.com/powershell-f26/ ... tml#p75835
I think I have the same problem as posted here http://forums.veeam.com/powershell-f26/ ... tml#p75835
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Jan 14, 2016 12:02 pm
- Full Name: Uxío Pazos
Re: Start-VBRZip in Veeam Backup Free Edition
Im testing VEEAM BACKUP but i cant get to work this script
So im trying what I thinks its a pretty simple thing:
I added my server to the Veeam Console with the IP 127.0.0.1(if i try with the local IP for some reason fail)
Im trying to run the script with this:
I get this error:
Appreciate the help. Thanks.
So im trying what I thinks its a pretty simple thing:
I added my server to the Veeam Console with the IP 127.0.0.1(if i try with the local IP for some reason fail)
Im trying to run the script with this:
Code: Select all
$VMNames = "PTEST"
$HostName = "127.0.0.1"
$Directory = "F:\BACKUPVMS\VMS"
$CompressionLevel = "5"
Code: Select all
Find-VBRViEntity : No se puede convertir un objeto de tipo
'Veeam.Backup.Core.Infrastructure.CHvHostItem' al tipo 'Veeam.Backup.Core.Infrastructure.IViItem'.
En C:\scripts\VeeamZIP-updated-HV\VeeamZIP (updated).ps1: 76 Carácter: 9
+ $VM = Find-VBRViEntity -Name $VMName -Server $Server
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Find-VBRViEntity], InvalidCastException
+ FullyQualifiedErrorId : System.InvalidCastException,Veeam.Backup.PowerShell.Command.FindVBR
ViEntity
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Feb 05, 2016 11:34 am
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Hey v.Eremin,
today I installed Backup&Replication v9 free and I found out, that I can use Powershell to script the backup. Nice script though.
But I receive the following error message:
When I enter the cmdlet separately, I get the following messages:
Maybe it has something to do with the dotnet 4.6? This was installed, before I installed B&R9. Then I uninstalled dotnet4.6 and installed dotnet4.5
today I installed Backup&Replication v9 free and I found out, that I can use Powershell to script the backup. Nice script though.
But I receive the following error message:
Code: Select all
Find-VBRHvEntity : Unable to find assembly 'Veeam.Backup.HVLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd684
de2276783a'.
Bei C:\Scripte\BackupVMs.ps1:76 Zeichen:25
+ $VM = Find-VBRHvEntity <<<< -Name $VMName -Server $Server
+ CategoryInfo : NotSpecified: (:) [Find-VBRHvEntity], SerializationException
+ FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,Veeam.Backup.PowerShell.Command.Find
VBRHvEntity
Code: Select all
Id Name Path
-- ---- ----
49500DBE-39E7-4A3E-A48B-3F995D1EFF63 Hosts and VMs
171fd02e-af11-437b-a6dc-99994d142e1d_ VMSERVER VMSERVER
WARNUNG: System.Runtime.Serialization.SerializationException: Unable to find assembly 'Veeam.Backup.HVLib,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd684de2276783a'.
Server stack trace:
at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String
name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames,
BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32
objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped
record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser
serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream,
HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream,
HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage)
at Veeam.Common.Remoting.CCoreChannel.DeserializeBinaryResponseMessage(Stream inputStream, IMethodCallMessage
reqMsg, Boolean bStrictBinding)
at Veeam.Common.Remoting.CBinaryClientFormatterSink.DeserializeMessage(IMethodCallMessage mcm, ITransportHeaders
headers, Stream stream)
at Veeam.Common.Remoting.CBinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Veeam.Backup.Interaction.Management.IHvHierarchyManagementService.ListWmiClusteredVms(Guid hostId)
at
Veeam.Backup.Interaction.Management.HvHierarchyManagementServiceProxy.<>c__DisplayClass1e.<ListWmiClusteredVms>b__1d()
at Veeam.Common.Remoting.CRetryableMethod.DoInvoke[Ret](ActionDelegate`1 dlg)
at Veeam.Common.Remoting.CReconnectableMethod.Invoke[Ret](ActionDelegate`1 dlg)
at Veeam.Backup.Interaction.Management.HvHierarchyManagementServiceProxy.ListWmiClusteredVms(Guid hostId)
at Veeam.Backup.Core.HyperV.RemoteCacheDataLoader.ListClusteredVms(Guid hostId, Boolean useWmi)
at Veeam.Backup.Core.HyperV.CHvCache2.IsVmClustered(CHvDbHost host, Guid vmId)
at Veeam.Backup.Core.Infrastructure.CHvFullHierarchyCreator.GetChildren(CHvHostItem parent)
at Veeam.Backup.Core.Infrastructure.CHvFullHierarchyCreator.GetChildren(IItem parent, Boolean bContainersOnly)
at Veeam.Backup.PowerShell.CPSFlatHierarchy.Add(IItem item, ICollection`1 list)
at Veeam.Backup.PowerShell.CPSFlatHierarchy.Add(IItem item, ICollection`1 list)
-
- Influencer
- Posts: 10
- Liked: 1 time
- Joined: Feb 05, 2016 11:34 am
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
gave support a call. They found out, that I have to use Powershell v4, when I want to use the script on Windows Server 2008R2
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Generally speaking, we've seen a lot of weird problems related to usage of PS 2.0 installed on Windows Server 2008 R2 by default. Thus, it's always recommended to use higher version of PS.
Anyway, glad to hear that updating PS has solved the issue for you.
Thanks.
Anyway, glad to hear that updating PS has solved the issue for you.
Thanks.
-
- Novice
- Posts: 3
- Liked: never
- Joined: Jan 25, 2016 4:57 pm
- Full Name: Rob Rosa
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Thanks for this script, we have it working great with our Hyper-V Server backup. I don't have any errors when it runs or problems sending emails via a google email address. I have a question if there is a way to include more information in the email it generates? Are there variables to call that would give me a report of the average copy speed and total file size of the backup?
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
If my memory serves me well, $ZIPSession variable should contain Info property within which you can find both BackupTotalSize and AvgSpeed:
Thanks.
Code: Select all
$ZIPSession .Info.BackupTotalSize/1gb
$ZIPSession .Info.Progress.AvgSpeed
-
- Novice
- Posts: 3
- Liked: never
- Joined: Jan 25, 2016 4:57 pm
- Full Name: Rob Rosa
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
I have tried the commands you listed and they run without errors but I cant get the backuptotalsize to report anything other than "0", and the speed gives different values but I don't know what they correlate to?
Here is the $MessageBody code line:
When I invoke the powershell script in a powershell window and the status window is open and I can see that the backup average rate is around 500Mb. I also see that it has a "files total" field; that's all I'm looking to add the email report (the Total). I've tried putting the "/1gb" modifier as in your code and it doesn't change anything.
Because I've ran so many backups lately I've used a good portion of the destination drive, this also means that the $Retention function isn't working. I have it set to "Tonight" currently and it doesn't delete any file, whether they be from a week ago or yesterday. Do you have any insight in how to get that functioning? I think the Result column is giving me a Warning designation from the low space, but that function seems like it only returns Success or Warning.
I'm not getting any Powershell errors when the script is running.
Thanks for your help.
Here is the $MessageBody code line:
Code: Select all
$MesssagyBody = $MesssagyBody + ($ZIPSession | Select-Object @{n="Name";e={($_.name).Substring(0, $_.name.LastIndexOf("("))}} ,@{n="Start Time";e={$_.CreationTime}},@{n="End Time";e={$_.EndTime}},@{n="Size";e={$_.info.backuptotalsize}},@{n="Speed";e={$_.info.progress.avgspeed}},Result,@{n="Details";e={($TaskSessions | sort creationtime -Descending | select -first 1).Title}})
Because I've ran so many backups lately I've used a good portion of the destination drive, this also means that the $Retention function isn't working. I have it set to "Tonight" currently and it doesn't delete any file, whether they be from a week ago or yesterday. Do you have any insight in how to get that functioning? I think the Result column is giving me a Warning designation from the low space, but that function seems like it only returns Success or Warning.
I'm not getting any Powershell errors when the script is running.
Thanks for your help.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
I've checked the code briefly and think that the properties that need to be added are the following ones:
Thanks.
Code: Select all
$Session.BackupStats.BackupSize/1gb #backup size
$Session.Info.Progress.AvgSpeed/1mb #average speed
-
- Novice
- Posts: 3
- Liked: never
- Joined: Mar 03, 2016 6:19 am
- Full Name: Alexander
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Do not work backup autodelete in script. Does anybody know how to fix it?
How to specify backup output file name in VBR v9? In VBR v8 file name was "Backup_test_2016-02-29T085753". In VBR v9 backup job name is "test_2016-03-03T102606" and backup file name is "test2016-03-03T102606".
How to specify backup output file name in VBR v9? In VBR v8 file name was "Backup_test_2016-02-29T085753". In VBR v9 backup job name is "test_2016-03-03T102606" and backup file name is "test2016-03-03T102606".
-
- Novice
- Posts: 3
- Liked: never
- Joined: Jan 25, 2016 4:57 pm
- Full Name: Rob Rosa
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Utilizard, I don't think the autodelete works either. I have just created a different scheduled job to move to files to a different folder, then have a separate job to delete the files after "X" of days. I'm just using windows Task manager and powershell scripts on my Veeam PC to handle the copies and pushing to separate backup destinations. Instead of relying on the VBRZIP program to do everything this is easier (and works).
-
- Novice
- Posts: 5
- Liked: never
- Joined: Mar 09, 2016 2:24 pm
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Hye
I've a problem wih the execution of the Ps, the beginning is good, start but after a few moment : Processing "VM...." Error : Access Denied and this for each VMNAmes
If I do the same VeeamZip directly (in console) work fine .
Any idea ?
Thk
# Names of VMs to backup separated by semicolon (Mandatory)
$VMNames = "VM..."
# Name of vCenter or standalone host VMs to backup reside on (Mandatory)
$HostName = "192.168.xx.xxx"
# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)
$Directory = "\\192.168.xx.xxx\VeeamBackup\Auto"
# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme)
$CompressionLevel = "5"
# Quiesce VM when taking snapshot (Optional; VMware Tools are required; Possible values: $True/$False)
$EnableQuiescence = $False
# Protect resulting backup with encryption key (Optional; $True/$False)
$EnableEncryption = $False
# Encryption Key (Optional; path to a secure string)
$EncryptionKey = ""
# Retention settings (Optional; By default, VeeamZIP files are not removed and kept in the specified location for an indefinite period of time.
# Possible values: Never , Tonight, TomorrowNight, In3days, In1Week, In2Weeks, In1Month)
$Retention = "Never"
I've a problem wih the execution of the Ps, the beginning is good, start but after a few moment : Processing "VM...." Error : Access Denied and this for each VMNAmes
If I do the same VeeamZip directly (in console) work fine .
Any idea ?
Thk
# Names of VMs to backup separated by semicolon (Mandatory)
$VMNames = "VM..."
# Name of vCenter or standalone host VMs to backup reside on (Mandatory)
$HostName = "192.168.xx.xxx"
# Directory that VM backups should go to (Mandatory; for instance, C:\Backup)
$Directory = "\\192.168.xx.xxx\VeeamBackup\Auto"
# Desired compression level (Optional; Possible values: 0 - None, 4 - Dedupe-friendly, 5 - Optimal, 6 - High, 9 - Extreme)
$CompressionLevel = "5"
# Quiesce VM when taking snapshot (Optional; VMware Tools are required; Possible values: $True/$False)
$EnableQuiescence = $False
# Protect resulting backup with encryption key (Optional; $True/$False)
$EnableEncryption = $False
# Encryption Key (Optional; path to a secure string)
$EncryptionKey = ""
# Retention settings (Optional; By default, VeeamZIP files are not removed and kept in the specified location for an indefinite period of time.
# Possible values: Never , Tonight, TomorrowNight, In3days, In1Week, In2Weeks, In1Month)
$Retention = "Never"
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Mar 09, 2016 9:56 am
- Full Name: john
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
same error in spanish version.
Find-VBRHvEntity : No se puede encontrar el ensamblado 'Veeam.Backup.HVLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd684de2276783a'.
En E:\Copias\CopiaHV\Scripts\p2.ps1: 23 Carácter: 25
+ $VM = Find-VBRHvEntity <<<< -Name $VMName -Server $Server
+ CategoryInfo : NotSpecified: (:) [Find-VBRHvEntity], SerializationException
+ FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,Veeam.Backup.PowerShell.Command.FindVBRHvEntity
any solution?
Find-VBRHvEntity : No se puede encontrar el ensamblado 'Veeam.Backup.HVLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bfd684de2276783a'.
En E:\Copias\CopiaHV\Scripts\p2.ps1: 23 Carácter: 25
+ $VM = Find-VBRHvEntity <<<< -Name $VMName -Server $Server
+ CategoryInfo : NotSpecified: (:) [Find-VBRHvEntity], SerializationException
+ FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,Veeam.Backup.PowerShell.Command.FindVBRHvEntity
any solution?
-
- Novice
- Posts: 4
- Liked: 1 time
- Joined: Mar 04, 2016 1:14 am
- Full Name: Dave Traube
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
I am trying to use this script to backup from a VMWare host to a Synology NAS. I can get the script to run, but it is having trouble writing to the NAS. I am seeing the following error in the log:
3/10/2016 5:29:35 PM :: Error: Access is denied.
--tr:Error code: 0x00000005
Cannot create folder. Folder path: [\\192.168.161.35\USB].
--tr:FC: Failed to create directory. Directory path: [\\192.168.161.35\USB].
--tr:Failed to call DoRpc. CmdName: [FcCreateDir].
Access is denied.
Cannot create folder. Folder path: [\\192.168.161.35\USB].
Is there a way I can pass the NAS credential in the script? It is already stored in Veeam. I have used it to run VeeamZip jobs from the console successfully to the NAS.
3/10/2016 5:29:35 PM :: Error: Access is denied.
--tr:Error code: 0x00000005
Cannot create folder. Folder path: [\\192.168.161.35\USB].
--tr:FC: Failed to create directory. Directory path: [\\192.168.161.35\USB].
--tr:Failed to call DoRpc. CmdName: [FcCreateDir].
Access is denied.
Cannot create folder. Folder path: [\\192.168.161.35\USB].
Is there a way I can pass the NAS credential in the script? It is already stored in Veeam. I have used it to run VeeamZip jobs from the console successfully to the NAS.
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Can you try to run this script via run as local admin account?buldev wrote:I've a problem wih the execution of the Ps, the beginning is good, start but after a few moment : Processing "VM...." Error : Access Denied and this for each VMNAmes
If I do the same VeeamZip directly (in console) work fine .
Unfortunately, currently it is not supported, however you can try to grant access to this share for Veeam backup service account, might do the trick.dtraube wrote:Is there a way I can pass the NAS credential in the script? It is already stored in Veeam. I have used it to run VeeamZip jobs from the console successfully to the NAS.
-
- Novice
- Posts: 5
- Liked: never
- Joined: Mar 09, 2016 2:24 pm
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Same effect with local admin account (even with the domain account), i've also modify the right on the cluster ... always denied ...
-
- VP, Product Management
- Posts: 27377
- Liked: 2800 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
Just to clarify - did you use "run as" elevation or just executed it via logged in user?
-
- Novice
- Posts: 5
- Liked: never
- Joined: Mar 09, 2016 2:24 pm
- Contact:
Re: Start-VBRZip in Veeam Backup Free Edition
with run as , with windows task manager logged user same effect.
I'm on a VM with admin domain account.
Thx
I'm on a VM with admin domain account.
Thx
Who is online
Users browsing this forum: No registered users and 5 guests