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

How to get revision list information by API or CLI for R80.40

Hi guys,

  How can I get the revision list information by API or CLI for R80.40, I want get revision id as parameter for install-policy CLI to simply rollback the policy installed on the gateway without reverting the database on the manager.

 

Best Regards,

Sam

0 Kudos
8 Replies
PhoneBoy
Admin
Admin

Not sure.
@Omer_Kleinstern ?

0 Kudos
Omer_Kleinstern
Employee
Employee

Revisions can be viewed with show-sessions API with view-published-sessions set to true:

https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/show-sessions~v1.6.1%20 

Sam1
Participant

Thank you very much for your reply, Do you mean that revision UID is actually the published session UID, revision UID = session UID?

Another question I would appreciate if you could answer, If call revert-to-revision to revert to specific version it will roll back not only the database, but also the policy that last installed, right?

Best Regards,

Sam

0 Kudos
PhoneBoy
Admin
Admin

Yes, the session UID is the revision UID in this case.
revert-to-version will only roll back the database on the management, it will not impact the policy installed on the gateway, which must be done separately.

Sam1
Participant

Thanks a lot! However, after I called revert-to-revision API to roll back to the previous version, I found the database rollback was successful, but the last record in policy install history is gone, which means that the contents of the policy have also been rolled back? if not, how do I see the actual content installed on the gateway in dashboard.

WeChat Screenshot_20210107153430.png

Best Regards,

Sam 

0 Kudos
PhoneBoy
Admin
Admin

Remember that a policy install action can only happen AFTER a session is published.
Therefore, if you roll the database back to a specific revision, any records of policy installation that occur after that will also be gone.

The gateway has its own (compiled) version of the policy installed.
There is no simple way to show that policy in SmartConsole or anywhere else.
The only way to affect that is an explicit policy install action. 

Sam1
Participant

Thank you very much for your reply, is there a limit on the number of records or time in the revisions? Can I rollback half a year or more, which means will the revision records from long ago be retained in reversion list? even though there are thousands of records in the revisions, the database retains all published changes(revisions) ?

Best Regards,

Sam

0 Kudos
PhoneBoy
Admin
Admin

The API call will only return a certain number of entries by default, but you can do multiple queries with limit/offset parameters to get all the revisions.
There isn't a specific limit of revisions that I'm aware of, but when you do a version upgrade, the revision history is not carried over.
More precisely, only the published state of the database at the point of upgrade is carried over and any unpublished sessions will be discarded. 

It should also be noted: once you use the revert action, there is no going back short of a full restore from backup, which you hopefully make before using this function.

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events