06-15-2018 03:14 PM
Dear Team,
It's look like there are 2 methods for Panorama backup through API.
curl -o {{server_backup_file}} -k https://{{Panorama_IP_@}}/api/?type=export&category=configuration&key={{Panorama_API_key>}}
or
curl -k https://{{Panorama_IP_@}}/api/?type=op&cmd=<save><config><to>{{Panorama_backup_file}}</to></config></save>&key={{Panorama_API_key}}
then retrieve the file through SCP
But the outputs look different:
[admin@elkrsg01 ~]$ file backup*
backup_API80.xml: UTF-8 Unicode text, with very long lines
backup_SCP80.xml: XML 1.0 document, ASCII text
[admin@elkrsg01 ~]$ wc -lwc backup*
1112 1439 126998 backup_API80.xml
3986 4313 177296 backup_SCP80.xml
5098 5752 304294 total
Customer would like to know which method is fully supported?
Regards
Sam Prabhu
06-16-2018 03:17 AM
Hi @sprabhu
Does it need to be done by an API call? If not, probably the best way is the scheduled config export (https://www.paloaltonetworks.com/documentation/80/pan-os/web-interface-help/panorama-web-interface/p... ). This way panorama daily saves the panorama configuration and all the configurations of the managed firewalls to an SCP or FTP server.
06-16-2018 03:18 AM
With the API I would use the export which you already mentionned or this one for the panorama config:
https://PANORAMA/api/?type=op&cmd=<show><config><running><%2Frunning><%2Fconfig><%2Fshow>
And the running config of the firewalls with the same save command but add this to the url to get the firewall running config:
&target=<device-serial-number>
06-21-2018 07:55 AM
Hi ,
Thank you for your response.
Since they plan to automate the solution with API, they'd like to do all things by API.
SCP or FTP scheduling on Panorama is not an option. They want to trigger by an orchestration server the backup.
They just need to know which command is the best and if there is some issue later be sure that it will be supported.
Regards
Sam Prabhu
01-10-2022 10:04 AM
Sorry to hit the way-back machine on this post, but I need to do this and have no idea how to start. Can anyone step me though it?
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!