How to view time machine log in MacOS Sierra?

Solution 1:

macOS Sierra uses Unified Logging (memory and a data store; no text files any longer).

However, with the log(1) utility, you can view, filter, manipulate etc. logs. See man log, and here's a couple of TimeMachine-specific examples:

Stream the log, live (like tail):

log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info

Don't stream, just show the log and exit:

log show --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info

Solution 2:

I had a similar problem. I wrote this shell script to show me the last 12 hours of Time Machine activity from the log, and then continue to follow the log live.

I call it tm-log

#!/bin/sh

filter='processImagePath contains "backupd" and subsystem beginswith "com.apple.TimeMachine"'

# show the last 12 hours
start="$(date -j -v-12H +'%Y-%m-%d %H:%M:%S')"

echo ""
echo "[History (from $start)]"
echo ""

log show --style syslog --info --start "$start" --predicate "$filter"

echo ""
echo "[Following]"
echo ""

log stream --style syslog --info --predicate "$filter"

Solution 3:

For those looking for a live view of Time Machine messages in the GUI Console app, enable "Include Info Messages" in the Action menu.

The useful Time Machine status messages will then show up and can be filtered with a search like Category:TMLogInfo.

It looks like log(1) is needed to view the history since Console doesn't show anything from before it was opened.