Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Georgios_Sagos
Participant
Participant

bulk delete licenses on MDS

Hello,

Does anybody know a way bulk delete or clean the lic db on a  MDS?

We have lics that have  replicated 39000 time due to an error that was caused by an auto-licensing issue on Check Points backend.

 I can only see I can delete one at a time, and that's gonna take 6 years, alternatively I will reinstall the whole thing.

0 Kudos
19 Replies
sorinstf
Contributor

Open a support ticket with TAC on licensing, they will help you to clean up the database  , then import support contracts again. 

Don't try anything stupid... don't wanna cry.

0 Kudos
Georgios_Sagos
Participant
Participant

Thanks, already tried that, they cant help, I think I will reinstall it on a new VM.

0 Kudos
Amir_Senn
Employee
Employee

Hi,

If they all have the same signature, maybe one command will remove them all.

If this doesn't work, you can create a script get all signatures in the server to a file and run "cplic del <signature>" in a loop. If all the licenses are identical you can cut the loop short by 1 iteration or remove relevant string from file.

Kind regards, Amir Senn
0 Kudos
Georgios_Sagos
Participant
Participant

unfortunatly not the same signature, the script part might work, but its still a lot of work to pull out all the signatures

0 Kudos
Amir_Senn
Employee
Employee

Example: cplic print -x | awk '{print $3}' > licenses.txt

Kind regards, Amir Senn
0 Kudos
Georgios_Sagos
Participant
Participant

Thanx, I will try this.

0 Kudos
the_rock
Legend
Legend

Let us know if it works.

Andy

0 Kudos
the_rock
Legend
Legend

Just curious, what sort of licences would that command remove?

Best,

Andy

0 Kudos
Amir_Senn
Employee
Employee

That will put all signature in a file, each signature in its own line.

I created a loop for the file to run "cplic del $(cat <filename> | head -1)" for the number of lines in file and remove first line.

Kind regards, Amir Senn
the_rock
Legend
Legend

Got it, thank you!

0 Kudos
the_rock
Legend
Legend

Very neat, just tested it on my Azure lab.

Andy

 

[Expert@azurefw:0]# cplic print -x | awk '{print $3}' > licenses.txt
[Expert@azurefw:0]# more licenses.txt
Signature
dM7FLELPxQSEBZSPr9UBLPrS7sYa9Z878n8j

 

Expiration

XTPC0EZ

CPSB-FW

4O5ZRLS

CPSB-FW

RIAM3XA

CPSB-FW

KPQ5A3P

CPSB-FW

DB4BQMP

CPSB-FW

[Expert@azurefw:0]#

0 Kudos
Georgios_Sagos
Participant
Participant

Thanks for the feed back, I think something else i wrong I get "Failed to delete license", I will contact TAC again.

the_rock
Legend
Legend

Maybe also check with Account services, they might be also able to help.

Andy

0 Kudos
Georgios_Sagos
Participant
Participant

I tried, but no luck. thanks.

0 Kudos
the_rock
Legend
Legend

What did they say?

0 Kudos
Georgios_Sagos
Participant
Participant

We appreciate your response.

I wanted to clarify that this is not a mistake of any specific person or team. This was an auto-generation license error, as previously stated.

Unfortunately, Account Services does not currently have any syntax from our development department that would allow us to immediately delete a large amount of licenses. The maximum amount our licensing expert has determined you may delete at one time is the 100 instances I provided in the previous email.

If you would like to speak with your security engineer and attempt to find an alternate way to delete licenses at once, please feel free to do so. We understand that the provided process will take some time and apologize for the inconvenience. 

Please let me know if you have any further questions or concerns regarding this matter.

 

And then they closed the case

0 Kudos
the_rock
Legend
Legend

Thats unfortunate, but I get it...could Sales person assist more?

Andy

0 Kudos
PhoneBoy
Admin
Admin

Licenses are stored in $CPDIR/conf/cp.license.
Each license is a single line.
I believe you can manipulate this file directly (make backups, etc before doing so) on each affected module.
You will need to execute a cprestart after editing this file (best to do via maintenance window).

Georgios_Sagos
Participant
Participant

Thanks, I will try that

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events