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
    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.

New contributor
Unknown is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
13
  • The Finder doesn't know how to clone files, this is something the underlying filesystem does (or doesn't, e.g. FAT or anything mounted via SMB). Also, do you have a source or more details for the "snapshots make reading/writing slower" claim? I would be surprised if this slows down disk access significantly, but I may be wrong here.
    – nohillside
    yesterday
  • 1
    Snapshots do not slow down access regardless of filesystem. If that was the case I and my ex-colleagues would not have recommended our company spend hundreds of thousands on NetApp kit! yesterday
  • @AndyGriffiths: Multi-leveling snapshots on a single file would require link-jumping which is slower than sequential reads. If you've 10 level deep snapshots but they mostly vary across different files, it would not be noticeable however. The absolute worst case scenario: your reads will all be at random-seek speed.
    – Unknown
    yesterday
  • 1
    I’m not sure macOS navigates anything but one snapshot at a time, so perhaps your experience is with another technology and file system @Unknown ? Or just you are using the term snapshot generically and not referring to the APFS implementation which has a very specific definition (with regards to this site generally)
    – bmike
    yesterday
  • @bmike: 'One snapshot at a time' means one snapshot deeper than before, not in parallel. I have not discussed the parallel case so far as it's not the case of interest.
    – Unknown
    yesterday

You must log in to answer this question.

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