Forum Discussion

DPeaco's avatar
DPeaco
Moderator
22 days ago

NBU ITA - Automation Question around server decom for backup clients

Greetings,
I was pondering the idea of: You know, it would be really nice if I could script something that would decom a host that we get a decom ticket for and also remove the assigned system administrator from the Host Groups section for the newly decom'd client server/host.

Let's say I get a ticket to decom server - hotrod1
I would run the final full backup for "hotrod1" in NetBackup, then log onto NBUITA, search for "hotrod1", edit it's assigned host groups so I can remove the system admin from that list, and then hit the "decommission" button and move along to the next ticket.

Is there a way to script/automate the work being done in NBUITA for this task?

Thanks,
Dennis

  • load_package.loadServerFile looks promising for updating an assigned Host Group via CLI Dennis, although I'd definitely try it out on some test boxes to make sure it's letting you change the currently-assigned Host Group and not just adding yet another one to a host. 

    Load details of new hosts or update existing hosts
    https://www.veritas.com/support/en_US/doc/140670999-166019911-0/pgfId-123514-166019911

    Which path to use for the path_to_host_group specification in the csv file for load_package.loadServerFile utility?
    https://www.veritas.com/support/en_US/article.100045284

    As far as the actual decom step I'd be pretty leery of anything changing the internal name of the client via CLI - I know where it used to be tracked in the DB but if an extra table with that info gets added in a new version suddenly you've got a DB inconsistency that's going to bite you at some point; it might be easier/safer to just plan on doing the actual decom step via the GUI still. 

    Now that said, it absolutely IS possible to decom multiple hosts at once if you're getting 10 decom tickets at a time or such. You can either select each manually, or bulk-assign a existing specialized Attribute (mine was "To_Be_Decommissioned") to them (via SQL CLI of course), then filter the Inventory window by that Attribute, select all, then hit Decommission. =) They should all be updated afterwards to remove the Attribute from them of course to prevent future run errors. 

    Hope that helps a bit, let us know how it goes. 

    • DPeaco's avatar
      DPeaco
      Moderator

      Great answer my friend. And here I was thinking along the lines of:

      Run a bash script on the portal server: decom_client.sh arg_1
      And it would go find that host, remove the host group that starts with SysAdmin and mark that client server as decom. :-) 

      I retire on 1 May 2026, so I'm trying to automate as much as I can before I retire.