Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
DH_ND
Participant

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

 

0 Kudos
8 Replies
G_W_Albrecht
Legend Legend
Legend

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.

CCSE / CCTE / CTPS / CCME / CCSM Elite / SMB Specialist
0 Kudos
DH_ND
Participant

Thanks. IM pretty new to scripting do you hvae any examples?

 

Cheers

0 Kudos
Bob_Zimmerman
Authority
Authority

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.

S_E_
Advisor

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

 

0 Kudos
DH_ND
Participant

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

 

0 Kudos
Arunkumar
Explorer

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.

 
0 Kudos
Tomer_Noy
Employee
Employee

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

 

0 Kudos
Arunkumar
Explorer

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

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.