Subscribe

DFM initiating Pre-Exec Post-Exec scripts

I have not found any guidance on getting pre-exec and post-exec scripts to run from DFM for my backups (like OSSV).

I have some OSSV "hosts" (backup clients to the NetApp server) which need a pre-exec script to quiesce their database before the backup is taken.

I see under the Policies/Protection properties and Nodes and Connections and Primary Data (whew!) there's a section with "Backup Script" and "Path" and "Run As"

I am guessing that I will setup ssh-keygen password-less logins between the DFM server and my backup client that needs the script ran.

Then I will put a script on the DFM server called "dfm_ossv_backup_clientx_pre.bat" which will call the preexec script on my backup client which is setup to so an OSSV backup via DFM. 

Have I missed where this process is mentioned in the manual?

Does anyone have any help for me whether I'm approaching this correctly?

much appreciation, kudos and points awarded for any help

cheers,

Kevin

http://hypervisorsrus.blogspot.co.uk

Re: DFM initiating Pre-Exec Post-Exec scripts

Hi Kevin,

I've been using oncommand 1 year now and even had a "netapp oncommand specialist" to perform some fine tuning...well i didn't get any answer on the exact same question

My oncommand environment runs on windows 2008 server, domain member and whenever i execute a failover or backup script (perl or batch), the runas logs as "nt authority\system"

Sorry if i'm not really helping but i just wanted to share my xp on this matter. Plus the huge lack of documentation and support from netapp.

As Kevin i'd expected this function to work in order to execute remote processes during backup/failover.

If anybody has suggestions i'd be glad to hear it.

Regards,

Sylvain

Re: DFM initiating Pre-Exec Post-Exec scripts

Kevin,

Your approach is sound. It just sounds like you need some assistance how to write the backup script so that it works with DFM / Protection Manager.

Yes, finding the documentation on backup scripts for DFM / Protection Manager is not easy to find. However, there are a number of existing discussions on the communities site that answer your question. In the first one I'm posting, Adai has posted just about everything you need to know about backup scripts. In the second posting, kutner has posted an excellent backup script (in Perl) you can use as an example to get started.

https://communities.netapp.com/message/40064#40064

https://communities.netapp.com/message/6071#6071

A few notes:

  • DFM / Protection Manager only supports native executables or batch files (.bat, .cmd) on Windows platforms. If you want to specify a backup script that is not in a native Windows language (i.e. ActivePerl), you must enclose it inside a batch file.
  • On Windows platforms, you do not need to specify the "run as" field.  It will always run using the account that is used to start the DFM services at boot time.
  • I highly recommend defining your PATH variable within your batch file.  This helps your backup script locate all of the commands it needs to run properly.
  • Log the execution of your script to a text file for easier troubleshooting.
  • IMPORTANT:  The backup script must exit with a non-error return code.  Otherwise, DFM / Protection Manager assumes something failed and it aborts the job. 

I hope this helps.

Reid