Claris Support

The Command Line Interface (CLI) is a text based user interface that can be used to interact with FileMaker products.

Note The following information is for server administrators.

FileMaker provides the tool fmsadmin for administering FileMaker Server via the command line interface (CLI). You must be logged on to the computer running FileMaker Server, either directly or using remote desktop software, to use the CLI.

Note The CLI is available via the command prompt (Windows) and the Terminal application (OS X).

Table of Contents

Command line reference interface
Commands
Universal Options
Options for specific commands
Parameters
Scripting language
Administrator authentication


Command line reference interface

The CLI executable fmsadmin is located in the folder:

  • Windows: [drive]:\Program Files\FileMaker\FileMaker Server\Database Server\fmsadmin.exe
  • MacOS: /Library/FileMaker Server/Database Server/bin/fmsadmin

Notes

  • Windows: If FileMaker Server is installed in a non-default location, the beginning portion of the default path shown above, \Program Files\FileMaker\FileMaker Server, is replaced with the path that was specified during installation. For example: \My_Path\Database Server\
  • macOS: The following symbolic link to fmsadmin is also installed: /usr/bin/fmsadmin

Commands

CommandDescription
AUTORESTARTGet or set auto-restart for the Admin Server or FMSE
BACKUPBack up databases
CANCELCancel the currently running operation
CERTIFICATEManage SSL certificates
CLEARKEYRemoves saved database encryption passwords
CLOSEClose databases
DISABLEDisable schedule or detailed statistics logging
DISCONNECTDisconnect a client
ENABLEEnable schedules or detailed statistics logging
GET (new to FileMaker Server 17)Retrieve server or CWP configuration settings
HELPGet help pages
LISTList clients, databases, plug-ins, or schedules
OPENOpen databases
PAUSETemporarily stop database access
REMOVEMove databases out of hosted folder or remove empty folder
RESETPWReset admin user password
RESTARTRestart a Server process
RESUMEMake paused databases available
RUNRun a schedule
SENDSend a message
SET (new to FileMaker Server 17)Change server or CWP configuration settings
STANDBY (no longer applies to FileMaker Server 17)Manages standby server connections, roles, and updates
STARTStart a Server process
STATUSGet status of clients of databases
STOPStop a Server process
VERIFYCheck the consistency of databases
WPEAdd, remove and list FileMaker WebDirect worker machines



The general format for fmsadmin commands is:

fmsadmin command [options]

The following example authenticates with Admin Console user name admin and the password pword and closes all open databases without prompting you to confirm:

fmsadmin close -y -u admin -p pword

Important CLI commands can include the Admin Console name and password. If a command is used interactively, the user name is visible but the password is not. If a command in a script or batch file must include a name and password, be sure that only the password owner can view the script or batch file.

In the CLI, use the fmsadmin help command to see Help pages on the CLI commands.



Universal options

Options pass switches and parameters to fmsadmin. Type fmsadmin help options to see the list. You can specify options in a short or a long format, for example: -h or –help. You can use the following options with all commands.

 Use To
 -h, –helpPrint the CLI built-in help page.
 -p password, –password passwordSpecify the password to use to authenticate the server. See OPEN command for information about password parameters for opening encrypted databases.
 -u username, –username usernameSpecify username and/or domain name to use to
connect to FileMaker Server.
 -v, –versionPrint version information.
 -w seconds, –wait secondsSpecify time in seconds for command to time out.
 -y, –yesAutomatically answer yes to all command prompts.

Options for specific commands

 Use To
  -d path, –dest path Specify a backup destination path.
 -f, –force Force close a database or shut down the server.
 -k number, –keep number Specify count of backups to keep.
  –key encryptpass Specify the database encryption password.
  -m message, –message message Specify a text message to be sent to clients.
 -n, — clone Clone backup file.
 -o, –offline Perform an offline backup.
 -s, –stats Return file or client statistics.
 –savekey Save the database encryption password.
 -t seconds, –gracetime seconds Specify time in seconds before client is forced to quit.
 -x, –verify Verify integrity of backup file.
  • To specify the short form of options, use a single hyphen (-). You can specify multiple options together. If an option requires a parameter, that option is usually the last option that you specify. For example,
    fmsadmin close -ym ‘Closing for maintenance’ Database.fmp12
     
  • To specify the long form of options, use double hyphens (–). Long options can be used in scripts to increase readability. You must specify each option separately, preceded by two hyphens. A space is required between the option and any parameters, for example,
    fmsadmin close –yes –message “Closing for maintenance”
    Database.fmp12

Parameters

  • Enclose any parameters that contain spaces in single or double quotation marks.
    Tip For computer and filenames, use names consisting of standard ASCII characters without spaces.
  • You can specify file IDs instead of filenames. Use fmsadmin list files -s to return file IDs and other statistics. File IDs are dynamically generated.
  • Symbols that may be interpreted by the shell must be escaped, that is, preceded by a backslash character (\). Refer to the documentation for your shell or command interpreter.
  • Example: the following command does not prompt for confirmation (-y), allows clients 5 minutes to close the file (-t300), and sends a message (-m). The command operates on file IDs 20 and 22 and the folder “Solution”.
    fmsadmin close -y -t300 -m “Closing for maintenance” 20 22 “filemac:/
    Library/FileMaker Server/Data/Databases/Solution/”
     
  • To specify a filename that consists of numbers, you must put the filename and its extension
    in quotation marks. For example:
    “12345.fmp12”

    Otherwise, the command line interface treats the string of numbers as a file ID instead of a filename.



Scripting language

If you use a scripting language that allows execution of shell or Terminal commands, you can script many tasks with fmsadmin. On OS X, you can use tools such as cron or launchd to schedule execution of fmsadmin commands like “run schedule” or “backup”. On Windows, you can use the Scheduled Task Wizard to schedule scripted tasks.



Administrator authentication

FileMaker Server challenges the CLI for authentication if you have not enabled Use external group on the General Settings > Admin Console tab (does not apply to FileMaker Server 17). If you have enabled Use external group and you are currently logged in to the machine as a member of the external group, FileMaker Server does not challenge the CLI for authentication.

FileMaker Server logs all administrator connections, both successful or failed