1

So Time Machine keeps hourly backups for a day and dailies for a week and weeks until disk full. The problem is that I am paranoid and concerned about discovering that I made changes to a file over time in the past and that I want the version that disappeared between weekly backups. (Yes, yes, I use git and other version control solutions for many things but I like to be paranoid and hate things I can't configure myself).

Is it possible to change how long hourly and daily backups are kept for and if so where?

2 Answers 2

1

If you want control over the retention policy, Time Machine isn't really the right tool for you; it's really designed to avoid requiring the user make decisions, and as a result it's not a good choice for someone who wants to be able to make decisions. The retention policy definitely follows this principle; there's no way (at least as far as I've ever seen) to adjust its retention policy.

In fact, there's not even any way to guarantee snapshots will be retained at all. If Time Machine decides it needs the entire backup capacity for the current backup (say, because you just connected your big external disk full of videos and it wants to back that up -- this happened to a friend of mine), it'll actually remove all old snapshots to make room. Note that there is an option in the preference pane to notify you after old backups are deleted.

Basically, Time Machine places priority on getting the current data backed up vs. retaining old data, and there's no way to change this. (It is, after all, a backup system, not an archiving system.) If your priorities differ, you really should find another archiving tool.

(BTW, you did misread its normal policy slightly: it keeps the daily snapshots for a month, and only after a month does it thin them down to one a week.)

2
  • You are correct: man tmutil shows MANY options, but none of them change the schedule!
    – WGroleau
    May 22, 2023 at 20:29
  • “…say, because you just connected your big external disk full of videos and it wants to back that up…” — that brings back a very bad memory for me, too 😞
    – gidds
    May 23, 2023 at 22:11
0

In practice this is not an issue. I explain this to people often when they are thinking whether they want to trust Time Machine or augment / choose another option.

If you keep your backup disk connected always, you will end up with 24 backups a day other than when a daylight savings time event passes.

Since the hourly snapshots get consolidated into a daily snap - as long as your file was not created and deleted in an hour - it will exist on backup for a day. Worst case your file doesn't get consolidated and is dropped in a day, but it could become part of the daily backup and then part of the permanent weekly backup - or it could get dropped.

Once your file has sat on the filesystem for more than an hour, it will exist for a month (or more based on consolidation results) on the backups. Once your file has existed for a week on your Mac, it will be guaranteed to exist on the backup until the drive fills and that weekly interval gets pruned. I believe that's the first window of data loss if your only copy of a file is on only one (and the oldest one) weekly backup interval and the drive fills. For most cases - your file should remain forever if you don't delete it and then forget to restore it when you notice it missing.

Time Machine retention description on macOS Ventura - hourly / daily / weekly

Most people can always keep every important file for ever if you leave it for a week before deleting and you cycle in a new backup destination as soon as your previous one fills.

I mitigate this by having two destinations always. As soon as the first gets close to filling, I remove it from the "active destination" list and put it in cold storage. I add a new drive to the rotation and then let the current full on remove intervals until I split the difference between when the new will fill and the "old" stops pruning old backups. The cost of this is less than $50 a year to me to store data, and the cost is getting cheaper as storage continues to be a commodity and grows denser faster than costs rise.

2
  • Is the bolded sentence accurate? As you say, daily backups are kept for a months; doesn't that mean that a backup will last indefinitely only after it has remained for more than a month (plus however long it takes to do the thinning)?
    – gidds
    May 23, 2023 at 22:14
  • I believe it is @gidds - the thinning can but does not necessarily move a unique file up or down to the "kept interval". Additionally, the thinning happens all the time as soon as a daily is there for more than a month or an hourly is there for more than a day. The thinning is based on the time of the backup start even if the backup takes a day or more to complete. The only way to guarantee a file is present is for it to be on the system for an entire week and at least one daily backup captures it seven times before thinning happens.
    – bmike
    May 24, 2023 at 21:32

You must log in to answer this question.

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