One of the most exciting new features of FileMaker 17 isn’t part of the product, technically: it’s a command line function called the Data Migration Tool. You invoke it from the terminal, but don’t let that fool you. This is a uniquely powerful tool, one that honors the pitfalls of developing in a hosted, high-trafficked app — finally.
The Data Migration Tool allows you to merge two files, so you can develop in an offline copy and then migrate the live system into your improved app. Migration includes user accounts, value lists, serial numbers and of course data, all at once.
How This Will Change Your (Development) Life
Right now, you may be operating like this:
Let’s say you have a single-file app in production, with dozens of users modifying records constantly. This forces you to develop offline. Major upgrades have to be coded in a copy of the app, and each step of the way you painstakingly document your work, so you can reproduce it overnight, in the live file. You test and verify everything twice: first in the copy, then again in the hosted version. Perhaps this takes a whole weekend instead of a night.
The Data Migration Tool does this for you in minutes, or even seconds. You can develop in a copy as before, but now there’s a drastically reduced need to document, duplicate and re-check your work.
First, you’ll need to have a FileMaker Developer Subscription (FDS), as the FileMaker data migration tool is only accessible through this program. FDS is a paid subscription, but well worth it for access to a few cutting-edge tools (Data Migration Tool, iOS App SDK), pro training materials, pre-release software, and additional FileMaker Server licenses for testing. Once you have the FDS activated, find the software in your FileMaker Community account, under “Software Benefits”.
Download the FileMaker Data Migration Tool and save it to: /usr/local/bin/FMDataMigration — then you can type ‘
FMDataMigration‘ right into the command line.
You may also find it helpful to review the FileMaker Data Migration Tool Guide.
Help With The Data Migration Tool
Let’s review the Help command first. In the terminal, type ‘
FMDataMigration -h‘ and you’ll see this:
FMDataMigration 220.127.116.11 (04-12-2018)
Description: Migrates all record data from a source FileMaker Pro Advanced file to a copy of a clone file.
Copyright (C) 2018 FileMaker, Inc. All rights reserved.
Usage: FMDataMigration -src_path <path> -clone_path <path> [<other options>]
-src_path <source file path>
-src_account <source Full Access or FMMigration account> (default is Admin)
-src_pwd <source Full Access or FMMigration password> (default is blank)
-src_key <source decryption key>
-clone_path <clone file path>
-clone_account <target Full Access or FMMigration account> (default is Admin)
-clone_pwd <target Full Access or FMMigration password> (default is blank)
-clone_key <target decryption key>
-target_path <target file path> (default is source path with ” migrated” added)
-force (overwrite existing target file)
-ignore_valuelists (use custom value lists from clone instead of source)
-ignore_accounts (use accounts and decryption key from clone instead of source)
-ignore_fonts (assume no font mapping required for field contents)
-v (verbose mode)
-q (quiet mode)
The source file is the existing solution, an .fmp12 file that contains the data to migrate. The clone file is your updated app — a copy of an .fmp12 file that contains all the tables, layouts, scripts, and field definitions but no data.
Once you’ve made changes to your solution, and your users have tested and certified them, it’s time to migrate — to merge the production data into your new app. First, create a clone of your updated file. Second, notify users of minimal downtime, as the production file has to be closed. Third, close the hosted file. Ideally, you’re doing all of this directly on the server.
A typical call to the command may look like this (see Help text above by “Usage”):
FMDataMigration -src_path /Users/vmenanno/Desktop/CRM.fmp12 -clone_path /Users/vmenanno/Desktop/CRMClone.fmp12
Start: Mon May 21 06:01:25 2018
== Mapping source privileges to target privileges ==
== Copying changed custom value lists ==
== Analyzing font lists ==
== Mapping source tables to target tables ==
== Mapping fields in source table “Notes” to target table “Notes” ==
— Block mode migration for source table “Notes” —
== Mapping fields in source table “Content Management” to target table “Content Management” ==
— Block mode migration for source table “Content Management” —
== Summary ==
Accounts migrated: 2
Accounts changed: 0
Custom value lists migrated: 0
Font entries added: 0
Tables migrated: 2
Tables not migrated: 0
Fields migrated: 18
Fields not migrated: 0
Fields triggering recalculations: 0
Fields with evaluation errors: 0
Fields with fewer repetitions: 0
Serial numbers updated: 0
End: Mon May 21 06:01:25 2018
The migrated .fmp12 file will have the text ‘ migrated’ appended to its original name. You can specify where exactly this gets saved.
Just swap the hosted file with the migrated file and open it on the server. Almost instantly your users have access to the improved app. And you’re done with development — no need to copy-and-paste code, re-test features, update values lists, etc.
Incredible time savings! And crucially, the Data Migration Tool is now the most secure way of updating critical FileMaker apps in complex environments.