Start-VBRZip in Veeam Backup Free Edition

PowerShell script exchange

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby tsightler » Tue May 19, 2015 1:20 pm

Any chance this is Windows 2008R2 with a default Powershell 2.0 install? That's a common cause of the missing variables type issues I've seen.
tsightler
Veeam Software
 
Posts: 4874
Liked: 1821 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby CTRidgeline » Tue May 19, 2015 1:25 pm

tsightler wrote:Any chance this is Windows 2008R2 with a default Powershell 2.0 install? That's a common cause of the missing variables type issues I've seen.

Currently running on Windows 7 (test machine). Silly question... What else would I need to be install on top of the default Powershell?
CTRidgeline
Novice
 
Posts: 7
Liked: 1 time
Joined: Wed May 13, 2015 12:52 pm

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby v.Eremin » Tue May 19, 2015 1:33 pm

Just check PS version. If it's 2.0, update it at least to 3.0. Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby CTRidgeline » Tue May 19, 2015 2:32 pm

v.Eremin wrote:Just check PS version. If it's 2.0, update it at least to 3.0. Thanks.

That did the trick! Ran another backup and no error & Details is now there. Thank you for your assistance!
CTRidgeline
Novice
 
Posts: 7
Liked: 1 time
Joined: Wed May 13, 2015 12:52 pm

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby v.Eremin » Tue May 19, 2015 2:59 pm

As Tom's mentioned, we've seen number of cases where some parameters and methods were missing due to an outdated version of Powershell. So, you've just confirmed that.

Glad to hear that you're up and running now.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby CTRidgeline » Tue May 19, 2015 3:21 pm 1 person likes this post

I was also able to make the multiple email addresses work very easily. I updated the email process to be the following (original and updated):

Original code:
Code: Select all
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)
$SMTP.Send($Message)
}


Updated code:
Code: Select all
If ($EnableNotification)
{
foreach ($EmailTo in $EmailTo)
 {
   $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)
   $SMTP.Send($Message)
 }
}
CTRidgeline
Novice
 
Posts: 7
Liked: 1 time
Joined: Wed May 13, 2015 12:52 pm

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby Henning Andersson » Tue May 26, 2015 2:28 pm

This is cool!
I've scheduled a PS-script to create backups of a vm, and it works very well as long as I save the backup file locally. However if I try to save the file to our NAS I am unable to authenticate to the shared folder i have created for saving backups.

I have tried running the scheduled task as an authenticated user. I've also tried adding credentials in Veeam B&R without success.
The only way i have succeeded is by allowing "everyone" to write in my backup share, and I can say I'm not really happy of that way of doing things...
Any suggestions of how to setup this?
Henning Andersson
Lurker
 
Posts: 1
Liked: never
Joined: Tue May 26, 2015 1:53 pm
Full Name: Henning Andersson

[MERGED] : Error when running Start-VBRZip on free version

Veeam Logoby jhyldgaard » Thu May 28, 2015 1:14 pm

I have installed Veeam B&R 8 with update 2 in the free version.
I have use this script to run a full backup: http://www.veeam.com/blog/veeam-backup- ... shell.html
But when i run the scipt i got an error in the log about "Failed to open storage for read/write access".
But if i run the backup from the GUI everthink work fine.

Code: Select all
[27.05.2015 15:13:07] < 13992> ====================================================================================
[27.05.2015 15:13:07] < 13992> {
[27.05.2015 15:13:07] < 13992>   Windows agent.
[27.05.2015 15:13:07] < 13992>   Path to the executable module:C:\Program Files (x86)\Veeam\Backup Transport\x64\VeeamAgent.exe
[27.05.2015 15:13:07] < 13992>   Agent version:8.0.0.2021
[27.05.2015 15:13:07] < 13992>   OS version: Windows Server 2008 R2 (6.1.7601) Service Pack 1
[27.05.2015 15:13:07] < 13992>   Processors num: 2
[27.05.2015 15:13:07] < 13992>   Active processors mask: 3
[27.05.2015 15:13:07] < 13992>   Processor 0: Intel(R) Xeon(R) CPU           E5606  @ 2.13GHz
[27.05.2015 15:13:07] < 13992>   Processor 1: Intel(R) Xeon(R) CPU           E5606  @ 2.13GHz
[27.05.2015 15:13:07] < 13992>   Installed memory, Mb: 12287
[27.05.2015 15:13:07] < 13992>   PID : 12504
[27.05.2015 15:13:07] < 13992> }
[27.05.2015 15:13:07] < 13992> Adjusting system file cache limit (25 percent)
[27.05.2015 15:13:07] < 13992>   Total physical memory instaled: [12287 MB], available: [1117 MB].
[27.05.2015 15:13:07] < 13992> Maximum system file cache size is now [3071 MB]
[27.05.2015 15:13:07] < 13992> VDDK logging level: 1
[27.05.2015 15:13:07] < 13992> Maximum pending blocks value: 10000
[27.05.2015 15:13:07] < 13992> AgentId:{67d4c5d2-8efd-4c64-91d0-79f8bd32bf49}
[27.05.2015 15:13:07] < 13992> stg| Storage current dedupe limit: [8388608].
[27.05.2015 15:13:07] < 13992> Loading registry options.
[27.05.2015 15:13:07] < 13992>     BufReader MAX DATA SIZE: 524288000
[27.05.2015 15:13:07] < 13992>     NetLib MAX RPC PACKET MAX SIZE: 524288000
[27.05.2015 15:13:07] < 13992>     MINIDUMP MODE TYPE: Normal
[27.05.2015 15:13:07] < 13992>     MINIDUMP MODE MASK: 0x00000000
[27.05.2015 15:13:07] < 13992>     VMFS SAN PREREAD BUFFER SIZE: 4194304
[27.05.2015 15:13:07] < 13992> NFS read cache size in MB: 8
[27.05.2015 15:13:07] < 13992> cli| Client session has been started.
[27.05.2015 15:13:07] <  9844> cli| Thread started. Thread id: 9844, parent id: 13992, role: Session container
[27.05.2015 15:13:07] <  9844> srv| Srv. cleanup thread is started.
[27.05.2015 15:13:07] < 10492> cli| Thread started. Thread id: 10492, parent id: 13992, role: VRPC server thread
[27.05.2015 15:13:07] < 10492> net| Veeam RPC server started.
[27.05.2015 15:13:07] < 10492> net| Selected vRPC port: '2500'.
[27.05.2015 15:13:07] < 10492> net| Listening vRPC port '2500'.
[27.05.2015 15:13:07] < 13992> cli|   Opening event: [VeeamEvent{c87e33a7-f9e9-49d7-ae17-69149f4c94f3}]
[27.05.2015 15:13:07] < 13992> cli|   Opening shared memory: [VeeamMem{c87e33a7-f9e9-49d7-ae17-69149f4c94f3}]
[27.05.2015 15:13:07] < 10492> net|   Accepted incoming vRPC connection from '127.0.0.1:55721'.
[27.05.2015 15:13:07] <  6248> cli| Thread started. Thread id: 6248, parent id: 10492, role: Client processor thread (127.0.0.1:55721)
[27.05.2015 15:13:07] <  6248> net| Client connected...
[27.05.2015 15:13:07] <  6248> cli| Creating session ( redirect output session: 'false')
[27.05.2015 15:13:07] <  6248> cli| Client works in standalone mode.
[27.05.2015 15:13:07] < 10492> net|   Accepted incoming vRPC connection from '192.168.0.8:55722'.
[27.05.2015 15:13:07] <  9772> cli| Thread started. Thread id: 9772, parent id: 10492, role: Client processor thread (192.168.0.8:55722)
[27.05.2015 15:13:07] <  9772> net| Client connected...
[27.05.2015 15:13:08] <  9772> cli| Creating session ( redirect output session: 'true')
[27.05.2015 15:13:08] <  9772> cli| Registering stdin/stdout redirector: '12081344'.
[27.05.2015 15:13:08] <  9772> cli| Client works in standalone mode.
[27.05.2015 15:13:08] < 10492> net|   Accepted incoming vRPC connection from '192.168.0.8:55723'.
[27.05.2015 15:13:08] <  7948> cli| Thread started. Thread id: 7948, parent id: 10492, role: Client processor thread (192.168.0.8:55723)
[27.05.2015 15:13:08] <  7948> net| Client connected...
[27.05.2015 15:13:08] <  7948> cli| Creating session ( redirect output session: 'false')
[27.05.2015 15:13:08] <  7948> cli| Client works in standalone mode.
[27.05.2015 15:13:08] <  9772> cli| Next client command: [prepStorageForWriteEx].
[27.05.2015 15:13:08] <  9772> cli|       :>  \\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk
[27.05.2015 15:13:08] <  9772> cli|       :>  1024
[27.05.2015 15:13:08] <  9772> cli|       :>  0
[27.05.2015 15:13:08] <  9772> stg| Checking whether storage to prepare is closed.
[27.05.2015 15:13:08] <  9772> cli| MTA backup apartment was created successfully, id '0x00b89be0'.
[27.05.2015 15:13:08] <   916> cli| Thread started. Thread id: 916, parent id: 9772, role: MTA invoke thread
[27.05.2015 15:13:08] <   916> cli| Entering MTA invoke thread.
[27.05.2015 15:13:08] <   916> stg|   There is no file 'HostFS://\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk' in the files cache.
[27.05.2015 15:13:08] <  9772> stg| Upgrading/fixing storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk]. Standard block size: [1048576]. Block alignment logarithm: [0].
[27.05.2015 15:13:08] <  9772> stg|   Opening storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk] for read/write access.
[27.05.2015 15:13:08] <  9772> cli|     This path \\192.168.0.15\Veeam have not impersonation context
[27.05.2015 15:13:08] <  9772>      ERR |Failed to check whether file '\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk' exists.
[27.05.2015 15:13:08] <  9772>      ERR |Access is denied.
[27.05.2015 15:13:08] <  9772> stg|   Opening storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk] for read/write access. Failed.
[27.05.2015 15:13:08] <  9772> stg| Upgrading/fixing storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk]. Standard block size: [1048576]. Block alignment logarithm: [0]. Failed.
[27.05.2015 15:13:08] <  9772> cli| Removing stdin/stdout redirector: '12081344'.
[27.05.2015 15:13:08] <  9772>      ERR |Access is denied.
[27.05.2015 15:13:08] <  9772>      >>  |--tr:Failed to open storage for read/write access. Storage: [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk].
[27.05.2015 15:13:08] <  9772>      >>  |--tr:Failed to upgrade/fix the storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk].
[27.05.2015 15:13:08] <  9772>      >>  |--tr:Client failed to process the command. Command: [prepStorageForWriteEx].
[27.05.2015 15:13:08] <  9772> cli| Starting to send error string [Access is denied.
[27.05.2015 15:13:08] <  9772> cli| --tr:Failed to open storage for read/write access. Storage: [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk].
[27.05.2015 15:13:08] <  9772> cli| --tr:Failed to upgrade/fix the storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk].
[27.05.2015 15:13:08] <  9772> cli| --tr:Client failed to process the command. Command: [prepStorageForWriteEx].
[27.05.2015 15:13:08] <  9772> cli| --tr:event:3:
[27.05.2015 15:13:08] <  9772> cli| ] to manager.
[27.05.2015 15:13:08] <  9772> cli| Sending error string [Access is denied.
[27.05.2015 15:13:08] <  9772> cli| --tr:Failed to open storage for read/write access. Storage: [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk].
[27.05.2015 15:13:08] <  9772> cli| --tr:Failed to upgrade/fix the storage [\\192.168.0.15\Veeam\Backup_SrvSQL_2015-05-27T151213.vbk].
[27.05.2015 15:13:08] <  9772> cli| --tr:Client failed to process the command. Command: [prepStorageForWriteEx].
[27.05.2015 15:13:08] <  9772> cli| --tr:event:3:
[27.05.2015 15:13:08] <  9772> cli| ] completed.
[27.05.2015 15:13:08] <  9772> net| Connection closed...
[27.05.2015 15:13:08] <  9772> cli| Thread finished. Role: 'Client processor thread (192.168.0.8:55722)'.
[27.05.2015 15:13:09] <  7948> cli| WARN|Input TCP stream was closed
[27.05.2015 15:13:09] <  7948> net| Connection closed...
[27.05.2015 15:13:09] <  7948> cli| Thread finished. Role: 'Client processor thread (192.168.0.8:55723)'.
[27.05.2015 15:13:09] <  6248> cli| Next client command: [shutdown].
[27.05.2015 15:13:09] <  6248> cli| Processing shutdown command.
[27.05.2015 15:13:09] < 14540> cli| Finalization thread: Received external stop event.
[27.05.2015 15:13:09] < 14540> cli| Thread finished. Role: 'Event listener thread'.
[27.05.2015 15:13:09] <  6248> net| Connection closed...
[27.05.2015 15:13:09] <  6248> cli| Thread finished. Role: 'Client processor thread (127.0.0.1:55721)'.
[27.05.2015 15:13:09] < 10492> net| Terminating by stop event in CTcpThread::WaitOrStop.
[27.05.2015 15:13:09] < 10492> net| Stopping client sessions.
[27.05.2015 15:13:09] < 10492> net| Veeam RPC server stopped.
[27.05.2015 15:13:09] < 10492> cli| Thread finished. Role: 'VRPC server thread'.
[27.05.2015 15:13:09] < 13992> cli|   Cleaning all resumable operations.
[27.05.2015 15:13:09] < 13992> srv|   Stopping srv. cleanup thread.
[27.05.2015 15:13:09] <  9844> srv|   Finalizing srv. sessions.
[27.05.2015 15:13:09] <  9844> srv| Srv. cleanup thread is finished.
[27.05.2015 15:13:09] <  9844> cli| Thread finished. Role: 'Session container'.
[27.05.2015 15:13:09] < 13992> srv|   Srv. cleanup thread was stopped.
[27.05.2015 15:13:09] < 13992> dsk|   Removing attached vmdk disks.
[27.05.2015 15:13:09] < 13992> dsk|   Disconnecting all VMs...
[27.05.2015 15:13:09] < 13992> dsk|     Removing all vm connections
[27.05.2015 15:13:09] < 13992> dsk|   All VMs were successfully disconnected.
[27.05.2015 15:13:09] < 13992> cli| Client has been stopped.
[27.05.2015 15:13:09] < 13992> cli| Destroying connection pools.
[27.05.2015 15:13:09] < 13992> cli| Destroying connection pools. ok.
[27.05.2015 15:13:09] < 13992> cli| Max system file cache limit disabled.
[27.05.2015 15:13:09] < 13992> cli| The agent session has finished successfully.


Please help.
jhyldgaard
Lurker
 
Posts: 2
Liked: 1 time
Joined: Wed May 27, 2015 6:56 am
Full Name: Jens Hyldgaard Petersen

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby v.Eremin » Fri May 29, 2015 9:53 am

v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby jhyldgaard » Fri May 29, 2015 2:49 pm 1 person likes this post

Thanks Eramin - now it is working :-)
jhyldgaard
Lurker
 
Posts: 2
Liked: 1 time
Joined: Wed May 27, 2015 6:56 am
Full Name: Jens Hyldgaard Petersen

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby v.Eremin » Fri May 29, 2015 2:53 pm

Glad to hear my input was helpful. Feel free to ask me, should other help with scripting be needed. Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby gregory_afnor » Wed Jun 03, 2015 8:49 am

Hy,
Thank for scripting for us.
I got "Start-VBRZip : License is not installed".

What's wrong ?
Grégory
gregory_afnor
Lurker
 
Posts: 2
Liked: never
Joined: Wed Jun 03, 2015 8:40 am
Full Name: Grégory Molin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby v.Eremin » Thu Jun 04, 2015 9:56 am

What product version you're using? Are you positive VB&R 8 Update 2 is installed? Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby gregory_afnor » Thu Jun 04, 2015 12:34 pm

Hi,
After the Update 2, it's work.

Thank
Grégory
gregory_afnor
Lurker
 
Posts: 2
Liked: never
Joined: Wed Jun 03, 2015 8:40 am
Full Name: Grégory Molin

Re: Discussion on blog post: Update 2 featuring PowerShell

Veeam Logoby v.Eremin » Thu Jun 04, 2015 12:35 pm

Update 2 is required, because only in that release did we make Start-VBRZIP commandlet availabe in free edition. Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

PreviousNext

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 1 guest