- CheckMates
- :
- Products
- :
- CloudMates Products
- :
- Cloud Network Security
- :
- Discussion
- :
- Migrate export scripting
- 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
Migrate export scripting
Hi Checkmates
I've been tasked with taking a migrate export once a week from several of our SMS devices in the Azure and copying it to a share.Is it possible to script and schedule this operation.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can call $FWDIR/bin/upgrade_tools/migrate
from a script, but the export file is written locally. You will need a second script to do the file transfer later.
If you use GAiA WebGUI System Management > Job Scheduler, define three jobs: One with the migrate export command, a second for the file transfer and a third for deleting the export file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. IM pretty new to scripting do you hvae any examples?
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I built this script which handles the creation and deletion of the exports. It doesn't currently handle copying the file off, because I didn't have a key-based SSH server handy at the time, but that part is the easiest to automate.
Edited to add: To clarify, that exact script is for mds_backup files. It should be pretty easy to modify for migrate export on a SmartCenter. You would need to change the "Run the backup" section, the *.mdsbk.* part in the SCP section and the "If the SCP worked" section, and the subject and body in the emails at the beginning and end. The file rotation logic is sound.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If I understand correctly, DH_ND is trying to run a frequent 'migrate export'.
And to my knowledge, there is always a cpstop/mdsstop required. And of course the start of the services again. Which creates always an unavailability of MGMT. Other admins can't connect or are being disconnected.
Depending on the requirement, backup/mds_backup might be a good alternative.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi S_E_
Yes thats correct. These will be run during the night so unless we are experiencing issues then other admins won't be on. If services need to be started we can always use the console thorugh Azure.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are trying to use job scheduler for creating migrate export, but it is not working. We are using the below configuration.
add cron job Config_Backup command "/opt/CPsuite-R81/fw1/bin/upgrade_tools/migrate export /var/log/MigrateExport/Mgmt_Backup -n" recurrence daily time 21:40
could you please confirm if we have to consider anything to make it working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are using a relatively new version, you should probably be using the new API / management CLI command for migrate export:
https://sc1.checkpoint.com/documents/latest/APIs/#cli/migrate-export-domain~v1.8%20
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the details. I have even tried like below and it is working.
add cron job Config_Backup command "source /etc/profile.d/CP.sh ; /opt/CPsuite-R81/fw1/bin/upgrade_tools/migrate export /var/log/MigrateExport/Mgmt_Backup -n" recurrence daily time 21:40