5

So, for various security reasons my company doesn't allow attaching backup drives or doing any external backups -- mostly we have cloud things and use git for backup. But Time Machine lets me use the SSD and local storage for backups.

enter image description here

So I'd like to use Time Machine to just let me revert to recent things (like a file I accidentally delete or similar). Is there any way to configure that?

1
  • 2
    Git isn't a backup. Git is something you backup. If your authoritative repository isn't being backed up, address that first. Commented Nov 7, 2021 at 16:29

2 Answers 2

1

The bad news is that even the local snapshots seem to need Time Machine to be configured with an external disk, which sounds silly to me.

One option would be to use a disk image as a cheat, but the TM preferences won't allow you to select such a disk.

The good news is that we can use the CLI to make TM accept the disk image, which you can then trash and forget. So we end up with the automatic local backups that we wanted.

The procedure:

  1. Create a read/write, sparsebundle disk image with Disk Util. I suggest naming it "FakeDisk" or similar so that you (and your IT people!) remember that this is not a real external disk.
  2. Mount the disk image.
  3. This is the key point: you need to use the CLI to make TM accept the disk image as a destination: sudo tmutil setdestination /Volumes/FakeDisk
  4. You can now unmount and trash the disk image.
  5. Go to your TM preferences and click the checkbox. Done!

TM will probably remind you every ~10 days that you didn't do a backup to the configured disk. Unfortunately I don't see a way to avoid those notifications, but a click every few days is OK with me.

The TM menu item will show forever "Waiting to complete first backup", but you can confirm that the local snapshots are working by entering TM itself, or in DiskUtil (as shown in @bmike's answer).

0

I really haven’t tried to “hoodwink” the system since I just attach an external disk. If you don’t want it connected - the system runs well and reminds you every 2 weeks or so to connect the external drive.

You can make use of the GUI and local snapshots features once you get one backup to an external drive, even when it’s not connected.

If you really must have snapshots without the Time Machine setup automating all the steps and triggering the automatic snaps, you would have to create and manage the snapshots with another tool or command line snapshots.

Apple only documents this as a function call fs_snapshot_create which has a very excellent manual page

man fs_snapshot_create

Once you’ve created snapshots, you can list and delete them easily with the diskutil command line tool. Disk Utility can also show you snapshots so you can visualize, mount and delete them.

Disk Utility on Monterey showing APFS snapshots

2
  • You can also list and delete them with Disk Utility on Monterey
    – Ezekiel
    Commented Dec 4, 2021 at 16:51
  • 1
    Woah @Ezekiel for real? I need to check that and edit / add screen shot if so! Thanks so much for the comment
    – bmike
    Commented Dec 4, 2021 at 17:34

You must log in to answer this question.

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