B2T synthetic fulls and all rollbacks

Everything about backing up to tape

Re: B2T synthetic fulls and all rollbacks

Veeam Logoby v.Eremin » Fri Sep 06, 2013 8:24 am

Yes, that's correct.

In this case, you have to initiate active full backup of "file to tape" job each time. It can be started either manually (right-click -> Active Full) or through the simple PS script:

Code: Select all
Get-VBRTapeJob -name "Name of tape Job" | Start-VBRJob -FullBackup


Such scenario should guarantee that each time all “source” files will be copied to tape medias. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 969 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: B2T synthetic fulls and all rollbacks

Veeam Logoby edv@scheppach.com » Fri Sep 06, 2013 11:27 am

ok now I solved my problem.

for each backup I have one B2D and one B2T job. B2D jobs run time-sheduled. In every B2D job I configured a post-job-activity to run the following powershell-script:

Code: Select all
Add-PSSnapin VeeamPSSnapIn

$name=$args[0]
$forbdays=@(0,1,6)
# on these days no backup is running
$flag=0
$currentday=(get-date).dayofweek.value__
if ((get-date).hour -lt 6) {$currentday--}
if ($currentday -lt 0) {$currentday=$currentday+7}

# if it's 0 to 6 AM, it will check the past day
# that's because sometimes B2D jobs finish past 0

#check if backup is running today
foreach ($day in $forbdays) {
   
   if ($currentday -eq $day)
   {
      $flag=1
   }
}

# if everything is OK, start the job
if ($flag -eq 0)
{
   Start-VBRjob -Job $name -FullBackup

}

launch the script:
Code: Select all
powershell.exe script.ps1 B2T_nameofthejob

the B2D job is still a incremental with synthetic fulls and rollbacks
the B2T job is a file copy job of the folder that contains all the backup files
edv@scheppach.com
Novice
 
Posts: 8
Liked: never
Joined: Wed Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Veeam Logoby v.Eremin » Fri Sep 06, 2013 12:03 pm

Glad to hear that you’ve nailed down your issue. Nevertheless, it might be worth checking directly ($BackupJob.info.ScheduleOptions.LatestRun.Day) the time a given job was executed, instead of using the said logic:

Code: Select all
Asnp VeeamPSSnapin
$name=$args[0]
$Jobnname=$args[1]
$forbdays=@(1,2,7) #since Day of latest job run is the number from 1 to 7,  the forbidden days should be added with 1
$BackupJob = Get-VBRJob -name $Jobnname
$LatestRun = $BackupJob.info.ScheduleOptions.LatestRun.Day
foreach ($dayin $forbdays) {
   
   if ($LatestRun  -eq $day)
   {
      $flag=1
   }
}
if ($flag -eq 0)
{
   Start-VBRjob -Job $name -FullBackup


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

Previous

Return to Tape



Who is online

Users browsing this forum: No registered users and 9 guests