4

In addition to the usual incremental backups to external media, Time Machine also automatically creates, manages, and prunes local APFS snapshots. These snapshots can be viewed in Time Machine's Finder-esque UI just like the incremental backups to external media. So, you can use these Time Machine snapshots to view recent versions of your file system, say to retrieve an old file that was just deleted using rm(1).

It appears Time Machine will only automatically create local snapshots after it is configured to backup to external media. Is it possible to enable automatic APFS snapshots without enabling Time Machine backups to external media?

7
  • For what purpose?
    – Gilby
    Commented Sep 2, 2022 at 6:38
  • I don't want an entire Time Machine backup onto a separate disk, but I would like to have automatic local snapshots.
    – Sagar
    Commented Sep 2, 2022 at 15:20
  • What problem are you trying to solve? Commented Sep 3, 2022 at 0:03
  • @MarcWilson I just edited to question to add a bit more context.
    – Sagar
    Commented Sep 3, 2022 at 0:46
  • Do you have at least some sort of external storage? You can point Time Machine to back up to a sparse bundle, then just delete the sparse bundle. You'll then have an entry in time machine (making it "set-up"), which should enable APFS snapshots, right? I've never tried it, so I don't know if you need a first backup, though. Commented Sep 3, 2022 at 2:55

1 Answer 1

5

I'll mention the workaround I've employed:

  1. Mount an external disk that I don't use anymore.
  2. Set it up as the Time Machine disk.
  3. Eject the disk, and never amount it again.
  4. Profit.

Time Machine automatically creates snapshots now. This solution was not my first choice since Time Machine will remind me to mount the external disk for backup, but I haven't received that notification yet.

@At0mic mentioned in the comments that it might be possible to use a sparsebundle as the target disk, but that this needs to be done from the command line. I haven't tried this, but please edit this answer if you do.

4
  • Another possible workaround is to use tmutil snapshot to create a local snapshot manually. To automate this, a script or cron job can be used. I haven't tested if this works if Time Machine is disabled, as I have TM enabled and don't have spare hardware to test on. I stumbled upon this while trying to solve a similar issue with creating snapshots of data already stored on an external drive without requiring yet another storage device: apple.stackexchange.com/questions/451418/…
    – Rafal
    Commented Dec 16, 2022 at 1:16
  • @Rafal Three months in, I'm happy to note that Time Machine is not spamming me with notifications. I think I may have been prompted once or twice, but I probably just dismissed the notification. I considered rolling my own with a cronjob, but I really wanted Time Machine to just handle everything (creating and pruning snapshots) for me.
    – Sagar
    Commented Dec 17, 2022 at 5:59
  • PSA: I was able to use the workaround in this answer, but instead of using an external disk I used a sparsebundle.
    – alecdwm
    Commented Jul 27, 2023 at 15:05
  • 1
    (1) Create a sparsebundle using disk utility (which was then automatically mounted at /Volumes/TimeMachine - TimeMachine was the name I chose). (2) sudo tmutil setdestination /Volumes/TimeMachine. (3) Eject the TimeMachine volume in Finder. (4) Wait a few hours and confirm snapshots are created via tmutil listlocalsnapshots /
    – alecdwm
    Commented Jul 27, 2023 at 15:07

You must log in to answer this question.

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