Open the ScriptEditor application on your mac.
File new
and copy in the entire GedcomBackup.scpt I've provided.
Change the first line to the location of your backup folder (should be a big external drive)
Check the next lines to be the exact names of your trees in Family Tree Maker, and these trees have to be in the recent
list in File -> Open Recent
(If they aren't in the recent list, open them up manually in the Family Tree Maker Program).
I was backing up two trees, if you only want to back up one you can delete one of the lines.
In your backup folder, make new folders that have the the exact same names of your trees. The backups are called backup_YYYYMMDD.ged, so you need the folder names to know what tree was backed up.
Save the script, then test it by pressing the run button. Make sure it works.
Note at some point you will be prompted to allow Script Editor to control your computer. You will have to do so in settings.
Once you are happy that your script is running, the next step is to get it to run automatically on Thursday morning at 3:42 AM.
From Script Editor, File -> Export
the working script to some folder such as your home folder.
Using a text editor, open the file above ca.theabrahams.makegedcom.plist
. On line 10 you need to enter the place where
you just exported the working script, e.g. if your username is fred, maybe you just exported it to /Users/fred/GedcomBackup.scpt
.
Save the file into your LaunchAgents folder, which is /Users/fred/Library/LaunchAgents
if your username is fred, but if your
username isn't fred it it will be a little different of course.
Start the Terminal app.
Inside Terminal, type launchctl load /Users/fred/Library/LaunchAgents/ca.theabrahams.makegedcom.plist
(of course again,
if your username
isn't fred, this will be a little different
Since I set RunAtLoad
to True
in the file, it should immediately create a GEDCom backup of your tree.
Don't try to do anything
else on your computer while it's running, as the scripting requires the Family Tree Maker 2019 windows to be in the
front, and if you do something else another window might get in front and it might start typing stuff or pressing buttons into other applications.
Note at some point you will be prompted to allow osascript
to control your computer. You will have to allow it. Then,
you might have to unload and reload the agent to try again, which you do in the Terminal window by typing
launchctl unload /Users/fred/Library/LaunchAgents/ca.theabrahams.makegedcom.plist
launchctl load /Users/fred/Library/LaunchAgents/ca.theabrahams.makegedcom.plist
Once it's running with the launchctl load
command, you can leave it until Thursday morning. Then, check to see if there's a new backup created.
It is critical that you back up your hard drive regularly (e.g. using TimeMachine), but it also critical to storing your tree off-site. If you have some big cloud storage, like Google Drive or Dropbox, you may be able to set your backup location to be in your Drive or Dropbox, so it gets synced to the cloud automatically.