Discussions related to exporting backups to tape and backing up directly to tape.
Aerospace
Influencer
Posts: 11 Liked: 1 time
Joined: Mar 03, 2016 9:18 am
Full Name: Martin Müller
Contact:
Post
by Aerospace » Mar 16, 2016 7:00 am
this post
Hello,
i have a script which move all Tapes from my Temp Pool in the Free Pool.
But as Post Script this Script does not work, only manuelly.
In the Log the Script was success
Code: Select all
Add-PSSnapin VeeamPSSnapIn
$jobName = "Backup2Tape - Täglich"
$job = Get-VBRTapeJob | where {$_.Name -eq "$jobName"}
if ($job.LastResult -eq "Success")
{
$tape = Get-VBRTapeMedium -MediaPool "Täglich Temp"
Move-VBRTapeMedium -Medium $tape -MediaPool "Free" -Confirm:$false
}
PTide
Product Manager
Posts: 6551 Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:
Post
by PTide » Mar 17, 2016 12:02 pm
this post
Hi,
Please try wrapping a .bat file around your .ps1 script and see if calling .bat instead of .ps1 will do the job.
Thank you.
Aerospace
Influencer
Posts: 11 Liked: 1 time
Joined: Mar 03, 2016 9:18 am
Full Name: Martin Müller
Contact:
Post
by Aerospace » Mar 17, 2016 1:11 pm
this post
i do this currentlly via batch
Code: Select all
cd /d %~dp0
cls
powershell.exe -Noninteractive -file "Taeglich Temp - Tape in Media Pool Free verschieben.ps1"
PTide
Product Manager
Posts: 6551 Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:
Post
by PTide » Mar 17, 2016 2:13 pm
this post
That looks unexpected - please contact our support team and post your case ID in this thread.
Thank you.
veremin
Product Manager
Posts: 20415 Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Mar 21, 2016 12:12 pm
this post
But as Post Script this Script does not work, only manuelly.
Are you positive you were using the same account in both cases? I mean doesn't Veeam service account lack required permissions by any chance? Thanks.
Aerospace
Influencer
Posts: 11 Liked: 1 time
Joined: Mar 03, 2016 9:18 am
Full Name: Martin Müller
Contact:
Post
by Aerospace » Mar 29, 2016 6:01 am
1 person likes this post
this works fine
1. Change the Backup Job to run a batch file instead of the powershell directly, e.g. "E:\Batches\TestBatchFile.bat"
2. Inside the batch file, use the "start" command to launch the powershell, e.g. Start powershell.exe -Noninteractive -File E:\Batches\TestPowershell.ps1
3. Inside the Powershell, pause the script for 60 seconds e.g. Start-Sleep -s 60
Users browsing this forum: No registered users and 7 guests