Discussions related to exporting backups to tape and backing up directly to tape.
Post Reply
nfma
Novice
Posts: 6
Liked: never
Joined: Mar 21, 2017 11:27 am
Contact:

Current backup chain to discrete tapes - not working

Post by nfma »

Hi there,

we have a customer that has the following backup infrastructure:

-physical machine functioning as Veeam backup server & vSphere vCenter server; also attached via 10Gbit to a NAS (working as primary repository) & has a simple tape drive attached (via SAS)
-daily incremental backups of 23 VMs to an SMB share on the NAS (the NAS replicates this backup repository to another off-site NAS)
-jobs are timed to start from 17:15 through ~17:40 and are finished at around 19:00, latest
-active full backup of all jobs on Friday

The customer needs an additional daily tape job that copies the whole current/last backup chain to the tape that is currently inserted in the tape drive.
Regardless the content of the tape and whether it has been used before on that Veeam server: The daily tape job needs to make sure that the whole current backup chain of all backup jobs is written to that tape. And even if that tape has been used before on a day inside the current backup chain and may have valid restore points for that job, it is paramount that the job will rewrite the WHOLE backup chain.

While testing this (with one tape for now and without ejecting), we created a new tape job that is scheduled to start at 20:00 (when all primary backups are finished) from Sunday to Thursday (Friday & Saturday aren't necessary).

We created a new Media Pool called "daily backups":
"Add tapes from Free media pool automatically when more tapes required" is CHECKED.
"Create new media set for every backup session" is CHECKED.
"Do not protect data (cyclically overwrite tapes as required" is CHECKED.

The tape job:
Is set to use the jobs, not the repository.
"one or more source backup jobs have multiple backup chains already created. Should only the latest chain, or all existing chains be sent to tape upon the first job run?" --> was set to "Latest"
Full Backup uses Media Pool "daily backups"
"Archive incremental backups to tape" is CHECKED & also uses the "daily backups" Media Pool
Options--> Advanced Settings --> "Advanced "Process latest full backup chain only" is CHECKED
"Export current media set upon completion" is NOT CHECKED (!)

While testing this we experienced the problem that the tape job will only write the new incrementals to the tape and not the whole backup chain anew. So we added a before-run script:

Code: Select all

Get-VBRTapeDrive | Move-VBRTapeMedium -MediaPool Free -Confirm:$false
Which has the effect that the whole tape is "new" and Veeam successfully rewrites the whole chain to the tape, regardless if we are still in the incremental line.

So far so good.

The next phase would be the following:
-the tape job ejects the tape after its run (which didn't work at first because of a lock failure --> driver wasn't installed in non-exclusive; now it ejects succesfully)
-the admin removes the tape from the drive the next morning and sends it to the bank
-the admin inserts a new tape --> this new tape should again get the whole current chain up to and including the last AFB in the next run at 20:00 and eject afterwards
-rinse and repeat

I added the following code to the before-run script:

Code: Select all

Get-VBRTapeLibrary | Start-VBRTapeInventory
This has the effect that the inserted tape is made "known" to Veeam so that it can be used (for new tapes that were never "manually" inventoried, so as to automate it all a bit more)

The problem:
Veeam only writes the last incrementals to the new tape, not the whole current chain.

Now, why is Veeam doing this?
Do I have to automatically move all offline tapes into a to-be-configured vault (called "Bank")?
Do I have to check "Export current media set upon job completion"? But then again, when every job instance creates a new media set regardless, why does it somehow continue a different media set? Or am I completely misunderstanding something here?

Again: The aim is to convince Veeam to always write the whole current chain of the linked jobs to the current inserted tape. Not only the incrementals since.

Thanks for your suggestions.
lyapkost
Expert
Posts: 221
Liked: 48 times
Joined: Nov 27, 2015 2:26 pm
Full Name: Konstantin
Location: Saint Petersburg
Contact:

Re: Current backup chain to discrete tapes - not working

Post by lyapkost »

Hi.

Is there a real need to rebackup the whole current chain every day? Why not schedule to write synthetic full backup every day so that each tape contains only one today's full? If it won't meet your customer's policy than it looks like the only way is to create post-job script for source job which will create new backup to tape job every day.

The alternative is to mark just written tape as free with post-job script. Data will remain on the tape and the only problem in this case is necessity to catalog the tape before performing restore should it be needed.
nfma
Novice
Posts: 6
Liked: never
Joined: Mar 21, 2017 11:27 am
Contact:

Re: Current backup chain to discrete tapes - not working

Post by nfma »

Is there a real need to rebackup the whole current chain every day?
Yes, since the customers policy is to be able to restore the whole datacenter from one tape and one tape only, without the need for tape-juggling ^^
Why not schedule to write synthetic full backup every day so that each tape contains only one today's full?
That's a good suggestion, if it'll meet the scheduling requirements. I'll talk it through.
If it won't meet your customer's policy than it looks like the only way is to create post-job script for source job which will create new backup to tape job every day.
We actually tried creating a new tape job (that uses the existing 'daily backup' media pool), but that job again only wrote the last incremental. Or, while testing throughout today, none at all since the media pool 'daily backups' already HAD the latest (incremental) restore point on tape.
The alternative is to mark just written tape as free with post-job script. Data will remain on the tape and the only problem in this case is necessity to catalog the tape before performing restore should it be needed.
It's a bit squirmish, but that might be the alternative...


Over the course of the day it got me thinking: When the tape job directs its backups into the 'daily backup' media pool and only writes the data to tape that is not yet inside that media pool - why not create a different media pool & job? This is actually viable for our customer, since the tapes are recycled every week.
So I added another media pool 'Friday', created a new tape job that writes on this media pool and hit Run. The new tape job started to write the whole backup chain - although there is another media pool that already contains the backup chain. Nice.

This is how we ended up and test it over the next weeks:
So we have tapes labeled 'Monday', 'Tuesday', Wednesday', 'Thursday' & 'Friday' (labeled for the day the are put in). I created media pools for those days. And I created tape jobs for Mo-Fr, each one using the respective Mo-Fr media pool (with the exception of a job that runs on Sunday but writes on the media pool 'Friday' since no one changes the tape on Sunday and the AFBs on Friday take too long for a tape job on Friday, so Friday is skipped).
lyapkost
Expert
Posts: 221
Liked: 48 times
Joined: Nov 27, 2015 2:26 pm
Full Name: Konstantin
Location: Saint Petersburg
Contact:

Re: Current backup chain to discrete tapes - not working

Post by lyapkost »

nfma wrote:We actually tried creating a new tape job (that uses the existing 'daily backup' media pool), but that job again only wrote the last incremental.
That is very strange, different jobs don't depend on each other even if they are pointed to the same media pool.

Everything else makes sense as well as consideration of scheduling synthetic full every day if the policy allowes it.
Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests