Set Location of exported Tape

  • 17 November 2021
  • 10 replies

Badge +4

Is there a command line or script to set just the Location property of a previously exported tape?


The below Command did not work. 

./qoperation media -o export -b 000298L6 -l RLS-0 -el "xxx - 05" -m xxx-ma-01 -v -tf /home/xxx/tokenfile.cvlt
Request successful.
[xxx@xxx-ma-01 Base]$

CommVault 11.24.12


10 replies

Userlevel 7
Badge +23

Hi @Eduardo Braga !

Let’s take a look at the syntax first, and likely the log files.

Per the docs, we get an example:

E:\commandline>qoperation media -o export -b 127126 -l lib1 -el loc1 -m med1 -v 1

Looking at your example, you don’t have an answer for the -v (-v Verify OML before export (0/1)

Can you retry with a 1 or 0?

I’m curious to see what shows up in qcommand.log (and maybe EvMgrS.log as well).

Badge +4

It returns “media: Error 0x301: Unsupported option” 




Userlevel 7
Badge +23

Ahhhhhhhh, I think I see it!  I was wondering why it didn’t like -v 0, and noticed it said “-o” was unsupported, but you have the option as 0.

Then, I looked at your string for any option with -o and think I found the issue.

Your library name has a -0 in the name.  I have a feeling the command is seeing that as RLS with a -0 argument.

Can you retry with single or double quotes around the library name?

Badge +4


The command completed without erros, but the Location property is not altered.



Userlevel 7
Badge +23

@Eduardo Braga , can you see what commandline.log and evmgrs.log show when you run this?  It seems to think it did what you asked…..


Badge +4

Mike, thank you again, can you point me the directions here? How can I find those logs? commandline.log and evmgrs.log. I’m running that command from a Linux Media Agent Server. It says Request successful, but the Location property is not updated. 

I'll take an example.Tape 000300L6. This tape was exported, but without the location given. And now we want to fix that.


The command line below does not work even though It returned success.

./qoperation media -o export -b 000300L6 -l "RLS-0" -el "Caixa - 05" -m "cvault-ma-01" -v -tf /home/ebraga/tokenfile.cvlt




Userlevel 7
Badge +23

Apologies for the delay (I was out of the office all last week).

If it’s on a Linux server, look for qcommand.log.  Hopefully we can see something that stands out (trying to avoid a support case :nerd: ).

Badge +4

No problem, Mike. Is there a way to capture the command sent by Commcell Console? I want to capture the command when I update the Location Property. 



Userlevel 7
Badge +23

I believe yes….though I can’t remember how.

I’ll look into this and get an answer for you @Eduardo Braga !

Userlevel 7
Badge +23

@Eduardo Braga , apologies on the long delay!

I have the instructions!

You can try 1 of 2 ways:

GUI logging --> have to hit alt + f8 to enable GUI logging




EvMgrS.log --> typically you need to have elevated debug on the log to show the underlying XML, as its not printed with default debug level. usually debug level 5 would do the trick


Most of the time you can hit alt f8, perform the operation, and then open up the GUI log and look for the XML.  You can then copy / paste the XML into a text file with a .xml extension and then execute it via command line :


qoperation execute -af argumentFile.xml