- Products
- Learn
- Local User Groups
- Partners
- More
Quantum Spark Management Unleashed!
Introducing Check Point Quantum Spark 2500:
Smarter Security, Faster Connectivity, and Simpler MSP Management!
Check Point Named Leader
2025 Gartner® Magic Quadrant™ for Hybrid Mesh Firewall
HTTPS Inspection
Help us to understand your needs better
CheckMates Go:
SharePoint CVEs and More!
Hi,
i wrote below script for my customer to automate gaia configuration backup of gateway . Script runs on management and it can fetch the "show configuration" of all the gateway and create a file for individual gateway .
Steps :
Perform below on management server .
*****************************************
[Expert@PROD-MGMT-R80:0]# cat gaiafwbkp.sh
#!/bin/sh
source /opt/CPshrd-R80/tmp/.CPprofile.sh
for dest in $(<gateway_ip_list.txt); do
hostname=`cprid_util -server $dest -verbose rexec -rcmd /bin/bash -c "hostname"`
now=$(date +"%m_%d_%Y")
cprid_util -server $dest -verbose rexec -rcmd /bin/clish -c "show configuration" > /var/log/gaiagwbkp/$hostname$now
done
************************************
4. run script gaiafwbkp.sh
5. Schedule job from GAIA portal using job scheduler
6. if needed you can run another job to ftp this backup files to ftp server as well
Thanks for sharing, very useful.
Nice!
CDT only works on R77.30 and later.
I could see this script being useful on older systems, potentially.
That said, I must provide a word of caution with this approach.
Especially in some earlier versions of Gaia, the order that "show configuration" outputs the commands in won't necessarily work when you import that same configuration.
@PhoneBoy , yep: the add and set sequence gets out of whack. Still seeing it happening when attempting to replicate old Gaia configs on the newly deployed gateways using output of "show configuration".
Theoretically, pasting this file twice should solve these issues, as the prerequisites will take effect in the first pass and dependent settings in second.
sk111158: Central Deployment Tool (CDT)
I love this idea, and the script works great if I run it manually but has anyone been able to make it run via Job Scheduler? Doesn't work for me. Running R80.30. I have updated the relevant paths to R80.30 and even went so far as to add an absolute path for cprid_util, still nothing.
Thanks for any suggestions
Andrew
Just install CDT on your management, edit $CDTDIR/CentralDeploymentTool.xml to your needs and add the following line to the job scheduler of your management server:
source /etc/profile.d/CP.sh; . $CDTDIR/CentralDeploymentTool -rma -backupall 2>/dev/null
Late to the show but maybe this helps anyone else: For me, a similar solution worked only after adding hostname entries for the gateways. And I had to remove nonprintables from hostnames which did get there anyhow I dont know. You may find scripts for adding hostnames and doing config backups on my Github repository (https://github.com/dj0nz/cptools).
But I agree with other comments here: Check out CDT if you can spare the time. Probably the better long-term solution.
Thank you Harshpal for sharing the detailed steps.
I have successfully implemented this in my infra, but facing one issue, the configuration file is being written max 59kb and for some gw , the configuration output is incomplete due to this.
is there any way to increase the output file size or wait until the complete configuration captured before running the scripts on the next Gw.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
User | Count |
---|---|
7 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 |
Wed 03 Sep 2025 @ 11:00 AM (SGT)
Deep Dive APAC: Troubleshooting 101 for Quantum Security GatewaysThu 04 Sep 2025 @ 10:00 AM (CEST)
CheckMates Live BeLux: External Risk Management for DummiesWed 10 Sep 2025 @ 11:00 AM (CEST)
Effortless Web Application & API Security with AI-Powered WAF, an intro to CloudGuard WAFWed 10 Sep 2025 @ 11:00 AM (EDT)
Quantum Spark Management Unleashed: Hands-On TechTalk for MSPs Managing SMB NetworksWed 03 Sep 2025 @ 11:00 AM (SGT)
Deep Dive APAC: Troubleshooting 101 for Quantum Security GatewaysThu 04 Sep 2025 @ 10:00 AM (CEST)
CheckMates Live BeLux: External Risk Management for DummiesWed 10 Sep 2025 @ 11:00 AM (EDT)
Quantum Spark Management Unleashed: Hands-On TechTalk for MSPs Managing SMB NetworksAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY