Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Power Outage strategies


This topic is 7537 days old. Please don't post here. Open a new topic instead.

Recommended Posts

We recently had a prolonged power outage and the server's backup battery ran out and the machine, running OSX, powered down while the server was still running. Obviously those files opened could not be used and we went backwards to our backup, which luckily was only 8 minutes old. Not much data was lost but if the next power outtage happens at the wrong time, we could lose as much as an hour of data.

In OS 9, I was able to have an applescript that would trigger the Server to shut down at the power outage prior to losing battery backup power, thus saving all the data. In OSX this is just not possible, as best I can tell. The server is not scriptable and even with remote administration on another machine, I am not able to trigger the Server to perform a back up. Any suggestions other than purchasing a larger backup battery unit.

Link to comment
Share on other sites

can't believe filemaker server is not scriptable. try to open the server with script editor (open dictionary...).

you could also power down the machine instead of quitting the server.

Link to comment
Share on other sites

Unfortunately FMServer OSX is not scriptable, and powering down the machine will quit the FMServer Config program, but not the daemon actually serving the files. Thus the computer will be shut down with the files still open, not an acceptable option. I also tried to get another machine to close the files by remote administration but alas, the script making menu is locked out on the remote administration "database".

A call to Filemaker was not particularly helpful but gave me a possible workaround. It turns out that the daemon will accept commands from the Terminal program. He mentioned that a Tech document is in preparation with unknown release date but stated that the daemon named fmserverd will accept such commands as resume, pause, stop, close, open and start.

No mention of backup though. I reviewed the Linux information and the Linux version of server is able to perform backups from the command line. I wonder if the port to OSX is close enough to have this undocumented feature?

Link to comment
Share on other sites

  • 7 months later...
  • Newbies

I echo dkemme's original comments. That Filemaker Server on OS X is not Applescript-able is a major shortcoming. Although OS X is quite stable, my FM Server box is subject to crashing due to brownouts. I intend to upgrade my UPS, and can have the UPS gracefully shutdown the computer, but that's of no use if I can't first quit FM Server (unattended, of course).

If someone has had experience scripting the server daemon to gracefully stop (closing the files first is the whole point, of course) or if anyone knows of a Filemaker, Inc tech document addressing this, I'd love to hear about it!

Link to comment
Share on other sites

I was once told that the daemon that serves was a port from the Linux version. If true, some of the line commands for fmservd that work for Linux could work for OSX, from terminal mode. I was starting to experiment with this but lost interest and my hopes for Filemaker 7 solving this problem increased. If you want to tackle, I would look at FM tech note 107635 for list of fmservd commands under Linux for a start. Finding fmservrd was quite difficult as I recall, and I could look for my notes if your are going to proceed. Please let me know if you are getting anywhere as I would love to have a solution. DJK

Link to comment
Share on other sites

"...the daemon named fmserverd will accept such commands as resume, pause, stop, close, open and start. No mention of backup though."

That shouldn't be a problem... a shell script can pause the server then copy the files.

Link to comment
Share on other sites

  • Newbies

apologies if double posted - I thought I just sent this but I don't see it...

Only because I can find no evidence of a previously written shell script to stop fmserverd, it looks like I'll give it a try ('tho I feel like Frodo accepting the ring!).

Without even reading anything about shell scripts, I just tried the following:

closed my 'real' files

used FM Server Config to 'Stop Server'

moved my 'real' files & put some test .fmp5 files in the folder with FM Server Config

started the server, confirmed the files were shared

opened a Terminal a session and:

[FMServer:~] admin% fmserverd stop -f

fmserverd: Command not found.

[FMServer:~] admin% man fmserverd

No manual entry for fmserverd

I know that fmserverd has a 'daughter process' of the same name - is it possible I'm talking with the daughter? Any ideas where I can begin?

I did follow the instructions at http://www.filemaker.com/ti/107911.html and was able to successfully make fmserverd automatically start when the system boots. These instructions include code which contains the word 'stop', but it's greek to me...

Link to comment
Share on other sites

  • Newbies

An update: With help received here and on an Apple OS X board, I've made a tiny bit of progress with Terminal, but it's discouraging for a non propeller-head, esp. as FMS does not support terminal commands (or much else either).

While Filemaker Pro was one of the first productivity apps ported to Mac OS X, Filemaker Server on OS X remains poorly supported. Not only are features available on the Windows & Mac OS 9 unavailable, but an unattended shutdown of a box running FMS & OS X is likely to fry the served database files (4 AM power outage -> UPS kicks in -> UPS battery running low, it tells computer to shutdown -> computer shuts down with out a crash -> later startup -> served databases are damaged).

Amazingly, Filemaker, Inc. has no workaround for this, nor do they warn users that their data is apt to be destroyed by FMS under OS X (FM Inc tech support told me that the product may respond to Terminal commands, but this is unsupported, with no documentation available, nor is there any Applescript support).

Here

Link to comment
Share on other sites

Well put!!!! I have argued this with FM for over a year and although Version 4 has helped with many problems, this major flaw has not been solved!!! I cannot imagine a database program than cannot close files appropriately prior to power outage.

Link to comment
Share on other sites

  • 1 month later...

Another member of this board, FossilFM posted in a different forum his solution. A shell script that will tell the daemon to close the files. Here is his script but not knowing anything about UNIX I have no idea how to implement. Any suggestions?

StopService ()

{

ConsoleMessage "Stopping FileMaker Server"

sudo -u $FMS_USER "$FMS_PATH""fmserverd" pause

sudo -u $FMS_USER "$FMS_PATH""fmserverd" close

sudo -u $FMS_USER "$FMS_PATH""fmserverd" stop

}

Link to comment
Share on other sites

This topic is 7537 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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