cancel
Showing results for 
Search instead for 
Did you mean: 

create a volume pools in command line

MariusD
Level 6

Hi all,

 

can I create "n" Volume Pools and add a Tape in the Pool who was created .... in command line?????

I want to create 37 Volume Pools with 1 Tape in each pool with one command line. (NetBackup 6.5.2 for Windows Server 2003 x64).

Wait for an answer.

 

 Tks,

Marius D.  

1 ACCEPTED SOLUTION

Accepted Solutions

Karthikeyan_Sun
Level 6

I think this Batch file will be Helpful if you are using windows platform.

 

cd \
cd C:\Program Files\Veritas\Volmgr\bin
vmpool -create -pn INCR01 -description "INCR-01"
vmadd -m TAPE01 -mt HCART2 -p 4
vmpool -create -pn INCR02 -description "INCR-02"
vmadd -m TAPE02 -mt HCART2 -p 5
vmpool -create -pn INCR03 -description "INCR-03"
vmadd -m TAPE03 -mt HCART2 -p 6
vmpool -create -pn INCR04 -description "INCR-04"
vmadd -m TAPE04 -mt HCART2 -p 7
vmpool -create -pn INCR05 -description "INCR-05"
vmadd -m TAPE05 -mt HCART2 -p 8
vmpool -create -pn INCR06 -description "INCR-06"
vmadd -m TAPE06 -mt HCART2 -p 9
vmpool -create -pn INCR07 -description "INCR-07"
vmadd -m TAPE07 -mt HCART2 -p 10
vmpool -create -pn INCR08 -description "INCR-08"
vmadd -m TAPE08 -mt HCART2 -p 11
vmpool -create -pn INCR09 -description "INCR-09"
vmadd -m TAPE09 -mt HCART2 -p 12
vmpool -create -pn INCR10 -description "INCR-10"
vmadd -m TAPE10 -mt HCART2 -p 13

 

Save this File from Notepad with .bat extension

 

In this Pool no (-pn ) is the Volme Pool Number. By Default 6.5 having 3 Volme Pools 

 

Number 0 - None

Number 1 - NetBackup 

Number 2 - DataStore

Number 3 - CatalogBackup

 

So Select your Pool Number according to you Environment.

 

Let me know if u have any more issues !!! 

View solution in original post

7 REPLIES 7

Karthikeyan_Sun
Level 6

I think this will be helpful !!

 

install_path\Volmgr\bin\vmpool [-h EMM_server | volume_database_host]

-list_all [-b|-bx] | -list_scratch | -list_catalog_backup | -create

-pn pool_name -description description [-mpf mpf_max] | -update -pn

pool_name [-description description] [-mpf mpf_max] | -delete

pool_name | -set_scratch pool_name | -unset_scratch pool_name |

-set_catalog_backup pool_name | -unset_catalog_backup pool_name



 

MariusD
Level 6

ok, thank you for this command, but:

 

i want to make 20 volume pools: 

 

create volume pool "increm01" -> and add tape: "tape01"  {20 tapes: from Monday -Friday , 4 weeks}

create volume pool "increm02" -> and add tape: "tape02" 

....

create v.p. "increm20" -> add tape: "tape20"

 

create v.p. "full_weekly01" -> add "tape21"   {14 tape: each Satursday for 3 Months}

.... 

create v.p. "full_weekly14" -> add "tape34"

 

create v.p. "full_monthly01" -> "tape35"

create v.p. "full_monthly02" -> "tape36"

 

create v.p. "full_quarterly01" -> "tape37"

 

 

 I want also for all days one policy with schedules for each tape/day. i want to do all off this with one command or one script, but I don´t know how.

 

can you help me???

MariusD
Level 6

I have found this command:

 

vmpool -create -pn {pool name} ...

bppolicynew {policy name} -M {master server} ...

     bpplsched {policy name} -V -M {master server} -L -label {schedul name} ..

     bpplclients {policy name} -add {host name} ...

     bppinclude {policy name} -add {paht name} -f {file name}...

 

 

 I want to make somethingto do all this commands automat, and repeate for "n" pools and "n" schedules.

 

 

Get some help?!?!?!?!

Darren_Dunham
Level 6

You'll have to run the 'vmpool' command 20 times to create 20 pools.  Automating that isn't really part of NetBackup.  You'd use a scripting language like shell/batch/perl/java/VB to do it.  Take your pick. 

 

Once you've created the pools, you can use 'vmchange' to change the pool of an existing (but unallocated) volume into that pool. 

 

--

Darren 

Karthikeyan_Sun
Level 6

I think this Batch file will be Helpful if you are using windows platform.

 

cd \
cd C:\Program Files\Veritas\Volmgr\bin
vmpool -create -pn INCR01 -description "INCR-01"
vmadd -m TAPE01 -mt HCART2 -p 4
vmpool -create -pn INCR02 -description "INCR-02"
vmadd -m TAPE02 -mt HCART2 -p 5
vmpool -create -pn INCR03 -description "INCR-03"
vmadd -m TAPE03 -mt HCART2 -p 6
vmpool -create -pn INCR04 -description "INCR-04"
vmadd -m TAPE04 -mt HCART2 -p 7
vmpool -create -pn INCR05 -description "INCR-05"
vmadd -m TAPE05 -mt HCART2 -p 8
vmpool -create -pn INCR06 -description "INCR-06"
vmadd -m TAPE06 -mt HCART2 -p 9
vmpool -create -pn INCR07 -description "INCR-07"
vmadd -m TAPE07 -mt HCART2 -p 10
vmpool -create -pn INCR08 -description "INCR-08"
vmadd -m TAPE08 -mt HCART2 -p 11
vmpool -create -pn INCR09 -description "INCR-09"
vmadd -m TAPE09 -mt HCART2 -p 12
vmpool -create -pn INCR10 -description "INCR-10"
vmadd -m TAPE10 -mt HCART2 -p 13

 

Save this File from Notepad with .bat extension

 

In this Pool no (-pn ) is the Volme Pool Number. By Default 6.5 having 3 Volme Pools 

 

Number 0 - None

Number 1 - NetBackup 

Number 2 - DataStore

Number 3 - CatalogBackup

 

So Select your Pool Number according to you Environment.

 

Let me know if u have any more issues !!! 

MariusD
Level 6

A good idee with this Batch file ...but ca I do all of this with one command or a little program in batch programing??

 

    "

     cd \
     cd C:\Program Files\Veritas\Volmgr\bin

     vmpool -create -pn INCR01 -description "INCR-01"
     vmadd -m TAPE01 -mt HCART2 -p 4

    .................

    vmpool -create -pn INCRn -description "INCR-n"
    vmadd -m TAPEn -mt HCART2 -p n+4"                      where "n" - positive number.

 

   cd\

   cd C:\program Files\Veritas\NetBackup\bin\admincmd

   bppolicynew POLICY_TEST 

   bpplclients ......................

   bpplinclude  ........................

   bpplsched POLICY_TEST -add MONDAY01 -...

   bpplsched POLICY_TEST -add MONDAY02 -...

   bpplsched POLICY_TEST -add MONDAY03 -...

   bpplsched POLICY_TEST -add MONDAY04 -...

 

   bpplsched POLICY_TEST -add TUESDAY01 -...

   ...

   bpplsched POLICY_TEST -add TUESDAY04 -...

   ...

   bpplsched POLICY_TEST -add FRIDAY04 -...

 "

 

I can do all of this manual in Administration Console (easier) but a want the PC to do all. I give just first name ex.: INCR01 and n volume pools,  TAPE01 and n tapes, ... something do it with batch programming.

knows somebody????

 

 

Karthikeyan_Sun
Level 6

ThisThis VB Script Will do that things Easily !!!

 

Dim IDCount,tpvmno

tpvmno=0

For IDCount= 0 to 11


strcommandvm="vmpool -create -pn INCR" & IDCount & " -description INCR" & IDCount

tpvmno=IDCount+4

strcommandtp="vmadd -m TAPE" & IDCount & " -mt HCART2 -p " & tpvmno

Set objShell = CreateObject("WScript.Shell")

Set objExec = objShell.Exec("SETX HOMEPATH C:\Program Files\Veritas\Volmgr\bin")

Set objExec = objShell.Exec(strcommandvm)

Set objExec = objShell.Exec(strcommandtp)

Next

Wscript.Echo "Task Completed. Thanks for using the script!!!!"

 

In this tpvmno is for Volume Pool No- Choose this accrding to your environment !

 

Save this File as .VBS

 

Let me know if you have any more Clarification !!!