cancel
Showing results for 
Search instead for 
Did you mean: 

command to run manual backup for a single VMfor Vmware backups which has a query with 1000 vm

noazara
Level 6
   VIP   
 
command to run manual backup for a single VM for Vmware backups which has a query with 1000 vm.
Below command is giving error:
bpbackup -i -p pol1  -s Daily_BKP  -q ‘vmware:/?filter= Displayname Equal “VM1"
11 REPLIES 11

Marianne
Level 6
Partner    VIP    Accredited Certified
Create new policy with schedule and required retention and no backup window (so that policy can only be kicked off manually).
Add VM client name manually.

I cannot see any other way.

L_BR
Level 5

Just create a separate policy for the VM you want to backup? 

quebek
Moderator
Moderator
   VIP    Certified

Hey

Find this VM previous backup in acitivity monitor - with required schedule - right click that job and select Restart Job

that's all

noazara
Level 6
   VIP   
its a first time backup

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello,

as stated above by Marianne, separate policy with explicitly given VMware client(s) is required. No way to launch query-based VMware policy with just one client.

On the other hand, no need to have separate policy for each client, you can have generic policy and update clients in it as needed.

I have also reviewed bpbackup command reference and "-q" parameter is not possible.

regards

Michal

 

Systems_Team
Moderator
Moderator
   VIP   

Hi Folks,

I have to respectfully disagree with Michal on one point Smiley Very Happy

I have VMware Intelligent policies that I use just for this purpose, and they use a VIP query.  An example of the query would be:    VMDNSName Equal "server.example.com"

This works flawlessy for backing up a single VM client.  I use them for testing individual clients, and I have a similar one for doing an initial full VIP query MSSQL backup on a single client.  I only activate these policies when needed.  I also have one I use in production for an Exchange backup where only one client is selected via query.

So for the OP's query, new single policy for that VM looks like the only way.  Only other choice is to retweak the existing policy (the one that does 1000 VM's) temporarily and use logic to only select the one client required....but I'd rather leave that alone and do a special one-off policy for the single client.

I'm on 7.7.3

Steve

sdo
Moderator
Moderator
Partner    VIP    Certified

perhaps this command:

bpbackup -i -p pol1 -s Daily_BKP -q 'vmware:/?filter= Displayname Equal "VM1"

...was missing a trailing single quote, and maybe should have been:

bpbackup -i -p pol1 -s Daily_BKP -q 'vmware:/?filter= Displayname Equal "VM1"'

...but I am assuming the OP has checked the syntax is mostly correct.

*** Edit - because even the first quote was not a quote in the OP's post - it was an apostrophe.  Anyway, now corrected above - but I've still no way of checking whether the syntax is correct either.

noazara
Level 6
   VIP   

ok i am trying below command:

 

bpbackup -i -p pol1  -s Daily_BKP  -q ‘vmware:/?filter= Displayname Equal “VM1"'

X2
Moderator
Moderator
   VIP   

@Systems_Team- good way to do the singular backup for a VM using VIP.

The very fact that in a VIP one can build a query, there are different possibilities to do such backups. I call them ondemand backups. The way I have implemented them is using a separate policy and used the query builder to add the conditions and an extra condition: Annotation contains "SingleVMBackup". Now add the string to the Notes section of the particular VM and test the query. Only that VMs containing that string will be selected for backup. Once backup is done, remove the annotation. I find this easier as the change is on vCenter, rather than changing the policy every time on the NetBackup console when using DNSName or something similar.

Hope this was helpful.

Systems_Team
Moderator
Moderator
   VIP   

Hi X2,

Yeah, the options are endless when using VIP queries Smiley Happy

I also use VMware Custom Attributes extensively for my backups.  I have custom attributes like NB_BACKUP_STANDARD, NB_BACKUP_MSSQL and NB_BACKUP_MSEXCHANGE set at the virtual machine level.

I either populate these with a YES or leave them blank.  I can then configure my query to include something like [NB_BACKUP_STANDARD] Equal "YES" to include those systems, and like you can just tweak that attribute to turn the backup off or on without modifying the policy.

Steve

noazara
Level 6
   VIP   

its giving error:

 

[root@bkpma01 bin]#  ./bpbackup -i -p pol1 -s Daily_Full_7d -t 40  -q 'vmware:/?filter= Displayname Equal “VM1"'
USAGE: bpbackup [-p policy] [-s schedule] [-k "keyword phrase"]
           [-L progress_log [-en]] [-S master_server...]
           [-t policy_type] [-w [hh:mm:ss]]
           -f listfile | filenames
       bpbackup -i [-p policy] [-s schedule] [-k "keyword phrase"]
           [-L progress_log [-en]] [-S master_server...] [-t policy_type]
           [-h hostname [-instance instance_name [-database database_name]]] [-w [hh:mm:ss]]
       bpbackup -dssu DSSUname [-S master_server]
EXIT STATUS 144: invalid command usage