<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Export with API for re-import in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125824#M6109</link>
    <description>&lt;P&gt;Is there a compilation of options for export with the API commands and Python options in a single thread?&lt;/P&gt;&lt;P&gt;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)?&lt;/P&gt;&lt;P&gt;There are a lot of good threads but no clean walk through guides that I have found&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/Python-tool-for-exporting-importing-a-policy-package-or-parts-of/td-p/41100" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion/Python-tool-for-exporting-importing-a-policy-package-or-parts-of/td-p/41100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Don&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 23:15:57 GMT</pubDate>
    <dc:creator>Don_Paterson</dc:creator>
    <dc:date>2021-08-05T23:15:57Z</dc:date>
    <item>
      <title>Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125824#M6109</link>
      <description>&lt;P&gt;Is there a compilation of options for export with the API commands and Python options in a single thread?&lt;/P&gt;&lt;P&gt;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)?&lt;/P&gt;&lt;P&gt;There are a lot of good threads but no clean walk through guides that I have found&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion/Python-tool-for-exporting-importing-a-policy-package-or-parts-of/td-p/41100" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion/Python-tool-for-exporting-importing-a-policy-package-or-parts-of/td-p/41100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Don&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:15:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125824#M6109</guid>
      <dc:creator>Don_Paterson</dc:creator>
      <dc:date>2021-08-05T23:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125825#M6110</link>
      <description>&lt;P&gt;I always use Check Points &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#introduction~v1.8" target="_self"&gt;Management API Reference&lt;/A&gt;&amp;nbsp;as a starting point and the officially supported&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_self"&gt;ExportImportPolicyPackage&lt;/A&gt;&amp;nbsp;or&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/ShowPolicyPackage" target="_self"&gt;ShowPolicyPackage&lt;/A&gt;, depending on what I'm trying to achieve. The&amp;nbsp;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.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:25:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125825#M6110</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2021-08-05T23:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125826#M6111</link>
      <description>&lt;P&gt;Yes, that is good, especially the Tips &amp;amp; Best Practices, with the examples with jq.&lt;/P&gt;&lt;P&gt;And then there are these options:&lt;/P&gt;&lt;P&gt;mgmt_cli –r true show hosts limit 250 --format json | jq -r '.objects[] | (“add host name “ + .name + “ ipv4-address ” + .”ipv4-address”)'&lt;/P&gt;&lt;P&gt;I am looking for a bit of a dummy guide to that ExportImportPolicyPackage&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_blank"&gt;https://github.com/CheckPointSW/ExportImportPolicyPackage&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:25:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125826#M6111</guid>
      <dc:creator>Don_Paterson</dc:creator>
      <dc:date>2021-08-05T23:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125827#M6112</link>
      <description>&lt;P&gt;That's why my go-to solution is often&amp;nbsp;&lt;SPAN&gt;ShowPolicyPackage as explained above. Plus it's already pre-installed on newer SMSs. Just run&amp;nbsp;&lt;CODE&gt;$MDS_FWDIR/scripts/web_api_show_package.sh&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:30:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125827#M6112</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2021-08-05T23:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125828#M6113</link>
      <description>&lt;P&gt;That's great, thanks Danny.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Don&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 23:43:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125828#M6113</guid>
      <dc:creator>Don_Paterson</dc:creator>
      <dc:date>2021-08-05T23:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125832#M6114</link>
      <description>&lt;P&gt;Maybe the&amp;nbsp;&lt;A href="https://www.postgresql.org/docs/9.1/backup-dump.html" target="_self"&gt;PostgreSQL database backup&lt;/A&gt; is also worth to be checked as an alternative to &lt;SPAN&gt;migrate export/migrate_server&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;Export:&amp;nbsp;&lt;CODE&gt;pg_dump dbname &amp;gt; outfile&lt;/CODE&gt;&lt;BR /&gt;Import:&amp;nbsp;&lt;CODE&gt;psql dbname &amp;lt; infile&lt;/CODE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 00:06:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/125832#M6114</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2021-08-06T00:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export with API for re-import</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/155939#M7080</link>
      <description>&lt;P&gt;+1&lt;/P&gt;&lt;P&gt;I would love to be able to export/import parts of the config, policy &amp;amp; objects in some kind of standard format without having to use external tools that may not be reachable (think proper appliance with no shell)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 06:42:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Export-with-API-for-re-import/m-p/155939#M7080</guid>
      <dc:creator>cosmos</dc:creator>
      <dc:date>2022-08-30T06:42:41Z</dc:date>
    </item>
  </channel>
</rss>

