Examples
For the source file in these examples, the account user name is admin
, the account password is admin
, and the encryption password is abc
.
Copy
Copies the source file, SampleDB.fmp12, to the target file, SampleDB copied.fmp12.
FMDeveloperTool --copy SampleDB.fmp12 admin admin -target_filename "SampleDB copied.fmp12" -encryption_key abc
Clone
Clones the source file, SampleDB.fmp12, to the target file, SampleDB cloned.fmp12.
FMDeveloperTool --clone SampleDB.fmp12 admin admin -target_filename "SampleDB cloned.fmp12" -encryption_key abc
Copy and compress
Copies the source file, SampleDB.fmp12, to the target file, SampleDB copied compressed.fmp12, and compresses the target file.
FMDeveloperTool --copyCompress SampleDB.fmp12 admin admin -target_filename "SampleDB copied compressed.fmp12" -encryption_key abc
Copy as self-contained
Copies the source file, SampleDB.fmp12, to the target file, SampleDB copied self-contained.fmp12, and embeds all container data in the target file.
FMDeveloperTool --copySelfContained SampleDB.fmp12 admin admin -target_filename "SampleDB copied self-contained.fmp12" -encryption_key abc
Save as XML
Saves the source file, SampleDB.fmp12, as XML to the target file, SampleDB.xml. This example uses the admin user, admin password, and abc encryption key.
FMDeveloperTool --saveAsXML SampleDB.fmp12 admin admin -target_filename "SampleDB.xml" -encryption_key abc
Encrypt
Encrypts the source file, SampleDB.fmp12, and saves the encrypted file to the target file, SampleDB encrypted.fmp12. The shared database ID is 123
. The source file's shared database ID is 123
. The target file's encryption password is admin
, the encryption hint is hint
, and its container data should continue to use open storage.
FMDeveloperTool --enableEncryption SampleDB.fmp12 admin admin -target_filename "SampleDB encrypted.fmp12" -encryption_key abc -sharedID 123 -passcode admin -passcode_hint hint -keep_open_storage
Decrypt
Decrypts the source file, SampleDB.fmp12, and saves the decrypted file to the target file, SampleDB decrypted.fmp12.
FMDeveloperTool --removeEncryption SampleDB.fmp12 admin admin -target_filename "SampleDB decrypted.fmp12" -encryption_key abc
Remove Full Access privileges
Removes Full Access privileges from the source file, SampleDB.fmp12, and saves the file to the target file, SampleDB admin removed.fmp12.
FMDeveloperTool --removeAdminAccess SampleDB.fmp12 admin admin -target_filename "SampleDB admin removed.fmp12" -encryption_key abc
Enable Kiosk mode
Enables Kiosk mode in the source file, SampleDB.fmp12, and saves the file to the target file, SampleDB kiosk.fmp12.
FMDeveloperTool --enableKiosk SampleDB.fmp12 -target_filename "SampleDB kiosk.fmp12" -encryption_key abc
Recover
Recovers the source file, SampleDB.fmp12, to the target file, SampleDB recovered.fmp12, rebuilding the database structure, rebuilding the indexes, and specifying the administrative user and password to bypass startup scripts and layouts.
FMDeveloperTool --recover SampleDB.fmp12 -target_filename "SampleDB recovered.fmp12" -encryption_key abc -generate rebuild -rebuildIndex now -bypass -username admin -password admin
Check consistency
Checks the consistency of the source file, SampleDB.fmp12.
FMDeveloperTool --checkConsistency SampleDB.fmp12 -encryption_key abc
Rename
Renames files in the source file list, matches the file name regular expression "abc.123", replaces the matched text with "abc-123", and places the renamed files into the target folder, TargetDBFolder.
FMDeveloperTool --renameFiles TargetDBFolder admin admin -encryption_key abc -source_filelist SampleDB1 abc 123.fmp12 SampleDB2 abcX123.fmp12 SampleDB3 abc.123.fmp12 -regex "abc.123" -replace_text "abc-123"
Query for table, field, or index sizes
Returns the total size of all record data in the Product Details table of the source file, SampleDB.fmp12.
FMDeveloperTool --querySize SampleDB.fmp12 admin admin -encryption_key abc -target_tablename "Product Details" -size_unit mb
Table size of Product Details is 4852 mb.
Returns the total size of all record data in the target field, Photo, in the Product Details table of the source file, SampleDB.fmp12.
FMDeveloperTool --querySize SampleDB.fmp12 admin admin -encryption_key abc -target_tablename "Product Details" -target_fieldname Photo -size_unit mb
Field size of Product Details:Photo is 2627 mb.
Returns the total size of the value and word indexes of the target field, Name, in the Product Details table of the source file, SampleDB.fmp12.
FMDeveloperTool --querySize SampleDB.fmp12 admin admin -encryption_key abc -target_tablename "Product Details" -target_fieldname Name -query_index
Field name: Product Details:Name Value index Size: 1449(bytes) Word index Size: 1593(bytes)
Find fields with the most record data in a table
Returns the top five fields that contain the most record data in the target table, Product Details, of the source file, SampleDB.fmp12.
FMDeveloperTool --sortBySize SampleDB.fmp12 admin admin -encryption_key abc -target_tablename "Product Details" -quantity 5
FieldName FieldSize Units
"Photo" 2690893 bytes
"Notes" 42094 bytes
"Name" 390 bytes
"Price" 160 bytes
"Stock" 80 bytes
Upload database files to a host
Uploads an encrypted database file to the secure database folder on the FileMaker Server host at myhost.example.com, after which the database is automatically opened on the host.
FMDeveloperTool --uploadDatabases myhost.example.com admin admin -database_pathlist SampleDB.fmp12 -encryption_key abc -target_folder Secure/
"SampleDB.fmp12": File was uploaded successfully.
Summary: All database files were uploaded successfully.
Uploads all the database files in the MyApps folder in the current directory and the SampleDB4.fmp12 database in the Documents folder, which are all encrypted with the same password, but doesn't upload the externally stored container data and doesn't automatically open the databases on the host after upload.
FMDeveloperTool --uploadDatabases myhost.example.com admin admin -database_pathlist MyApps ~/Documents/SampleDB4.fmp12 -encryption_key abc -target_folder Secure/ -without_remote_container -automatically_open_db_off
"SampleDB2.fmp12": File was uploaded successfully.
"SampleDB3.fmp12": File was uploaded successfully.
"SampleDB1.fmp12": File was uploaded successfully.
"SampleDB4.fmp12": File was uploaded successfully.
Summary: All database files were uploaded successfully.