Lasso Soft Inc. > Home

  • Articles

Control Filemaker Server via Lasso

This article explains how you can control a Filemaker Server via the Lasso [OS_Process] tag

Controlling FileMaker Server via Lasso

Using the Lasso [OS_Process] tags it is easy to control a Filemaker Server. Filemaker Server comes with a command line tool that allows you to get info such as the status or list of clients, files, plugins, backup schedules,... you can even open and close databases.


Example 1
The following example shows you a list of clients currently connected to your Filemaker Server

[var:'fmps_user'='your FMPS admin user here']
[var:'fmps_passwd'='your FMPS admin password here']
[var: 'myProcess' = (OS_Process: '/usr/bin/fmsadmin', (Array: 'LIST','CLIENTS',
 '-y', '-u'+$fmps_user, '-p'+$fmps_passwd))]
<pre>[Encode_break: $myProcess->Read]</pre>
[$myProcess->Close]

 

This code will return something like :

Client ID    User Name         Computer Name    Ext Privilege
1                Lieven Gekiere    IntelMac20            fmapp

 

Example 2
The code below will actually create a backup of all files on your Filemaker Server and place it in the default backup folder:

[var:'fmps_user'='your FMPS admin user here']
[var:'fmps_passwd'='your FMPS admin password here']
[var: 'myProcess' = (OS_Process: '/usr/bin/fmsadmin', (Array: 'BACKUP', '-y', '-u'+$fmps_user, '-p'+$fmps_passwd))]
<pre>[Encode_break: $myProcess->Read]</pre>
[$myProcess->Close]

 

The above code won't give you any output if the backup was successful. Using the code above you can create backups of your files 'on demand' via a webpage.

Example 3

The next example will output a list of hosted files on the FMPServer.

[var:'fmps_user'='your FMPS admin user here']
[var:'fmps_passwd'='your FMPS admin password here']
[var: 'myProcess' = (OS_Process: '/usr/bin/fmsadmin', (Array: 'LIST','FILES', '-y', '-u'+$fmps_user, '-p'+$fmps_passwd))]
<pre>[Encode_break: $myProcess->Read]</pre>
[$myProcess->Close]

 

This outputs the following on my computer

filemac:/Macintosh HD/Library/FileMaker Server/Data/Databases/Sample/FMServer_Sample.fp7
filemac:/Macintosh HD/Library/FileMaker Server/Data/Databases/mytest.fp7

 

For a full list of available commands enter the following on the command line of the Filemaker Server box:

  fmsadmin help commands

Author: Lieven Gekiere
Created: 14 Apr 2008
Last Modified: 2 Mar 2011

Comments

No comments found
You must be logged in to comment.

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft