Jump to content
Sign in to follow this  
David Jondreau

Call upon Server to run a backup from Pro

Recommended Posts

Is it possible to have FM Server run a backup from a client script?

This awesome thread seems to indicate that schedules can NOT be run on the Server from Pro (though scripts can). That would have been a nice solution. I'm wondering if there's another way to do it.

I don't want to run a schedule every 5 minutes, checking a flag field, I need the backup to happen "on demand". I'd prefer a solution that was cross-platform or maybe two solutions one for Jobs and one for Gates.

This is for FMSA 12 on OS X Server and FMS 12 on Windows 2008.

Thanks,

DJ

Share this post


Link to post
Share on other sites

You could script the backup via command line interface, then call that OS-level script from a FileMaker ScriptMaster script.

...at least, I think you can. I have written an OS-level script that runs a backup on the server, but I haven't tried calling that script from a ScriptMaster script. I don't see why you couldn't though.

Share this post


Link to post
Share on other sites

Well, you could use AppleScript on a Mac and VB script on Windows to run a shell script that connects to the sever via SSH to run the backup command.

Share this post


Link to post
Share on other sites

Thanks for the tips...just to make things even more complicated, we will probably need to also run this on FM Go, so no plugins and Send Event/Applescript script steps.

Picky, aren't I?

Share this post


Link to post
Share on other sites

hi David

I think ScriptMaster is server side compatible, which means that you can run it with FMGo.

Someone from CNS plugins wrote a profound article on how to do this. In short it has all to do with the fact that unstored calcs are evaluated on the server in certain conditions when you perform a find on it.

So if you place your plugin call in that unstored calc and perform a find on it, the plugin call will be executed server side.

Andries

[edit]here is the article: http://jaketraynham.posterous.com/filemaker-go-cant-use-plug-ins-or-can-it[/edit]

Share this post


Link to post
Share on other sites

I was thinking of using a "Send Event" step on a server-side script to run the os-level script, but I hadn't realized that the "Send Event" step is not compatible with a script run on the Server.

So, you can still use the XML web publishing URL to trigger a script to run on the server, but the server would need a plug-in to run an os-level script. As andries mentioned, ScriptMaster can do this. BaseElements plug-in might also be able to: https://github.com/nickorr/BaseElements-Plugin/wiki/Functions#wiki-BE_ExecuteShellCommand

Share this post


Link to post
Share on other sites

OK so it looks like my options so far are:

1) Install the ScriptMaster or BaseElements plugin on the server.

2) Write a shell script to back up the file.

then

a.3 ) Write a FileMaker script to be run on the server that will leverage the plugin to call the shell script

a.4) Write a Filemaker script that will run on the client to use Insert from URL[] or Set Web Viewer[] to call the server script in #3 via XML.

or

b.3) Create an unstored calculation field that calls the plugin to call the shell script

b.4)Write a FM script that performs a find on that unstored calc to force it to resolve on the host

I'll take a crack at it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.