In addition to administering FileMaker Server using the graphical Server Administration Tool (SAT), it’s also possible to administer the server using a command-line tool called fmsadmin
. The fmsadmin
tool is installed along with FileMaker Server itself, and can be used to administer instances of FileMaker Server running on the same machine, or on a remote machine with remote administration enabled—much as the SAT can be used.
The fmsadmin
tool behaves like any other command-line utility or tool in the Mac OS X or Windows operating systems. It can be invoked directly from the command line (Mac OS X Terminal, Windows Command Prompt). It can also be invoked from within any command-line script, and as such can form part of a variety of automated administrative processes.
In order to invoke fmsadmin
from the command line, you’ll need to know where the tool is located. If the install location is in your system path, simply issuing the command fmsadmin
(plus necessary options) is sufficient. By default, though, the tool is installed outside the regular system paths. To address this problem, either add the tool’s install location to the system path, or create a shortcut or symbolic link to the tool from one of the system path directories (/usr/bin on Mac OS X or C:WINDOWS on Windows, for example). Alternatively, you can invoke the tool by referring to it by its full installed path.
The installed path can vary, but these are the default locations:
Mac OS X:
/Library/FileMaker Server 8/Tools/fmsadmin
Windows:
C:Program FilesFileMaker Server 8fmsadmin
To invoke fmsadmin
from the command line, you’ll need to supply three pieces of information. You’ll need the name of the tool itself (fmsadmin
, assuming it is accessible by an existing path; otherwise, the full path to the tool must be specified). You’ll need the name of a particular command to invoke (such as “backup” to back up files or “close” to close files). And you may need one or more options that give further specificity to the command. An example would be
fmsadmin close -m "All files closing" -t 120
This command would close all files on the server after a two-minute (120-second) grace period, and send all connected clients a warning saying “All files closing.”
In the reference that follows, we list the name of each command, along with a description, a general usage template, one or more examples, and explanations of any applicable options. Some of the options are specific to only one or two commands, but most are applicable across several commands.
fmsadmin backup [file...] [path...] [-diopuwy]
Description:
The backup
command can be used to back up a single file, all the files in a directory, or all the files hosted by a single instance of FileMaker Server. The backup
command can be used alone, in which case it performs a “live” or “hot” backup of the specified files. It can also be used in conjunction with the pause
and resume
commands. Though this method will interfere with user access to the files, it will also allow the backup to complete more quickly. The pause-backup-resume usage mimics the backup behavior of FileMaker Server 5.5.
Examples:
fmsadmin backup Products.fp7
fmsadmin backup /Products -d E:FileMaker_Backups
fmsadmin close [file...] [path...] [-imptuwy]
Description:
This command closes one or more database files. It can be used to close a specific file, all the files in a directory, or all files on the server.
Examples:
fmsadmin close
fmsadmin close -y
fmsadmin close -y Products.fp7
fmsadmin close -y "Invoice Items.fp7"
Options:
fmsadmin delete schedule [schedule #] [-ipuwy]
Description:
This command deletes a specific schedule, referenced by its schedule number. Schedule numbers can be determined using the list schedules
command.
Examples:
fmsadmin delete schedule 1
fmsadmin delete schedule 3 --wait 5 -y
Options:
fmsadmin disable type [plug-in #] [schedule #] [-ipuwy]
Description:
This command is used to disable server-side plug-ins or schedules. Plug-ins and schedules are referenced by number. The numbers can be determined by using the list schedules
or list plugins
commands.
Examples:
fmsadmin disable plugin 3 -y
fmsadmin disable schedule 1 –y
Options:
fmsadmin disconnect client [client #] [-impuwy]
Description:
This command is used to disconnect a specific client. Clients are referenced by client number. Client numbers can be determined by using the list clients
command. A specific message can be sent to the client(s) as well.
Examples:
fmsadmin disconnect client 13 -y
fmsadmin disconnect client 12 -m "It’s time for lunch, Sarah" -y
Options:
fmsadmin enable type [plug-in #] [schedule #][-ipuwy]
Description:
This command is used to enable plug-ins or schedules. Plug-ins and schedules are referenced by number. The numbers can be determined by using the list schedules
or list plugins
commands.
Examples:
fmsadmin enable schedule 3
fmasdmin enable plugin 1
Options:
fmsadmin help [command]
Description:
This command will display help information on the command line commands and syntax.
Examples:
fmsadmin help options
fmsadmin help commands
fmsadmin help resume
Options:
None
fmsadmin list type [-ipsuwy]
Description:
This command can be used to obtain a list of clients, files, plug-ins, or schedules from the server. Among other things, this command will return item numbers that are necessary for other commands such as enable schedule
and similar commands.
Examples:
fmsadmin list clients
fmsadmin list plugins
Options:
fmsadmin open [file...] [path...] [-ipuwy]
Description:
This command is used to open databases. Like the close
command, it can be used to open all files on the server, all files within a single directory, or a single named file.
Examples:
fmsadmin open Clinic.fp7
fmsadmin open -y
fmsadmin open /ClinicFiles
Options:
fmsadmin pause [file...] [path...] [-ipuwy]
Description:
This command is used to pause databases. Like the open
and close
commands, it can be used to affect all files on the server, all files within a single directory, or a single named file.
Examples:
fmsadmin pause -y
fmsadmin pause --wait 30 –y
Options:
fmsadmin reload [-ipuvwy]
Description:
This command reloads the server configuration. Any unsaved properties will be replaced with the most recently stored values for those properties.
Examples:
fmsadmin reload
Options:
fmsadmin resume [file...][path...] [-ipuwy]
Description:
This command is used to resume databases that have been paused. Like the open
and close
commands, it can be used to affect all files on the server, all files within a single directory, or a single named file.
Examples:
fmsadmin resume -y
fmsadmin resume "Clinic.fp7"
Options:
fmsadmin run schedule [schedule #] [-ipuwy]
Description:
This command is used to run a schedule, specified by number. Schedule numbers can be obtained by using the list schedules
command.
Examples:
fms admin run schedule 3
Options:
fmsadmin send [-cimpuwy] [client #] [file...] [path...]
Description:
This command can be used to send a text message to all clients. The command can be used to affect all clients connected to the server, or limited to just those clients connected to files in a specific path, or to a single specific file, or to a single client specified by number. Unlike other commands, with send
you must use the -c
option when specifying a client number.
Examples:
fmsadmin send -m "The server will shut down for maintenance in 15 minutes."
fmsadmin send -c 17 -m "Fred, it’s time to go home."
fmsadmin send "Clinics.fp7" -m "The Clinics file will shut down in 5 minutes."
Options:
fmsadmin status type [-ipuwy] [id #] [file]
Description:
This command is used to determine the status of a client or a file.
Examples:
fmsadmin status file "Clinics.fp7"
fmsadmin status client 30
Options:
fmsadmin stop [-fimptuwy]
Description:
This command will stop the server process. All connected users will have 30 seconds to close their open files. This grace period can be changed using the -t
option.
Examples:
fmsadmin stop
fmsadmin stop -f
fmsadmin stop -t 120 -m "The server will shut down in two minutes."