1

I have an external disk always backing up my system, since Time Machine was launched.

Not the same disk all these years.

Catalina introduce this thing called APFS local snapshot that wastes disk space by creating backups on the main disk.

Also Catalina now split macOS into 2 partitions: Macintosh HD and Macintosh HD - Data.

Here is my problem:

  1. I have Time Machine backing up the main disk to USB disk.
  2. I have local snapshots being created on the main disk.

First question: macOS has these 2 partitions, Macintosh HD and Macintosh HD - Data, I type tmutil listlocalsnapshots / and I see this

com.apple.TimeMachine.2020-03-18-114726.local
com.apple.TimeMachine.2020-03-18-134519.local
com.apple.TimeMachine.2020-03-18-144256.local
com.apple.TimeMachine.2020-03-18-154141.local
com.apple.TimeMachine.2020-03-18-164459.local
com.apple.TimeMachine.2020-03-19-022806.local

These are snapshots that contain data from both Macintosh HD and Macintosh HD - Data, right?

Second question: I am having this other error explained on another question of mine.

That local snapshot I mention, from 3 days ago, doesn't appear today when I listed the local snapshots. Probably they have been alreay erased.

Third question: these snapshots mentioned by fsck_apfs and Disk Utility.app are those APFS local snapshots, right?

Fourth question: When I open the Time Machine application and it shows a list of all backups Time Machine has by date, what backups am I seeing there, the ones on the external disk or these local snapshots.

Fifth question: What is the relation between these local snapshots and the backup being made to external disk?

Sixth question: If the local snapshots and the backups being made to external disks are independent, how do I rollback the disk to a previous local snapshot?

Thanks, please answer these six questions.

1
  • 1
    Most of your questions are based on a faulty understanding of snapshots vs backups. 1) those are TM backups only. 2) That question should be answered there 3) Don't know..what are you looking at? 4-6) local snapshots cannot be made to external drives so those questions are not valid.
    – Allan
    Commented Mar 19, 2020 at 4:19

2 Answers 2

5

Both are backup utilities and both offer you the ability to recover after a "catastrophic" event, but like tools in your tool box, your box wrench and your socket wrench both essentially have the same function, but have their preferred application depending on the scenario.

  • APFS snapshots are a point-in-time snapshot of your APFS file system. Your initial TM backup may be a point in time snapshot, but subsequently, it's an ongoing differential backup - only backing up what has changed.

  • APFS snapshots are only done on drives that have the APFS file system. Time Machine will back up any supported drive, APFS or not.

  • APFS are not so automatic. Yes, they are done automatically prior to an update being applied and you can script them using launchd or cron, but they're generally something that gets done only before a major system change. Time Machine on the other hand, by its very nature not only runs on schedule, but runs continuously to ensure data protection.

  • APFS snapshots are stored to the local APFS drive. This means that you need to have ample space to take a snapshot. TM doesn't care how full your drive is to take a backup as long as you have a target drive big enough to back it up.

  • Since APFS snapshots are only stored on disks with the APFS filesystem, when you run out of space, earlier snapshots are automatically deleted. While this is also the behavior for TM, you can easily add to your backup space by swapping out another external back up drive.

TL;DR

APFS snapshots should not be used as a method of backup because they are only point-in-time snapshots of your system. This is useful if you are about to do an update or make a change and things go sideways and you need the ability to return to a known working state.

Time Machine offers true back up capabilities because it offers more than a point-in-time backup, but an ongoing differential backup where it gives you granular control of what you back up and restore regardless of filesystem.

0
-1

Snapshots are based on APFS CoW (Copy on Write) feature. In the same way the Finder allows you to clone a 1 GB file on APFS, modify 1 byte in the cloned version, and end up using only 1 GB + 1 Block of space rather than 2 GBs, snapshots do a clone of all disk and from thereon, any changes are made to the cloned version. Reverting to a snapshot is therefore only a matter of deleting these changes and making the original copy the editable version. Hence, creating a snapshot and reverting to it is very efficient both in time and space. However, each additional snapshot will make reading and writing data slower due to how the filesystem has to jump in and out of links to different blocks of data for a file that been modified across multiple snapshots. As a result, it's best to not have more than one snapshot at a time and only make a snapshot when carrying out risky experiments, like updating the OS, and merge it with all the subsequent changes once you're confident with the results of the experiment.

TimeMachine (TM) utilizes hard links to minimize storage requirements to only changed files across time, but the initial backup, unlike a snapshot, will require as much space as your whole disk and a considerable amount of time. An initial snapshot in comparison takes virtually no space. Furthermore, even if 1 Bye of a 1 GB file has been changed since the last backup, TM space usage for the new backup will increase by 1 GB rather than just 1 Byte. This is the case for a TM on HFS+ since it has no CoW support, but I'm uncertain if a TM on APFS does it any better.

N.B. Snapshotting to an external or network drive to supplant TimeMachine is meaningless, unless you're an expert and know exactly what you're up to.

P.S. APFS is closed-source and other than the limited information Apple provides, no one can make a claim except with experimentation, which is subject to change at any time. As for link-jumping I've mentioned in the first paragraph and in the comments, APFS uses B-trees just like most other file systems as documented at the bottom of page 8 here. Further explanation on B-trees requires a CS course no less than 2 hours.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .