{"id":38748,"date":"2023-03-13T18:08:29","date_gmt":"2023-03-13T22:08:29","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=38748"},"modified":"2023-03-13T18:08:29","modified_gmt":"2023-03-13T22:08:29","slug":"ventura-time-machine-backups-and-the-apfs-uncertainty-principle","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/03\/13\/ventura-time-machine-backups-and-the-apfs-uncertainty-principle\/","title":{"rendered":"Ventura Time Machine Backups and the APFS Uncertainty Principle"},"content":{"rendered":"<p><a href=\"https:\/\/eclecticlight.co\/2023\/03\/01\/how-does-time-machine-make-a-backup\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2023\/03\/01\/how-does-time-machine-make-a-backup\/\">\n<p>Before making any snapshots for this backup, TMA performs housekeeping on its own previous snapshots, both on each volume being backed up, and on the target volume (backup storage). The rule it applies is inflexible: it deletes any local snapshots (on a volume being backed up) that are more than 24 hours old, unless it&rsquo;s the last snapshot on that volume, which it retains for this backup. Even so, TMA snapshots can become orphaned and left indefinitely, for the user to spot and delete manually. Although uncommon, this can occur when Macs are unable to make full backups because they&rsquo;re disconnected from their backup storage for more than 24 hours at a time.<\/p>\n<p>[&#8230;]<\/p>\n<p>TMA next has the task of deciding how it&rsquo;s going to work out what needs to be backed up on each source volume. [&#8230;] Snapshot deltas were first choice in the past, but TMA has returned to preferring FSEvents when possible, for second and subsequent backups of a volume.<\/p>\n<\/blockquote>\n\n<p>I wonder whether this is for performance reasons.<\/p>\n\n<p><a href=\"https:\/\/eclecticlight.co\/2023\/02\/24\/how-to-get-the-trash-working-properly\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2023\/02\/24\/how-to-get-the-trash-working-properly\/\">\n<p>If the large files you put in the Trash were on the volume being backed up when Time Machine made one of those hourly snapshots, then the data for those files will be retained as part of that snapshot, until the last snapshot containing those files is deleted. Only then can the data for those files be removed, and the space they took up will be freed.<\/p>\n<p>[&#8230;]<\/p>\n<p>The cleanest way to avoid this happening is to keep all downloads and large temporary files on a separate volume which isn&rsquo;t backed up, so doesn&rsquo;t have snapshots made of it automatically.<\/p>\n<p>[&#8230;]<\/p>\n<p>If you don&rsquo;t want to use a BigFiles volume, or can&rsquo;t select where to save a large temporary file, you can work around snapshots by timing. Before acquiring that large file, check when the last Time Machine backup was made, using the Time Machine item in the menu bar. Provided there&rsquo;s sufficient time before the next backup is due, you can download the large file(s), move them to another disk for storage or otherwise use them, then put them in the Trash. But the most essential step is that you must then empty the Trash before the next backup starts, or they&rsquo;ll be captured in the next automatic snapshot.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/tidbits.com\/2023\/02\/24\/auditing-free-drive-space-where-have-all-the-gigabytes-gone\/\">Adam Engst<\/a>:<\/p>\n<blockquote cite=\"https:\/\/tidbits.com\/2023\/02\/24\/auditing-free-drive-space-where-have-all-the-gigabytes-gone\/\">\n<p>I&rsquo;ve been pondering just how difficult&mdash;perhaps impossible&mdash;it is to know how much free space you actually have on a Mac&rsquo;s drive these days (see &ldquo;<a href=\"https:\/\/tidbits.com\/2022\/11\/15\/ensure-sufficient-free-space-before-upgrading-to-ventura\/\">Ensure Sufficient Free Space before Upgrading to Ventura<\/a>,&rdquo; 15 November 2022 and &ldquo;<a href=\"https:\/\/tidbits.com\/2023\/01\/11\/iphones-and-ipads-now-require-a-passcode-on-every-backup-sync\/\">iPhones and iPads Now Require a Passcode on Every Backup\/Sync<\/a>,&rdquo; 11 January 2023). The complexity underlying APFS and macOS in general creates a situation where the amount of free space isn&rsquo;t entirely deterministic.<\/p>\n<p>[&#8230;]<\/p>\n<p>I figured that if I emptied the Trash, I&rsquo;d either see no change due to the Time Machine snapshot issue or have almost exactly 145 GB free. Surprisingly, neither was true. After a minute or so, the free space number did rise&mdash;as expected&mdash;but first to 148 GB (not shown) before settling down at 146 GB. I can&rsquo;t explain why it was a full gigabyte higher than would seem possible.<\/p>\n<p>[&#8230;]<\/p>\n<p>Grasping at straws, I decided to restart, just in case that somehow helped the filesystem come to a better conclusion about the amount of free space. Unfortunately, after my Mac came back up (with the same apps running), the free space number had <em>dropped<\/em> to 159 GB.<\/p>\n<p>[&#8230;]<\/p>\n<p>I no longer believe it&rsquo;s possible to audit the free space on a Mac or to explain precisely how much space should be freed up by a particular action.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/01\/26\/what-happened-to-virtual-memory\/\">What Happened to Virtual Memory?<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/05\/18\/time-machine-evolution-and-apfs\/\">Time Machine Evolution and APFS<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/05\/16\/big-sur-really-needs-real-free-space\/\">Big Sur Really Needs Real Free Space<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/04\/11\/quantum-computing-and-apfs-free-and-used-space\/\">Quantum Computing and APFS: Free and Used Space<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Howard Oakley: Before making any snapshots for this backup, TMA performs housekeeping on its own previous snapshots, both on each volume being backed up, and on the target volume (backup storage). The rule it applies is inflexible: it deletes any local snapshots (on a volume being backed up) that are more than 24 hours old, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-03-13T22:08:31Z","apple_news_api_id":"1ad6f337-afc6-468d-aedd-6320aa4c6834","apple_news_api_modified_at":"2023-03-13T22:08:31Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AGtbzN6_GRo2u3WMgqkxoNA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1395,146,30,2223,174,216],"class_list":["post-38748","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple-file-system-apfs","tag-backup","tag-mac","tag-macos-13-ventura","tag-storage","tag-timemachine"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=38748"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38748\/revisions"}],"predecessor-version":[{"id":38749,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38748\/revisions\/38749"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=38748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=38748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=38748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}