Using TAGs in Backup jobs

VMware specific discussions

Using TAGs in Backup jobs

Veeam Logoby J.Haatainen » Thu Mar 26, 2015 1:11 pm

Hi!

Do you know if it's possible to do advanced automation on Backup Job with Tags?

Now in v8, it's possible to backup VM's depending on what TAG that VM has, but, as far as i know, I can't combine those tags.

To explain my need:
I have two SQL servers, production and testing.
Production server has tags "Env: PRODUCTION" & "Type:SQL"
Test server has tags "Env: TEST" & "Type:SQL"

Then I have servers like
Production APP with tags "Env: PRODUCTION" & "Type:Application"
Test APP with tags "Env: TEST" & "Type:Application"


And I want to create backup job, that takes backup of all production SQL servers.

But, if in backup job, I use tag SQL, it will backup also test SQL server. And if I use tag PRODUCTION, it will backup also Application server.

So what I want to do, is a backup job with rule that combines TAG:SQL & TAG:Production. Is that possible, or do I still need to use Powershell to do this?

Even more what I'd like to do, is to combine tags with other attributes, like Tags & Clusters etc, it would be really easy to do nicely automated backup jobs, if that would be possible :)

Regards,
Janne
J.Haatainen
Novice
 
Posts: 9
Liked: 5 times
Joined: Mon Oct 27, 2014 6:36 pm

Re: Using TAGs in Backup jobs

Veeam Logoby Vitaliy S. » Thu Mar 26, 2015 2:08 pm

Hi Janne,

Tags are combined with "OR" operator in the job, so if you add one tag all VMs that have this tag will be backed up. As a workaround, you may want to create extra tag (3rd one) for all SQL Servers in production and then add this tag to the backup job as a source.

P.S. you can automate tags creation via Veeam ONE Business View categorization rules.

Hope it helps!
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1106 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Using TAGs in Backup jobs

Veeam Logoby v.Eremin » Thu Mar 26, 2015 3:33 pm

To explain my need:
I have two SQL servers, production and testing.
Production server has tags "Env: PRODUCTION" & "Type:SQL"
Test server has tags "Env: TEST" & "Type:SQL"

Then I have servers like
Production APP with tags "Env: PRODUCTION" & "Type:Application"
Test APP with tags "Env: TEST" & "Type:Application"

And I want to create backup job, that takes backup of all production SQL servers.

I'm not sure, but what if you try to add TAG SQL to the job source and and TAG TEST to the job exclusions? In this case, only one server out of four provided ones would match the specified settings; which seems to be the exact situation you're willing to achieve.

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

Re: Using TAGs in Backup jobs

Veeam Logoby dellock6 » Thu Mar 26, 2015 4:29 pm

Hi, just checked in my lab, at this time when you select a Tag for backups, exclusions can only be applied to specified VMs that have that tag.
Luca Dell'Oca
EMEA Cloud Architect @ Veeam Software

@dellock6
http://www.virtualtothecore.com
vExpert 2011-2012-2013-2014-2015-2016
Veeam VMCE #1
dellock6
Veeam Software
 
Posts: 5055
Liked: 1336 times
Joined: Sun Jul 26, 2009 3:39 pm
Location: Varese, Italy
Full Name: Luca Dell'Oca

Re: Using TAGs in Backup jobs

Veeam Logoby J.Haatainen » Fri Mar 27, 2015 8:35 am

Ok, thank's to you all for quick reply.

That clarified that what I need to do. That example was actually quite a lot simplified from my real life situation, but I will start to build up a powershell script to achieve my needs.

If I manage to get it working, I will post it to forums :)

Regards,
Janne
J.Haatainen
Novice
 
Posts: 9
Liked: 5 times
Joined: Mon Oct 27, 2014 6:36 pm

Re: Using TAGs in Backup jobs

Veeam Logoby v.Eremin » Fri Mar 27, 2015 9:09 am

Using PowerCLI commandlets, it shouldn't be that hard to achieve your goal. Something like the following should allow you to get list of corresponding VMs that can be added to a backup job then.

Code: Select all
Get-VM | where {$_.Tag -eq "Tag1" -and $_.Tag -eq "Tag2"}


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

Re: Using TAGs in Backup jobs

Veeam Logoby Gostev » Fri Mar 27, 2015 4:17 pm

Why not manage this at tag level instead? For example, create 3rd tag on all VMs which have required 1st and 2nd tag, and use 3rd tag to populate the job? There is pretty much no limit to amount of categories and tags you can have on the VM... and you can fully automate this process with Veeam Business View (which is free).
Gostev
Veeam Software
 
Posts: 21396
Liked: 2350 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Using TAGs in Backup jobs

Veeam Logoby kylemartin901 » Thu Feb 18, 2016 2:28 am

How would you use Veeam One to assign the 3rd tag to a VM based on the conditions of the 1st and 2nd tag that would be able to be used by to create the Veeam backup job?

eg The backup job uses the tag "Backup Job: Production SQL" how do you get Veeam One to set the tag "Backup Job: Production SQL" to the VMs if they contain the tags "Env: PRODUCTION" AND "Type:SQL"

If I try to use rules there is no selection to use VM tags when you select object type VMs and Type properties. If I try to use Groups you can't use AND or OR conditions in your expressions.
kylemartin901
Service Provider
 
Posts: 6
Liked: 2 times
Joined: Sun Nov 13, 2011 9:37 pm
Full Name: Kyle Martin

Re: Using TAGs in Backup jobs

Veeam Logoby Vitaliy S. » Thu Feb 18, 2016 12:27 pm

Hi Kyle,

If you want to use existing tags, then dynamic groups should be your choice. Can you please post me the example of regular expression you want to use as it should be possible in v9?

Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1106 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Using TAGs in Backup jobs

Veeam Logoby kylemartin901 » Thu Feb 18, 2016 11:31 pm

Thanks Vitaliy,

I am trying to put in place a system similar to that proposed by Luca in https://www.veeam.com/wp-advanced-polic ... -tags.html

I have created a dynamic group called "Backup Job" and would like to use an expression like this example to build out my backup job tags based on the policy tags.

Code: Select all
CASE
WHEN ((Tag("Application Quiescence") = "Quiescence YES") AND (Tag("Backup Encryption") = "Encryption NO") AND (Tag("RPO") = "RPO 24 Hour") AND (Tag("OS") = "Windows")) THEN "Windows non encrypted 24 hour non application aware backup"
ELSE ""
END
kylemartin901
Service Provider
 
Posts: 6
Liked: 2 times
Joined: Sun Nov 13, 2011 9:37 pm
Full Name: Kyle Martin

Re: Using TAGs in Backup jobs

Veeam Logoby Vitaliy S. » Fri Feb 19, 2016 3:44 pm 1 person likes this post

Ok, got it! Backup does not allow choosing AND/OR operators, but in Veeam ONE you can create additional tag for this use case. This new tag will have data about both tags.
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1106 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Using TAGs in Backup jobs

Veeam Logoby dellock6 » Sun Feb 21, 2016 9:24 am

And so you know Kyle, the request to have the AND boolean operator in tags management in addition to OR has been submitted different times by other customers, so your feedback counts towards the chance to have this improvement in one of the following next releases. Thanks!
Luca Dell'Oca
EMEA Cloud Architect @ Veeam Software

@dellock6
http://www.virtualtothecore.com
vExpert 2011-2012-2013-2014-2015-2016
Veeam VMCE #1
dellock6
Veeam Software
 
Posts: 5055
Liked: 1336 times
Joined: Sun Jul 26, 2009 3:39 pm
Location: Varese, Italy
Full Name: Luca Dell'Oca

Re: Using TAGs in Backup jobs

Veeam Logoby kylemartin901 » Sun Feb 21, 2016 11:25 pm 1 person likes this post

Thanks,

I worked out I could use the string concatenation operator "+" to add all the tag categories into a single string and then do an equality on that string.

Code: Select all
CASE
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "WindowsEncryption NORPO 24 HoursQuiescence YES" THEN "Windows non encrypted 24 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "LinuxEncryption NORPO 24 HoursQuiescence YES" THEN "Linux non encrypted 24 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "WindowsEncryption YesRPO 24 HoursQuiescence YES" THEN "Windows encrypted 24 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "LinuxEncryption YesRPO 24 HoursQuiescence YES" THEN "Linux encrypted 24 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "WindowsEncryption NORPO 12 HoursQuiescence YES" THEN "Windows non encrypted 12 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "LinuxEncryption NORPO 12 HoursQuiescence YES" THEN "Windows non encrypted 12 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "WindowsEncryption YesRPO 12 HoursQuiescence YES" THEN "Windows encrypted 12 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "LinuxEncryption YesRPO 12 HoursQuiescence YES" THEN "Windows encrypted 12 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "WindowsEncryption NORPO 1 HourQuiescence YES" THEN "Windows non encrypted 1 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "LinuxEncryption NORPO 1 HourQuiescence YES" THEN "Windows non encrypted 1 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "WindowsEncryption YesRPO 1 HourQuiescence YES" THEN "Windows encrypted 1 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "LinuxEncryption YesRPO 1 HourQuiescence YES" THEN "Windows encrypted 1 hour application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "Encryption NORPO 24 HoursQuiescence NO" THEN "Non encrypted 24 hour non application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "Encryption YESRPO 24 HoursQuiescence NO" THEN "Encrypted 24 hour non application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "Encryption NORPO 12 HoursQuiescence NO" THEN "Non encrypted 12 hour non application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "Encryption YESRPO 12 HoursQuiescence NO" THEN "Encrypted 12 hour non application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "Encryption NONRPO 1 HourQuiescence NO" THEN "Non encrypted 1 hour non application aware backup"
WHEN (Tag("OS Type") + Tag("Backup Encryption") + Tag("RPO") + Tag("Application Quiescence")) = "Encryption YESRPO 1 HourQuiescence NO" THEN "Encrypted 1 hour non application aware backup"
WHEN Tag("RPO") = "RPO No Backup" THEN "No Backup"
ELSE "Non encrypted 24 hour non application aware backup"
END
kylemartin901
Service Provider
 
Posts: 6
Liked: 2 times
Joined: Sun Nov 13, 2011 9:37 pm
Full Name: Kyle Martin

[MERGED] Feature Suggestion: VM selection by multiple condit

Veeam Logoby svenh » Wed Mar 02, 2016 1:21 pm 1 person likes this post

Hi!

I want to suggest a feature to allow for a more fine grained selection of VMs to backup, built upon already available features: Folders and Tags.

Right now I can select a folder to backup and then exclude VMs based on folders, storages and tags.

But what I am missing for full flexibility is to be able to select VMs based on folder AND tags combined.

Example: A folder structure with a folder for every department. Inside each folder there are VMs with different tags. I now want to be able to create a job which backups every VM from folder "Dept-X" AND "Tag: Important" and another Job which backups VMs from folder "Dept-X" AND "Tag: Linux", etc.

Right now I have to have a quite complex exclusion list, being able to just use an AND conjunction would be much easier.
svenh
Enthusiast
 
Posts: 26
Liked: 5 times
Joined: Thu Jan 21, 2016 12:56 pm
Location: Germany
Full Name: Sven Hartge

Re: Using TAGs in Backup jobs

Veeam Logoby foggy » Wed Mar 02, 2016 1:39 pm

Hi Sven, your request is accepted. Above you can find some hints on how to work around this limitation.
foggy
Veeam Software
 
Posts: 14765
Liked: 1083 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Next

Return to VMware vSphere



Who is online

Users browsing this forum: Bing [Bot] and 12 guests