{"id":24534,"date":"2019-03-07T15:59:20","date_gmt":"2019-03-07T20:59:20","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=24534"},"modified":"2019-03-07T15:59:20","modified_gmt":"2019-03-07T20:59:20","slug":"how-time-machine-makes-backups-with-apfs","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/03\/07\/how-time-machine-makes-backups-with-apfs\/","title":{"rendered":"How Time Machine Makes Backups With APFS"},"content":{"rendered":"<p><a href=\"https:\/\/eclecticlight.co\/2018\/10\/17\/how-time-machine-makes-backups\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2018\/10\/17\/how-time-machine-makes-backups\/\">\n<p>The preparatory sequence identifies and deletes expired local snapshots. According to Apple&rsquo;s <a href=\"https:\/\/support.apple.com\/HT204015\">Support Note<\/a>, these local snapshots are kept for 24 hours; although the log entries below indicate a shorter period, later backups confirm that this is normally the case, and you should expect to find a full 24 hours of snapshots at any time.<\/p>\n<p><code>backupd<\/code> then copies changed items to the backup destination. In order to maintain the impression that each backup is a complete copy of the source volume, it then makes hard links to all the unchanged files and folders. It is able to do this as, unlike many file systems, HFS+ supports directory hard links as well as those to files.<\/p>\n<p>[&#8230;]<\/p>\n<p><code>backupd<\/code> then checks that there is sufficient free space on the backup destination, and if there is, performs that same process as with HFS+, copying changed items and making hard links to the rest. That is followed by new steps, which save a <em>clone family cache<\/em> to the new backup folder, and <em>back-up-later caches<\/em> there too. The precise purpose of these isn&rsquo;t yet clear, although the latter may well list files which changed as the backup was being made.<\/p>\n<p>[&#8230;]<\/p>\n<p>I have been writing that Time Machine has fallen behind macOS, at least in respect of its reliance on the HFS+ file system for backups, which results from its use of directory hard links. This implementation of Time Machine for APFS is perhaps best viewed as version 1.5: it now takes best advantage of the new file system as its source, but has yet to find a new backup method and format appropriate to an APFS backup destination.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/eclecticlight.co\/2019\/03\/02\/mojaves-time-machine-1-5-working-well-but-small-quirks\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2019\/03\/02\/mojaves-time-machine-1-5-working-well-but-small-quirks\/\">\n<p>That old [HFS+] system periodically failed, perhaps when FSEvents lost track of recent changes, or became corrupted. In those circumstances, Time Machine would perform a lengthy &lsquo;deep traversal scan&rsquo; to determine what needed to be backed up, which could in some cases take several hours. One strong case for adopting a new approach with APFS was to reduce the frequency of those deep traversals by using a more robust mechanism for determining what to back up. There&rsquo;s no evidence that the new snapshot-based system is any quicker &#x2013; indeed, in many cases it may perform more slowly than using FSEvents.<\/p>\n<p>[&#8230;]<\/p>\n<p>However, deep traversal scans do still occur on APFS volumes. In one period of only 8 hours, my iMac Pro undertook and completed two such scans, as shown in the T2M2 report below.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/01\/08\/solution-for-time-machine-error-while-restoring-from-the-backup\/\">Solution for Time Machine &ldquo;Error While Restoring From the Backup&rdquo;<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2018\/09\/24\/macos-10-14-mojave-released\/\">macOS 10.14 Mojave Released<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2017\/11\/13\/local-time-machine-uses-apfs-snapshots\/\">Local Time Machine Uses APFS Snapshots<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Howard Oakley: The preparatory sequence identifies and deletes expired local snapshots. According to Apple&rsquo;s Support Note, these local snapshots are kept for 24 hours; although the log entries below indicate a shorter period, later backups confirm that this is normally the case, and you should expect to find a full 24 hours of snapshots at [&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":"2019-03-07T20:59:23Z","apple_news_api_id":"d0e386c6-5cd5-4205-bf73-889aaad69e74","apple_news_api_modified_at":"2019-03-07T20:59:23Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A0OOGxlzVQgW_c4iaqtaedA","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,30,1609,216],"class_list":["post-24534","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple-file-system-apfs","tag-mac","tag-macos-10-14","tag-timemachine"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24534","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=24534"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24534\/revisions"}],"predecessor-version":[{"id":24535,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/24534\/revisions\/24535"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=24534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=24534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=24534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}