FileMaker 21.1 introduces that makes getting back into your file quickly after a reboot much easier. When you shutdown FileMaker, FileMaker Server saves and remembers your open files, then opens with them on restart.
Enabling the Feature
It’s turned off by default, but you can turn this on by enabling he “Automatically open databases that are in the database folders” in your FileMaker Server settings.
To enable this functionality, you do one of the following:
- CLI Command: Execute `fmsadmin set serverprefs OnlyOpenLastOpenedDatabases=true` to enable the feature, and replace `true` with `false` to disable it.
- Admin Console: Navigate to Configuration → General Settings and toggle the “Only open last opened databases” option.
- Admin API: Use the `onlyOpenLastOpenedDatabases` key. Check your server’s Admin API documentation for detailed examples:
`/fmi/admin/apidoc/#tag/Database-Server/operation/updateGeneralConfig`
.
How it Works
FileMaker Server saves the list of open files in a text file located at `{FMS installation folder}\Data\Preferences\lastopendblist.list
`. This `lastopendblist.list
` text file only updates when the server stops, either through the “Stop Database Server” command or by stopping the FileMaker Server service. When you have FileMaker files opened, closed, deleted, resumed, or paused, the text file will not update.
If the `lastopendblist.list
` file is missing, empty, or corrupted during startup, no files will be opened. An event log entry will reflect this with the message: `Information 1262 Opening 4 databases was skipped because none of them was opened before the database server was stopped`. Similarly, if a file listed in `lastopendblist.list
` no longer exists during startup, it will remain in the list file but will be removed during the next shutdown as the list file gets rewritten.
Feature Limitations and Considerations
Regex and Wildcards
This feature does not support wildcards or regex patterns. If you have interest in this functionality for your FileMaker application, contact one of our consultants to help you implement it.
Manually Editing the File
The `fmserver/fmserver.exe
` process is responsible for reading and modifying the `lastopendblist.list` file. While you can edit the file manually, we recommend you do so with caution and good documentation, especially in production environments.
Any manual edits you make to the file will have no effect if FileMaker Server is online — the file will just be overwritten during the next shutdown. Stop the server before making any edits. For your file format, just add or remove the file name of the FileMaker file and its extension, putting each file name on a separate line.
Parallel Backups
When reviewing your `lastopendblist.list` file, consider also checking `hfileset.strings` in the same folder (`{FMS installation folder}\Data\Preferences\`). This file contains the file sets used for parallel backups.
Event Logging
During the server startup, the system logs an informational message indicating whether you have “Only open the last opened databases” enabled or disabled: `Information 1258 Only open the last opened databases when the database server starts: Enabled` or `Disabled`.
Other related event logs include:
- Skipped files are logged as:
`Database "DATABASE_NAME"
opening skipped because it was closed before the database server was previously stopped` with an“Information”
error code“1260”
. - Enabling or disabling the feature results in:
`Information 1259 Only open the last opened databases when the database server starts: Disabled`
or`Enabled`
. - After startup, if all files were skipped, it logs:
`Information 1262 Opening 4 databases was skipped because none of them was opened before the database server was stopped`
, in addition to error code 1260.
Leveraging All FileMaker 21.1 Has to Offer
At Soliant, our team of FileMaker developers strives to become experts in each new Claris and FileMaker feature. If you have any questions on how to improve your FileMaker application’s development, design, and deployment, contact our team to talk with a consultant.