Using tape as a backup target
Post Reply
edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

Hello,

I want to backup all my synthetic fulls and rollbacks to tape everyday. here's my current situation:
- I have about 25 jobs
- each job creates "syntetic full" everyday
- each job creates rollbacks
- the last 35 restore points are kept on disk

so what I have:
backup of the last 35 days, allways full backup of the last day (but only need to receive the changes since last backup) and reversed incremental backup chains to the other 34 days.

Before Veeam 7 I did backup all these backup files to tape with another software; the first tape each month is stored in a safe, the rest will be overwritten after one week.
so I have a backup of every day on tape and just need to keep the month's firsts.



Now I updated to Veeam 7 and wanted to use the tape functionallity of Veeam.

I tried to create a "Backup to Tape" job. But then I saw that there's just the full backup on the tape (the other 34 restore points are gone). is there any way to get all the rollbacks on the tape too?

Dima P.
Product Manager
Posts: 11851
Liked: 1050 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by Dima P. »

Hello,

Just realized, that you are running reversed incremental mode: please note that backup to tape job processes only VBK (full backups) and VIB files (forward increments). Reversed increments (VRB) are skipped form processing. Thank you.

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

- each job creates "syntetic full" everyday
- each job creates rollbacks
I’m wondering why you’ve modified the settings of a given job this way, since just switching to reversed incremental mode will give exactly the same scheme. Thanks.

edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

v.Eremin wrote: I’m wondering why you’ve modified the settings of a given job this way, since just switching to reversed incremental mode will give exactly the same scheme. Thanks.
really? I never understood reversed incremental mode :oops:

d.popov wrote:please note that backup to tape job processes only VBK (full backups) and VIB files (forward increments). Reversed increments (VRB) are skipped form processing. Thank you.
so the only way is to create a "file to tape" job and select all of my backup files themselfs, right?
is there any way to launch this job automaticly once every B2D job is done? (the problem is: I don't know whitch job will be the last to complete, so I cannot start automaticly after the last job)

foggy
Veeam Software
Posts: 19523
Liked: 1780 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by foggy »

You can check the backup to disk jobs statuses via script and launch the tape job on getting success for all of them.

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

really?
Yep, with the reversed mode, the latest restore point will be always a full backup and previous points will be incremental (.vrb) ones. Each run changes literally are injected into the .vbk file to rebuild it to the most recent state of a VM.
so the only way is to create a "file to tape" job and select all of my backup files themselfs, right?
If you’re willing to copy .vrb files to tape, then, yes the only option would be to utilize files to tape job. Otherwise, you can switch to forward incremental mode (without daily synthetic full) and use “backup copy job” in order to process .vib files, as well. Thanks.

edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

foggy wrote:You can check the backup to disk jobs statuses via script and launch the tape job on getting success for all of them.
how to create this script?

another idea would be to create one B2T job for each disk job. how would this affect the used tapes? when I use one job, I have 3 tapes (LTO5 tapes, total ammount of data is about 3.5TB). So I should teach every job to use the last tape. how to do this? (I only use one standalone tape drive, so I don't have to care about concurrent jobs)
v.Eremin wrote: Yep, with the reversed mode, the latest restore point will be always a full backup and previous points will be incremental (.vrb) ones. Each run changes literally are injected into the .vbk file to rebuild it to the most recent state of a VM.
just one question: with my current way, Veeam uses Change block tracking and only saves the amount of new data. For example the full-backup of my fileserver is about 1TB, daily rollbacks are about 1 or 2GB. so for now, I just keep a free disk space of 100GB and everything is OK. is this the same in reversed mode?

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

As mentioned, reversed incremental mode will give you exactly what you’re doing now. It will save only that blocks that have been changed since the latest job run. Thanks.

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

how to create this script?
In the way I see it, the following script should answer your requirements:

Code: Select all

asnp VeeamPSSnapin
$Names = "Backup Job 1" , "Backup Job 2", "Backup Job 3" , "Backup Job 4", "Backup Job 5" # write here the names of your backup jobs 
$TapeJob = Get-VBRTapeJob -name "Name of Tape Job"
do{
Start-sleep -s 900 
$Counter = 0
   Foreach($Job in (Get-VBRJob -name $Names))
   {
   if($Job.GetLastState() -eq "Stopped") {$Counter = $Counter+1}
   }
}while ($Counter -ne 5)
Start-VBRjob -Job $TapeJob 
 
Note:The script keeps checking the statuses of backup jobs in a specified interval (interval is 15 minutes = 900 seconds), though, feel free to change it in accordance with your needs/desires.

Hope this helps.
Thanks.

edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

thanks for the script. but what about the other idea? to create one B2T job for each disk job? is it possible to use the same tape for each job? or is the tape terminated after one job?

foggy
Veeam Software
Posts: 19523
Liked: 1780 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by foggy »

You can target all the jobs to the same media pool and, depending on its settings, they will append to the same tape according to the algorithm briefly described here.

edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

ok now I think everything works; there's just one remaining issue.

for the moment I have one B2D and one B2T job for each backup.

the file to tape job cannot be started automaticly after the B2D job (backup to tape can, but file to tape cannot), so did it vice versa. in the advanced settings of the B2D-job I configured to start the B2T job via command line after the B2D job.

command line is for example "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Manager.exe" backup c3081842-9c7a-4f89-b436-7b9ab0123d17

but this command line just starts an incremental job. is there any command line option to start a full backup?

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

So, generally speaking, you want to copy the whole backup chain to tape medias each day, right? Thanks.

tsightler
VP, Product Management
Posts: 5687
Liked: 2508 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by tsightler »

v.Eremin wrote: I’m wondering why you’ve modified the settings of a given job this way, since just switching to reversed incremental mode will give exactly the same scheme.
Just to point out, some people do this to reduce the time the snapshot is open on the VM since forward incremental mode is generally quite a bit faster for backups of VMs with significant change rate. For example, if an Exchange server takes 2.5 hours to backup using reverse incremental, it may only take 45 minutes for forward incremental, but then take several hours to transform into rollback, however, that means the snapshot is open on the Exchange server for a far shorter period of time as the transform only impact the target storage.

edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

v.Eremin wrote:So, generally speaking, you want to copy the whole backup chain to tape medias each day, right? Thanks.
yes, that's correct.

the background is: I store each month's first backup in a safe. so with these months-backup-tapes I have backups of every day of the last month.
and with the current tape I can restore every day of the current month.

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

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.

edv@scheppach.com
Novice
Posts: 8
Liked: never
Joined: Sep 04, 2013 1:17 pm
Full Name: Scheppach EDV

Re: B2T synthetic fulls and all rollbacks

Post by edv@scheppach.com »

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

veremin
Product Manager
Posts: 17881
Liked: 1673 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: B2T synthetic fulls and all rollbacks

Post by veremin »

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests