Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

Last Week on My Mac: Just asking for advice

By: hoakley
24 November 2024 at 16:00

How do you get good advice? The fact that you’re reading this makes it likely that you’ve come here in the past, but where else do you go?

When I’m researching for articles here, my first visits are to Apple’s support pages for users and those for developers, but I’m only too well aware of their limitations. A month ago I wrote about the Tips app that Apple has thrust to the fore in Sequoia, and wondered whether it’s destined for greater things. Last week, I thought it might be informative to check how AI is doing, so turned to one of the most wanted features coming in Sequoia 15.2 next month, ChatGPT.

To assess how reliable ChatGPT might be as a source of troubleshooting guidance, I asked it half a dozen questions I have recently asked, and answered myself, in the pages I contribute to MacFormat’s Genius Tips, and its sister publication MacLife. If you want to read my answers in full, you’ll find them in MacFormat issue 409, although most have been the subject of articles here.

How to back up all the files in my iCloud Drive?

ChatGPT detailed how to copy the entire contents of iCloud Drive to local storage, explaining that “by saving a copy locally or to an external drive, you have created a manual backup of your iCloud Drive files.” It failed to point out that Time Machine and other backup utilities will back up files that haven’t been evicted from iCloud Drive, and some third-party apps can accomplish that automatically.

That answer is spectacularly wrong, and merely creates a local copy of files, most of which are probably already downloaded to that Mac and being backed up.

How to exclude files from iCloud Drive?

ChatGPT here misunderstood the question and instructed me how to stop apps from syncing their documents and data with iCloud, in the Apps syncing to iCloud Drive setting for iCloud Drive. It also came up with the crazy tip: “Additionally, you can move files you want to exclude from iCloud Drive to another location on your Mac that is not part of the iCloud Drive directory.” Thankfully, I know of a much better way that does answer that question.

How to make bootable backups of my Mac running Sonoma?

Although ChatGPT opened with promise, responding that “macOS’s built-in Time Machine backup feature does not create bootable backups on its own,” it quickly got into trouble, and at no time advised me not to attempt this. Neither did it direct me to support information that explains the details, such as this page for Carbon Copy Cloner, where it states: “we do not support nor recommend making bootable copies of the system as part of a backup strategy.”

ChatGPT then instructed me to prepare an external drive formatted as “Mac OS Extended (Journalled)” on which to create that bootable backup. At the end, it signed off reassuringly: “by following these steps, you will create a bootable backup of your Mac running macOS Sonoma, providing peace of mind in case of system failures or data loss.”

The advice given here is again spectacularly wrong.

How to reset the NVRAM in my M2 Mac?

ChatGPT’s response opened with waffle only relevant to Intel Macs, about how resetting the NVRAM “can help resolve issues with startup, audio volume, display resolution, time zone settings, and more.”

It next proceeded to describe how to start up an Apple silicon Mac in Recovery mode, then to open Terminal and enter the command nvram -c, that it confidently asserted “will clear the NVRAM.” Not only is that known to be ineffective and normally to return an error, but as Apple explains “steps to reset NVRAM don’t apply to Mac computers with Apple silicon, and aren’t needed on those computers.”

It seems strange that ChatGPT is so unaware of Apple’s own support notes.

How to stop kernel_task taking so much CPU?

This is a well-known cardinal sign of a Mac that’s getting too hot and needs to cool down. Nevertheless, ChatGPT’s first suggestion was to “check for Resource-Heavy Applications: Open Activity Monitor and close any applications or processes that might be using excessive resources.” As it didn’t make it clear that I shouldn’t try killing kernel_task itself, that’s dangerous advice.

Only then did it mention that I should ensure my Mac has “sufficient ventilation”, as “if your Mac overheats, kernel_task may run to throttle the CPU speed to prevent damage.”

ChatGPT then moved on to recommend that I “update macOS” “as updates can fix bugs that cause inefficiencies.” A little further down, it even recommended that I should “check for Flash Content”, forgetting that Flash died four years ago.

How can I get notifications delivered reliably on both my iPhone and Apple Watch?

With this last question, ChatGPT once again failed to understand its implications, and walked through a long series of checks through settings. Only towards the end did it bother to mention the obvious issue alluded to in the question, that they’re delivered to the device you’re using and not to both at the same time. Well, in theory, at least.

My conclusion therefore has to be:

Only ask ChatGPT if you already know the correct answer

otherwise you’re likely to be sent on a wild goose chase, misunderstood, or fed stuff and nonsense. Perhaps it’s best left to writing short stories for children who will believe every word.

Understand and check Time Machine backups to APFS

By: hoakley
3 October 2024 at 14:30

Over the last 17 years, Time Machine has backed up many millions of Macs, ranging from the last Power Macs to the latest M3 models, every hour. It has changed greatly over that time. This article uses my free utility T2M2 to explain how Time Machine now makes automatic backups to APFS storage, and how to check that. This account is based primarily on what happens in macOS Sonoma and Sequoia, when they’re backing up automatically every hour to local storage.

T2M2 offers three features to see what’s happening with Time Machine and backups:

  • Check Time Machine button, to analyse backups made over the last few hours.
  • Speed button, to view progress reports in the log during a long backup.
  • Browse log button, to show filtered log extracts in fullest detail.

These are each detailed in T2M2’s Help book. Here I’ll concentrate on the first and last, and defer speed checks to that documentation.

Browse log for detail

In practice, you’re most likely to view T2M2’s analysis using the Check Time Machine button first, but here I’ll walk through the greater detail available in log extracts, to build understanding of the sequence of events in each automatic backup.

t2m2rept1

To help you see which subsystems are involved in each stage, T2M2 displays their entries in different colours, and you can show or hide each of those.

Automatic backups are called off by the DAS-CTS dispatching mechanism, whose entries are shown in red (DAS) and blue (CTS). They schedule backups so they don’t occur when the Mac is heavily loaded with other tasks, and call a chain of services to start the backup itself. Dispatching is now reliable over long time periods, but can be delayed or become irregular in some situations. Inspecting those DAS-CTS entries usually reveals the cause.

From there on, most informative log entries are made by Time Machine itself.

Preparations are to:

  • Find each destination backup storage, decide whether any rotation scheme applies, so determine the destination for this backup.
  • Check write performance to the backup destination.
  • Find the machine store on the destination.
  • Determine which local snapshots should be removed, and delete them.
  • Create local snapshot(s) as ‘stable’ snapshot(s), and mount them.
  • Mount previous local snapshot(s) as ‘reference’ snapshot(s).
  • Determine how to compute what needs to be backed up from each source. This should normally use FSEvents to build the EventDatabase.
  • Scan the volumes to be backed up to determine what needs to be backed up.
  • Estimate the total size of the new backup to be created.

Once backing up starts, entries cover:

  • Copying designated items to the destination.
  • Posting periodic progress reports during longer backups.

When that’s complete, closing stages are to:

  • Report details of the backup just completed.
  • Set local snapshots ready for the next backup, with the ‘stable’ snapshot(s) marked as ‘reference’, and unmount local snapshots.
  • Delete working folder used during the previous backup as ‘incomplete’.
  • Create the destination backup snapshot.
  • Delete any old backups due for removal.
  • Report backup success or other outcome.

They’re summarised in this diagram. Although derived from Sonoma, Sequoia brings no substantial change.

tmbackup14a

Or its PDF tear-out version: tmbackup14b

Check Time Machine summaries

t2m2rept2

T2M2 analyses all those log entries to produce a summary of how Time Machine has performed over the last few hours. That is broken down into sections as follows.

Backup destination. This is given with the free space currently available on that volume, followed by the results of write speed measurements made before each backup starts.
Backing up 1 volumes to ThunderBay2 (/dev/disk10s1,TMBackupOptions(rawValue: 257)): /Volumes/ThunderBay2
Current free space on backup volumes:
✅ /Volumes/ThunderBay2 = 1.67 TB
Destination IO performance measured:
Wrote 1 50 MB file at 286.74 MB/s to "/Volumes/ThunderBay2" in 0.174 seconds
Concurrently wrote 500 4 KB files at 23.17 MB/s to "/Volumes/ThunderBay2" in 0.088 seconds

Backup summary. This should be self-evident.
Started 4 auto backup cycles, and 0 manual backups;
completed 4 volume backups successfully,
last backup completed successfully 53.4 minutes ago,
Times taken for each auto backup were 0.3, 0.3, 0.2, 0.2 minutes,
intervals between the start of each auto backup were 61.4, 60.2, 60.3 minutes.

Backups created and deleted (or ‘thinned’).
Created 4 new backups
Thinned:
Thinning 1 backups using age-based thinning, expected free space: 1.67 TB actual free space: 1.67 TB trigger 50 GB thin 83.33 GB dates: (
"2024-10-01-043437")

Local snapshots created and deleted.
Created 4 new snapshots, and deleted 4 old snapshots.

How the items to be backed up were determined. This shows which methods Time Machine used to work out which items needed to backed up, and should normally be FSEvents, once a first full backup has been made.
Of 4 volume backups:
0 were full first backups,
0 were deep scans,
4 used FSEvents,
0 used snapshot diffs,
0 used consistency scans,
0 used cached events.

Backup results. For each completed backup, Time Machine’s report on how many items were added, and their size.
Finished copying from volume "External1"
1 Total Items Added (l: Zero KB p: Zero KB)
3 Total Items Propagated (shallow) (l: Zero KB p: Zero KB)
403274 Total Items Propagated (recursive) (l: 224.93 GB p: 219.31 GB)
403275 Total Items in Backup (l: 224.93 GB p: 219.31 GB)
1 Directories Copied (l: Zero KB p: Zero KB)
2 Files Move Skipped (l: Zero KB p: Zero KB) | 2 items propagated (l: 6 KB p: 12 KB)
1 Directories Move Skipped (l: Zero KB p: Zero KB) | 403269 items propagated (l: 224.93 GB p: 219.31 GB)

Error messages.
✅ No error messages found.

iCloud Drive and pinning

Backing up the contents of iCloud Drive is a longstanding problem for Time Machine, if Optimise Mac Storage is enabled. Those files in iCloud Drive that are stored locally should be backed up, but any that have been evicted from local storage could only be included if they were to be downloaded prior to the backup starting.

In Sonoma and earlier, the only way to ensure that an evicted file in iCloud Drive is included in a Time Machine backup is to manually download it. Sequoia now lets you ‘pin’ individual files and whole folders so that they aren’t evicted, so will always be included in Time Machine backups. This is explained here.

Discrepancies and glitches

T2M2 tries to make sense from log entries that don’t always behave as expected. As backups can be complex, there are situations when T2M2 may report something that doesn’t quite add up. This most commonly occurs when there have been manual backups, or a third-party app has been used to control the scheduling and dispatch of backups. If you do see figures that don’t appear quite right, don’t assume that there’s something wrong with Time Machine or your backups. Generally, these glitches disappear from later automatic backups, so you might like to leave it for a few hours before checking Time Machine again to see if the problem has persisted.

Further reading

What performance should you get from different types of storage?
Where should you back up to?
How big a backup store do you need?
How Time Machine backs up iCloud Drive in Sonoma
Time Machine backing up different file systems
Excluding folders and files from Time Machine, Spotlight, and iCloud Drive
Snapshots aren’t backups
Time Machine in Sonoma: strengths and weaknesses
Time Machine in Sonoma: how to work around its weaknesses
Time Machine in Sonoma: Rotating backups and NAS
A brief history of Time Machine

❌
❌