- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- Export with API for re-import
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Export with API for re-import
Is there a compilation of options for export with the API commands and Python options in a single thread?
For example, is there a step-by-step guide to do export on an SMS in expert mode or via a remote machine with Python installed (admin Windows 10 PC)?
There are a lot of good threads but no clean walk through guides that I have found
Thanks,
Don
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I always use Check Points Management API Reference as a starting point and the officially supported ExportImportPolicyPackage or ShowPolicyPackage, depending on what I'm trying to achieve. The ShowPolicyPackage easily provides me with a JSON export I can work with, but I haven't tried yet to re-import into a fresh SMS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that is good, especially the Tips & Best Practices, with the examples with jq.
And then there are these options:
mgmt_cli –r true show hosts limit 250 --format json | jq -r '.objects[] | (“add host name “ + .name + “ ipv4-address ” + .”ipv4-address”)'
I am looking for a bit of a dummy guide to that ExportImportPolicyPackage 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's why my go-to solution is often ShowPolicyPackage as explained above. Plus it's already pre-installed on newer SMSs. Just run $MDS_FWDIR/scripts/web_api_show_package.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's great, thanks Danny.
There was mention a few years ago about about an API command to get the config out in the format that it would need to be in to go (straight) back in (into the API). The jq options helps to filter the api output, ready to go back in but I wonder if it could be easier.
Obviously migrate export/migrate_server etc. are the DR backup, and essential but I am wondering if there is an API option (maybe via Python) to get the web_api_show_package back in via the API or the top option (API command to get the config out in the format that it would need to be in to go back in (into the API).
Rgds,
Don
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe the PostgreSQL database backup is also worth to be checked as an alternative to migrate export/migrate_server.
Export: pg_dump dbname > outfile
Import: psql dbname < infile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
+1
I would love to be able to export/import parts of the config, policy & objects in some kind of standard format without having to use external tools that may not be reachable (think proper appliance with no shell)
