Discussions specific to tape backups
Post Reply
joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Backup to Tape only last backup with reversed incremental

Post by joergr » Aug 16, 2013 1:06 pm

Friends & Forum,

is there any possibility to let a backup to tape job let only backup the last backup using reversed incremental veeam jobs? even if no backup to tape was written before at all?

here is what i want to do:

- using only reversed incremental mode at all in my jobs, so i have a full backup every day without having to actually wait for a real full backup
- backing up this last vbk to tape every night. only this last - not the previous ones
- do not care about tape protection at all - veeam should overwrite whatever it finds on the tape - whatever time frame has passed - even if the last backup to tape is only 5 hours old

here is what i tried:

- configured no tape protection at all - overwrite everything - don´t care about losing my previous tape data (media set retention is set to "do NOT protect data")
- tried both options at media set config, tried "create new media set for every backup session" and also "always continue using current media set".

No luck so far. The first backup will always backup everything (config as "backups to tape"). if i do a backup afterwards after doing a reversed increment again it will fail asking for another tape (if set to create a new media set for every session) or it will just append to tape (if set to use current media set).

So - it should not care about what´s on the tape at all. It should erase everything on the tape no matter what. AND it should backup only the last vbk in a reversed inc schematic.

Yeah i know - this is a really special scenario. It is for a really special testlab we are working on at this moment ;-) - as many of you know we are workaholic researchers ;-)

The very best regards,
Joerg

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

Re: Backup to Tape only last backup with reversed incrementa

Post by Dima P. » Aug 16, 2013 1:55 pm 3 people like this post

Hello Joerg,
The options you used on the media pull for such scenario are correct:

- No tape protection at all
- Always continue using current media set


When you created backup to tape job did you use the original backup job as a source (or possibly repository)? Also you would need to use Run this job automatically > as a new backup appear option under the backup to tape schedule.
Thank you.

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 16, 2013 2:23 pm 3 people like this post

You can, probably, achieve what you’re after using new PS cmdelts.

1) Turn off completely schedule of a tape job (let’s call it “Tape Job 1”).
2) Write a simple PS script that will erase a certain tape media and execute “Tape Job 1”. (Get-VBRTapeMedium, Erase-VBRTapeMedium)
3) Specify the aforesaid script as the post job activity of a normal backup job.

As the result, once the backup job is finished, script (run as a post job activity) will erase a tape media and execute the “Tape Job 1” that, in its turn, will write a newly-created .vbk file to it.

Thanks.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 16, 2013 2:27 pm

Thanks Vladimir. That argument is sound. Will try ;-)

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 16, 2013 2:31 pm

If you need any assistance with how this process should be scripted, feel free to create a new topic in corresponding subforum (PowerShell). Thanks.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 16, 2013 2:46 pm

Thanks!!

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 16, 2013 3:41 pm

OK, i thought this through. Here are my ideas how to do it. Please tell me if i am on the right way:

Create a PS script which does:

- delete any tape it finds in the streamer (no prob)
- execute the pre configured (with no schedule applied) tape job from within the ps script (no prob)

This script will be used as run as a post job activity for a standard backup job (also no prob).

The only thing which makes me a little headache is how can i make sure the tape job only backups the very latest vbk file and not all vbk files it sees?

Best,
Joerg

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 16, 2013 4:19 pm

But, with the reversed incremental mode there will be only one .vbk file in the end of the job and this file will be copied to a given tape media, right? Or you’re running an active full backup occasionally? Thanks.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 16, 2013 5:58 pm

Yes, Active Fulls are running on some days.

McClane
Expert
Posts: 106
Liked: 11 times
Joined: Jun 20, 2009 12:47 pm
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by McClane » Aug 17, 2013 9:56 pm

I would also like an option to only copy the latest full backup to tape, and not all vbk's in the backup chain since the older vbk is already on an older tape. And space and time are often rare on tapes.

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

Re: Backup to Tape only last backup with reversed incrementa

Post by tsightler » Aug 17, 2013 10:09 pm

If you are using Backup to Tape then VBKs that have already been placed on tape by Veeam will not be copied to tape a second time. Are you referring to VBKs that were put on tape by some other software?

McClane
Expert
Posts: 106
Liked: 11 times
Joined: Jun 20, 2009 12:47 pm
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by McClane » Aug 18, 2013 12:18 pm

Ah ok. When I tested yesterday I had two full backups on the disk and both went to tape. So I assumed after the next full backup both VBKs will go to tape, too. Good to know that it will only backuped once.
I could not find information about this topic in the documentation though.

Dima V.
Veeam Software
Posts: 45
Liked: 6 times
Joined: Oct 21, 2010 8:54 am
Full Name: Dmitry Vedyakov
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by Dima V. » Aug 19, 2013 7:42 am

- do not care about tape protection at all - veeam should overwrite whatever it finds on the tape - whatever time frame has passed - even if the last backup to tape is only 5 hours old
To do this the following options for Media Pool maybe used:
1 "Create new Media Set for every backup session" on Media Set step
2 "do not protect ..." on the Retention step

This would work very well in scenario when you have always Forward incremental backup and wants to archive only last VBK.

If total size of your VBK(s) bigger then the tape capacity don't forget to place appropriate number of free tapes to the Media Pool, or place them in to the Free Media Pool.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 19, 2013 8:41 am

Dmitry: No it will fail asking for another tape, i already mentioned that in my op. But let´s think this through....hmmmmm....do you know if veeam v7 backup to tape from files can handle hard links? if yes, i could try something funny like this here:

Code: Select all

$linkpath = "d:\veeam\veeam-hardlinks\"
$files = dir d:\veeam\veeam-backup\ -filter "*.vbk" -rec
$filteredfiles = $files | group directory | foreach {@($_.group | sort {[datetime]$_.creationtime} -desc)[0]}
ForEach ($File in $filteredfiles)
        {
        $FilePath = $File.DirectoryName
        $FileName = $File.Name
        cmd /c mklink /H $linkpath$Filename $Filepath\$Filename
        }
this should crawl the whole veeam-backup subdirs for the latest vbk and create hard links for each of it at the specified hardlink directory. then i could point my backup to tape from files right to that hardlink dir and after the job kill the hardlinks again. Oh yes, and with Get-VBRTapeMedium, Erase-VBRTapeMedium, i could erase the tape first ;-)

Would that work?

Best,
Joerg

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 19, 2013 9:02 am

But, am I wrong in assuming that in this case you will have to use “files to tape” job instead of “backup to tape” one, and, it in its turn, will inevitably lead to the loss of tracking mechanism: you won’t know on which tape medias particular VMs reside on, what medias are required in order to restore certain VM, etc.?

Thanks.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 19, 2013 9:09 am

absolutely correct. i will take care of this myself. i simply wanted a very very trivial mechanism which does a really full backup every day to tape without caring about retention, logic, etc - this i would do myself. see, again, this is for an experiment in our test lab. many people i know want such an extremely trivial thing. and that was my idea all about ;-)

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 19, 2013 9:35 am

I could point my backup to tape from files right to that hardlink dir and after the job kill the hardlinks again. Would that work?
Honestly, I’ve just done a quick search in order to find a way how a source for “file to tape” job can be changed via PS and it seems that there are none – it can be specified only during the job creation. Therefore, you’ll probably have to create a “file to tape” job within the script and delete it afterwards, once copy operation is finished.

Thanks.

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 19, 2013 10:05 am

Otherwise, you can create a folder called “Latest VBK” and specify it as a source for “file to tape” job. Within a script you should find the latest .vbk file, copy it to the aforesaid folder, execute corresponding tape job and delete .vbk file once the job is done. Thanks.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 19, 2013 10:55 am

;-) i already posted that script and i don´t need to copy all the vbk files because i will try the hardlink approach. please read my previous post where i posted the ps script and tell me what you think about it.

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Aug 19, 2013 11:02 am

Oh, my bad, I’ve missed the point slightly. :) Yep, the usage of the hardlinks might do the trick, indeed; though, it still needs to be verified further. Thanks.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 19, 2013 11:04 am

yep, thats what i am doing right now. i will let you know the results.

joergr
Expert
Posts: 386
Liked: 39 times
Joined: Jun 08, 2010 2:01 pm
Full Name: Joerg Riether
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by joergr » Aug 19, 2013 1:55 pm 3 people like this post

It works. Here is the script. Please do NOT use this if you do not know 100% what you are doing. This is for pure experimental in test labs! It will erase any online tape it finds!

Code: Select all

# create hardlinks from latest vbk files, erase online tape media and start backup job
# joerg riether
# august 2013
# NOT for ANY production use!
# only for experimetal purposes in testlabs
# please do NOT use this if you are not 100% sure what you are doing, this will erase your tape media!

add-pssnapin veeampssnapin

# Settings

$linkpath = "d:\veeam\veeam-hardlinks\"
$backuppath = "d:\veeam\veeam-backup\"

# kill previous hard links

del $linkpath*.*

# use with caution
# this will kill everything it finds in the drives

$tape = get-vbrtapemedium | Where-Object {$_.IsOnline -like "True"}
Erase-VBRTapeMedium -Medium $tape -Confirm:$false

# this will find the latest vbk files for you recursively starting from your backup path.

$files = dir $backuppath -filter "*.vbk" -rec
$filteredfiles = $files | group directory | foreach {@($_.group | sort {[datetime]$_.creationtime} -desc)[0]}

# this loop will separate path and name and it will create your hard links

ForEach ($File in $filteredfiles)
        {
        $FilePath = $File.DirectoryName
        $FileName = $File.Name
        cmd /c mklink /H $linkpath$Filename $Filepath\$Filename
        }

# call your backup to tape from file job pointing to your hard link path

Start-VBRJob -Job "FileToTapeL" -FullBackup

nterreault
Influencer
Posts: 10
Liked: never
Joined: Sep 18, 2013 7:03 pm
Contact:

[MERGED] : Backup to tape / copy to tape, Restore Info

Post by nterreault » Sep 18, 2013 7:53 pm

Here couple of questions

Right now we are doing a backup job to disk for each VM setup in incremental (monday-thursday) + Active full (every friday).
I want to get that Active full to tape.

After my regular backup to disk are done should i do the following ?

1- Launch A Backup to tape selecting only full
But there is no option to select only the last vbk file

or

2- Launch a file to tape selecting only the latest vbk file

I'm not sure and If im not wrong i read somewhere on the forum if you have multiple active full backup for 1 vm, the first backup take all .vbk file but the next backup to tape will take only the latest vbk file will be taken is that right ?

Can we do guest os files restore within the backup or copy job to tape ? from my testing its not seem possible from the copy job to tape, there were no option to do it, but would like confirmation.

Thanks

Nico

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Sep 19, 2013 11:22 am

With the current implementation it’s not possible to copy only the latest .vbk file to tape, using “backup to tape” job. So, the feasible idea in this case would to utilize be “file to tape” job in conjunction with the hardlinks. The example of how this process can be automated is provided above; so, kindly, take a look.

Anyway, thanks for the feedback; much appreciated.

ohuetz
Influencer
Posts: 16
Liked: never
Joined: Mar 30, 2011 3:53 pm
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by ohuetz » Sep 28, 2013 12:15 pm

Hi,
in case of forward incremental backups: what happens if I choose only to copy fullbackups to tape and create that job on base of the b2d-job? Does the b2t-job "build" its own fullbackup out of the first full and the following incrementals?

Kind Regards
Oliver

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Sep 30, 2013 9:41 am

It won’t create anything, instead, it will copy to tape all existing .vbk files that can be found in the specified source. Thanks.

baatch
Enthusiast
Posts: 30
Liked: 4 times
Joined: May 16, 2013 12:52 am
Full Name: Alexander
Contact:

[MERGED] : Backup to tape only latest .vbk ?

Post by baatch » Nov 05, 2013 3:37 pm

Hi

I just tried out the Veeam backup to tape function without the "process incremental backup option" and I thought it would just backup the latest .vbk file but it took all of the .vbk files instead. Is there a way to make it only backup the latest .vbk file?

Maybe I can solve it by changing the tape job to target from Job to a folder (tape) instead and then use a powershell script to make a symbolic link of the latest .vbk file to the folder?

But that seems a little unnecessary so was wondering if it was possible to do in the Veeam settings or not.

Hope you understand what I mean.

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

Re: Backup to Tape only last backup with reversed incrementa

Post by veremin » Nov 05, 2013 4:12 pm

Hi, Alexander.

Currently, there is no “Copy only latest backup” option. So, one of the options will be to utilize hardlinks. More information regarding it can be found in the answers provided above; so, kindly take a look.

Thanks.

baatch
Enthusiast
Posts: 30
Liked: 4 times
Joined: May 16, 2013 12:52 am
Full Name: Alexander
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by baatch » Nov 05, 2013 7:52 pm

Ok thanks for the answear. Is it then possible to start a Veeam tape job with powershell?

I looked through the Powershell reference guide http://helpcenter.veeam.com/backup/70/p ... dlets.html
but can't seem to find any cmdlets for starting a tape backup job?

mhaynesVCI
Novice
Posts: 4
Liked: never
Joined: Oct 24, 2013 11:01 pm
Full Name: Matt Haynes
Contact:

Re: Backup to Tape only last backup with reversed incrementa

Post by mhaynesVCI » Nov 05, 2013 7:55 pm

As much as I appreciate this script and the effort by the team it doesn't help us poor SOBs that are using a network repository to store our backups as hardlinks are not supported.

Is anyone able to comment on if 7.0 U2 will add tape job functionality?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest