cancel
Showing results for 
Search instead for 
Did you mean: 

Move Media

H_Sharma
Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions

Born2rise
Level 4

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]

View solution in original post

12 REPLIES 12

Born2rise
Level 4

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]

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

H_Sharma
Level 6

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

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

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

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
What exactly is the purpose of your command? Are you trying to decommission a media server? Do you want to move ownership of all media for server1 to server2? Or just move ownership of some media?

H_Sharma
Level 6

I tried running this command for 5 medias but it created 5 separete commands but didnot move anything.

Hi Mariaane...

 decommission 

sdo
Moderator
Moderator
Partner    VIP    Certified

Show what you did and got?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

Show us your command and the output. 

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
Since you want to move media as a step to decommission a media server, why not use nbdecommission?

H_Sharma
Level 6

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?

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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