- iTerm (and the utilities it offers) - You can use Terminal or even Finder with Archive Utility to extract data
- sqlite3 cli - You can use any client that supports sqlite to browse the database
- You must have iCloud Sync enabled in the Baby Tracker app
- You must be signed into iCloud on you Mac
- If you want the latest data from Baby Tracker, I’d recommend you do a manual backup from the Baby Tracker app
You can find information on Baby Tracker synchronization and backups at Baby Tracker.
In iTerm, run the following command to copy /latest/ and extract the latest backup to a folder called babytracker
in the current working directory (pwd
).
ls -dt ~/Library/Mobile\ Documents/iCloud\~com\~nighp\~babytracker/Documents/backups/* | \
head -1 | \
xargs -I{} cp {} ./babytracker.zip && \
unzip babytracker.zip -d babytracker && \
cd babytracker
Quick rundown on what each line does
- List the contents (backups) of the Baby Tracker backups folder with the the full path of the file,
-d
and ordered by time-t
- Take the first line of the output from
1
- Copy the file output from
2
into a file namebabytracker.zip
- Unzip the
babytracker.zip
to a folder calledbabytracker
- Change the current working directory to
babytracker
Part of the backup contents is a sqlite database titled EasyLog.db
. We can connect to that database and access the data we have recorded.
Here is an example query to see the nursings that have notes from most to least recent
sqlite3 EasyLog.db "SELECT * FROM Nursing WHERE note IS NOT NULL ORDER BY Time DESC ;"
Check out Command Line Shell For SQLite for more you can do to explore the database and extract data.