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
Reply
5 Replies
G_W_Albrecht
Champion
Champion

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.

0 Kudos
Reply
DH_ND
Participant

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

 

Cheers

0 Kudos
Reply
Bob_Zimmerman
Advisor

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_
Collaborator

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
Reply
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
Reply