05-17-2015 04:58 AM
Hello Experts,
Pls help me with the below syntax
I want to move mulitple tapes from old to new. I can do it for one easily but unable to do it for multiple.Some syntax missisng
C:\Program Files\Veritas\NetBackup\bin\admincmd>bpmedia -movedb -oldserver med01 -newserver med02 -m media id 1 2 3 4 5...so on
Solved! Go to Solution.
05-17-2015 05:37 AM
Hi Hargyan,
I never see, we can move ownership of mutiple media by putting it into single command saprated by space.
You need to run the command for each media saprately.
However, if you are trying to move all media that are assigned to one media server (oldservername) to
another media server (newservername). You can use
bpmedia -movedb -allvolumes -newserveroldservername -oldserver newservername]
05-17-2015 05:37 AM
Hi Hargyan,
I never see, we can move ownership of mutiple media by putting it into single command saprated by space.
You need to run the command for each media saprately.
However, if you are trying to move all media that are assigned to one media server (oldservername) to
another media server (newservername). You can use
bpmedia -movedb -allvolumes -newserveroldservername -oldserver newservername]
05-17-2015 05:47 AM
Hi,
Put all the media ID's in a file (mymedia.txt). Then from CLI run
for /F "usebackq tokens=1" %i IN (`"type mymedia.txt"`) DO @echo bpmedia -movedb -oldserver med01 -newserver med02 -m %i
That will give you all the commands, copy and paste them to execute.
05-17-2015 08:38 AM
Hi Riaan,
Where do i execute this command...
Also pls let me know if i save it on D drive what is the syntax then.
/F "usebackq tokens=1" %i IN (`"type mymedia.txt"`) DO @echo bpmedia -movedb -oldserver med01 -newserver med02 -m %i
05-17-2015 09:31 AM
Just open CMD
Navigate to same folder that you create your mymedia.txt file in (doesn't matter if its D, or E, of F)
then just paste the command I gave you
for /F "usebackq tokens=1" %i IN (`"type mymedia.txt"`) DO @echo bpmedia -movedb -oldserver med01 -newserver med02 -m %i
05-17-2015 09:43 AM
05-20-2015 07:14 AM
I tried running this command for 5 medias but it created 5 separete commands but didnot move anything.
Hi Mariaane...
decommission
05-20-2015 07:27 AM
Show what you did and got?
05-20-2015 07:58 AM
Show us your command and the output.
05-21-2015 09:11 PM
Yes, cause the command is using ECHO which means type the command.
You need to highlight the output (5 lines), right click (to copy), and right again to paste and execute (assuming you've got quickedit more selected in properties of the CMP prompt), then finally press enter once more as the last line needs to be executed too.
05-21-2015 09:25 PM
05-22-2015 06:00 AM
Hi Marianne,
I found this one intersting nbdecommision.
nbdecommission is an interactive command line tool to assist in correctly disabling and/or removing policies, storage units, backup images and storage devices so the media server could be retired or replaced.
But below two query.
1:- If we dont add any new media server. Does it delete all existing media written by old media server?
2:- if we add new media server. Does it migrate the old media server written to new media server?
05-22-2015 06:07 AM
If you do not specify new mediaserver for media ownership, all media/images will be expired (not deleted), but only when you reply with 'Y'.
If you specify new media server, all media ownership will be transferred.
See:
Decommission actions
http://www.symantec.com/docs/HOWTO106701
About decommissioning a media server
http://www.symantec.com/docs/HOWTO106661