Solved

Promoting a subclient to default

  • 12 September 2022
  • 11 replies
  • 495 views

Userlevel 5
Badge +16

I know for a FACT that we used to have the ability to promote a non default sub-client to default. 

Recently I have noticed that this appears to be missing. 

 

The question I have is, is there a way to promote a non-default subclient to default that is perhaps not in the GUI?

 

Thanks.

Chris.

icon

Best answer by Brian Bruno 12 September 2022, 18:47

View original

11 replies

Userlevel 7
Badge +23

I could swear there was as well.  I’m looking all over and seeing nothing, so it’s possible it was removed a long time ago and we’re just noticing now.

Let me ask around.

Userlevel 5
Badge +16

Thanks Mike.

Userlevel 5
Badge +12

Hi Chris,

 

Are you sure you’re not thinking of the ability to promote a backupset  to be the new default backupset?  That’s something that we do have available, but I’m not aware that we ever had the built-in ability to make a different subclient the default subclient.

 

Can I ask what the specific use-case is for modifying the default subclient?  We may have the ability to do so via scripts, but that’s a fairly atypical request so not something we have available right in the UI.  I’m just curious why we want to change the default subclient in the first place.

 

-Brian Bruno

Userlevel 5
Badge +16

@Brian Bruno ,

I am quite sure. 

The use case is that we are attempting to clean up an environment and standardize for automation.  The goal is for the underlying clients to be uniform and matching a specific standard.

 

Currently we have a number of clients that have the default subclient disabled, and a secondary subclient configured. 

The default has no backup history and is disabled for backup by default. 

 

Userlevel 6
Badge +14

Correct this option was removed in more recent versions of the software.

We had this ability and an option on a user defined subclient to change it to default however it was removed for various reasons. Currently there is no GUI option.

As @Brian Bruno  noted it most likely could be accomplished with various scripts 

Userlevel 5
Badge +16

 

As @Brian Bruno  noted it most likely could be accomplished with various scripts 

 

That’s what I am asking for, is there an api call or command line solution. 

Userlevel 5
Badge +12

Hi @christopherlecky,

 

We do have a qscript to do this.  Please allow me some time to test it internally and I will send the steps on how to use it.

 

-Brian Bruno

Userlevel 5
Badge +12

Hi @christopherlecky,

 

I just sent you a private message with a link to download a qscript that you can use to achieve your goal.  Typically we would suggest a Support Incident to be open to share qscripts, but we’ve worked together enough times that I know you are a very capable power user :)

 

The script I shared is called ‘ChangeDefaultSubclient.sqle’.  I shared some examples of its usage in my private message, but to include here as well :

 

  1. Copy the script file to the location it will be executed from
  2. Perform a ‘qlogin’ to the command line interface
  3. Execute the script with the following syntax :

qscript -f ChangeDefaultSubclient.sqle -i "c=Client_Name" "a=Agent_Name" "i=Instance_Name" "b=BackupSet_Name" "s=New_Default_Subclient_Name"

 

For the Agent Name, we must refer to the following documentation to get the correct values for each of the supported agents :

https://documentation.commvault.com/2022e/expert/45467_command_line_faq.html

 

For example, a File System agent would be defined as Q_FILESYSTEM, Microsoft SQL Server would be Q_MSSQL, etc.

 

Additionally, the i=Instance_Name can be omitted for agents that don’t leverage an Instance (such as File System).  This input is only needed for Database Agents, and any other agents that have the concept of an Instance.

 

Please let me know if you have any questions or run into snags, but this should give you what you need.

 

-Brian Bruno

 

Userlevel 5
Badge +16

I just realized I never thanked @Brian Bruno for this.

Worked like a charm.

Userlevel 7
Badge +23

He’s a brilliant fella!

Badge +1

Good morning.Can anyone share below script ?

ChangeDefaultSubclient.sqle

 

Thanks

 

Reply