Content deleted Content added
→Mountain Lion / Mavericks Compatibility Issues: Pointed out some issues with the tone of a section. Tags: Mobile edit Mobile web edit |
m →Requirements: HTTP to HTTPS for Blogspot |
||
(148 intermediate revisions by 93 users not shown) | |||
Line 1:
{{Short description|macOS backup software application}}
{{Use mdy dates|date=October 2013}}
{{Infobox software
| name = Time Machine
| logo =
| screenshot =
| screenshot_size = 300px
| caption = Time Machine's retrieval interface on [[macOS Big Sur|macOS 11]]
| developer = [[Apple Inc.]]
| operating system = [[Mac OS X Leopard|macOS 10.5]] or newer
| genre = [[Backup software]]
| license = [[Proprietary software|Proprietary]]
| website =
}}
{{macOS topics}}
'''Time Machine''' is the [[backup software|backup]] mechanism of [[macOS]], the desktop [[operating system]] developed by [[Apple Inc.|Apple]]. The software is designed to work with both local storage devices and network-attached disks, and is commonly used with external disk drives connected using either [[USB]] or [[Thunderbolt (interface)|Thunderbolt]]. It was introduced in [[Mac OS X Leopard|Mac OS X 10.5 Leopard]], which was released in October 2007 and incrementally refined in subsequent releases of macOS. Time Machine was revamped in [[MacOS Big Sur|macOS 11 Big Sur]] to support [[Apple File System|APFS]], which enabled faster and more reliable backups.<ref name="macOS 11.0.1 Release Notes (Apple)"/><ref name="Ars Technica 2020.11.12, macOS Big Sur Review">{{cite news |last1=Cunningham |first1=Andrew |title=macOS 11.0 Big Sur: The Ars Technica review |url=https://arstechnica.com/gadgets/2020/11/macos-11-0-big-sur-the-ars-technica-review/ |access-date=6 March 2021 |publisher=Ars Technica |date=12 Nov 2022}}</ref>
==Overview==
Time Machine creates incremental backups of files that can be restored at a later date.<ref name="apple_tm">
Time Machine saves hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for everything older than a month until the volume runs out of space. At that point, Time Machine deletes the oldest weekly backup.<ref>{{Cite web |last=Tiwari |first=Saurabh |date=2018-05-07 |title=Create a backup with Time Machine on Mac |url=https://techibhai.com/create-backup-time-machine-mac/ |access-date=2022-02-16 |website=Techi Bhai |language=en-US}}</ref>
For backups to a network drive, Time Machine allows the user to back up Mac computers over the network, and supports backing up to certain [[Network-attached storage|network attached storage]] devices or servers, depending on the version of Time Machine. Earlier versions worked with a wide variety of NAS servers, but later versions required the server to support a recent version of Apple's [[Apple Filing Protocol|Apple Filing Protocol (AFP)]] or a recent version of the [[Server Message Block|Server Message Block (SMB)]] protocol, and Time Machine no longer works with servers using earlier versions of SMB.<ref name="AppleTimeMachineOverSMB">{{cite web |title=Time Machine over SMB Specification |url=https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/Time_Machine_SMB_Spec/ |website=Documentation Archive |publisher=Apple Inc. |access-date=24 April 2019 |date=13 September 2016}}</ref> Some of the legacy support can be re-enabled by using hand-tuned configuration options, accessed through the [[Terminal (macOS)|Terminal]]. Apple's [[AirPort Time Capsule]] router, which was introduced in 2008 and discontinued in 2018, acted as a [[Network-attached storage|network storage]] device specifically for Time Machine backups, allowing both wired and wireless backups to the Time Capsule's internal hard drive. Time Machine may also be used with other external or internal volumes.
[[macOS Tahoe]] will be the last version of macOS to support AFP, with macOS 27 onward only supporting Time Machine backups over SMB version 2 or later. Time Machine backups using AirPort Time Capsule routers will no longer function.<ref name=":0">{{Cite web |date=2025-06-10 |title=Warning: Apple Says macOS 27 Won't Support AirPort Time Capsule Backups |url=https://www.macrumors.com/2025/06/10/macos-27-wont-support-airport-time-capsule/ |access-date=2025-06-22 |website=MacRumors |language=en}}</ref>
== Revamp in macOS Big Sur ==
Time Machine was overhauled in [[macOS Big Sur|macOS 11 Big Sur]] to utilize [[APFS]], Apple's modern [[file system]] introduced in 2016, and makes use of APFS's [[Snapshot (computer storage)|snapshot]] technology.<ref name="macOS 11.0.1 Release Notes (Apple)">{{cite web |title=macOS Big Sur 11.0.1 Release Notes |url=https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes |website=Apple |access-date=December 13, 2020}}</ref><ref name="Owen, Apple Insider 2020.06.27">{{cite news |last1=Owen |first1=Malcolm |title=APFS changes affect Time Machine in macOS Big Sur, encrypted drives in iOS 14 |url=https://appleinsider.com/articles/20/06/27/apfs-changes-affect-time-machine-in-macos-big-sur-encrypted-drives-in-ios-14 |access-date=August 6, 2020 |publisher=Apple Insider |date=June 27, 2020}}</ref><ref name="Oakley, Eclectic Light Company 2020.06.20">{{cite news |last1=Oakley |first1=Howard |title=APFS changes in Big Sur: how Time Machine backs up to APFS, and more |url=https://eclecticlight.co/2020/06/29/apfs-changes-in-big-sur-how-time-machine-backs-up-to-apfs-and-more/ |access-date=August 6, 2020 |publisher=The Eclectic Light Company |date=June 20, 2020}}</ref> According to Apple, this enables "faster, more compact, and more reliable backups" than were possible previously with [[HFS Plus|HFS+]]-formatted drives.<ref name="macOS 11.0.1 Release Notes (Apple)" /><ref name="Ars Technica 2020.11.12, macOS Big Sur Review"/> An independent evaluation of this claim found that macOS 11's Time Machine implementation in conjunction with APFS was 2.75-fold faster upon initial local backup and 4-fold faster upon subsequent backups relative to macOS 10.15's Time Machine implementation using HFS+.<ref name="Ars Technica 2020.11.12, macOS Big Sur Review" /> A more modest yet nevertheless significant advantage was noted as well for backups to network-attached disks.<ref name="Ars Technica 2020.11.12, macOS Big Sur Review" />
Local (i.e. USB- or Thunderbolt-connected) and network-connected Time Machine backup destinations are formatted as APFS by default, though Time Machine can continue backing up to existing HFS+ backup volumes."<ref name="macOS 11.0.1 Release Notes (Apple)" /> There is no option to convert existing, HFS+-based backups to APFS; instead, users who want to benefit from the advantages of the new, APFS-based implementation of Time Machine need to start with a fresh volume.<ref name="Ars Technica 2020.11.12, macOS Big Sur Review" />
At least in some circumstances, encryption appears to be required (instead of merely optional) in the new version of Time Machine.<ref name="Ars Technica 2020.11.12, macOS Big Sur Review" />
==User interface==
Time Machine's [[user interface]] when retrieving a file uses Apple's [[Core Animation]] [[application programming interface|API]]. Upon its launch, Time Machine "floats" the active [[Finder (software)|Finder]] or application window from the user's desktop to a backdrop depicting the user's blurred desktop wallpaper. Behind the current [[active window]] are stacked windows, with each window representing a [[Snapshot (computer storage)|snapshot]] of how that folder or application looked on the given date and time in the past. When toggling through the previous snapshots, the stacked windows extend backwards, giving the impression of flying through a "time tunnel." While paging through these "windows from the past", a previous version of the data (or currently deleted data) may be retrieved.
==Storage==
Time Machine works with locally connected storage disks, which must be formatted in the [[Apple File System|APFS]] or [[HFS Plus|HFS+]] volume formats. Support for backing up to APFS volumes was added with [[macOS Big Sur|macOS 11 Big Sur]] and since then APFS is the default volume format.
Time Machine also works with remote storage media shared from other systems, including Time Capsule, via the network. When using remote storage, Time Machine uses [[Sparse image|sparse bundles]]. This acts as an isolation layer, which makes the storage neutral to the actual file system used by the network server, and also permits the replication of the backup from one storage medium to another. Sparse bundles are mounted by macOS like any other device, presenting their content as a HFS+ formatted volume, functionally similar to a local storage.
===Requirements===
Time Machine places strict requirements on the backup storage medium. The only officially supported configurations are:<ref>{{cite web|title=Backup disks you can use with Time Machine|url=https://support.apple.com/en-us/HT202784|website=Apple Support|publisher=Apple Inc.|access-date=30 November 2020}}</ref>
* A storage drive or partition connected directly to the computer, either internally or by a bus like [[USB]] or [[Thunderbolt (interface)|Thunderbolt]] and formatted as [[Apple File System|APFS]] or [[journaling file system|journaled]] [[HFS Plus|HFS+]]. If the volume format is not correct, Time Machine will prompt the user to reformat it.
* A folder on another Mac on the same network.
* The internal drive of an Apple [[AirPort Time Capsule]] router on the same network, or a USB drive connected to an AirPort Time Capsule 802.11ac or [[AirPort Extreme]] 802.11ac router on the same network. (USB hard drives on earlier generations of the AirPort Extreme/Time Capsule are not supported.) ''(This option is only supported in [[macOS Tahoe]] and earlier and will be dropped with macOS 27.)''<ref name=":0" />
* Local network volumes connected using the [[Apple Filing Protocol]] (supported through macOS Tahoe) or via an [[Server Message Block#SMB 3.0|SMB3]] share that advertises a number of capabilities.<ref name="AppleTimeMachineOverSMB" />
On a Time Capsule, the backup data is stored in an HFS+ [[disk image]] and accessed via [[Apple Filing Protocol]]. Although it is not officially supported, users and manufacturers have also configured [[FreeBSD]] and [[Linux]] servers and [[network-attached storage]] systems to serve Time Machine-enabled Macs. There are also a few software tools available on the market that can copy files inside Time Machine backups in Windows machines.<ref>{{cite web
| url = http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume
| title = HowTo: Make Ubuntu A Perfect Mac File Server And Time Machine Volume
|
| author = Matthias Kretschmann| date = June 19, 2008
}}</ref><ref>{{cite web | url = http://www.nslu2-linux.org/wiki/HowTo/TimeMachineBackups
| title = NSLU2-Linux - HowTo / TimeMachineBackups
| author = MKurtz
|
| url =
| title = Mac OS X Time Machine and FreeNAS 0.7
| author = harryd71
| date = November 23, 2009
| access-date = January 17, 2010}}</ref><ref>{{cite web
| url = https://www.qnap.com/en-us/how-to/tutorial/article/using-time-machine-to-back-up-your-mac-to-a-qnap-nas-via-smb/
|
| author = QNAP Systems Inc.
| access-date = November 30, 2020}}</ref><ref>{{cite web
| url = http://bastibe.de/2012-07-29-using-raspberry-pi-as-time-machine.html
| title = Using a Raspberry Pi as a Time Capsule for Mountain Lion
| author = Bastian Bechtold
|
| url=http://www.afp548.com/2013/05/06/afp-services-on-a-linux-server/
| title=Using Netatalk: AFP Services on a Linux Server
| publisher=AFP548.com
|
| author=Alonso, Noel}} Also see slowfranklin's comment and its replies. To add the guest UAM, add <code>AFPD_UAMLIST="-U uams_guest.so"</code> to the <code>[Global]</code> section in <code>afp.conf</code>.</ref><ref>{{cite web
| url = http://www.area536.com/projects/ironclad-time-machine-backups-on-freebsd/
| title = Ironclad Time Machine backups on FreeBSD
| author = Bas van de Wiel
| access-date = March 18, 2016}}</ref>
<ref>{{cite web
| url = https://www.geekdashboard.com/restore-time-machine-backups-windows/
| title = How to Access and Restore Time Machine Backup Files on Windows
| author = Amar Ilindra| date = November 21, 2018
}}</ref>
==Operation==
Time Machine creates a folder on the designated Time Machine volume (local or inside a remote [[sparse image]]) into which it copies the directory tree of all locally attached storage drives, except for files and directories that the user has specified to omit, including the Time Machine volume itself. Every hour thereafter, it creates a new subordinate folder and copies only files that have changed since the last backup and creates (in the case of HFS+ volumes) [[hard link]]s to files that already exist on the backup drive. A user can browse the directory hierarchy of these copies as if browsing the primary disk.<ref name="PondHowTimeMachineWorks">{{cite web |last1=Pond |first1=James |date=August 31, 2013 |title=How Time Machine Works its Magic |url=http://pondini.org.ftp83plus.net/TM/Works.html |archive-url=https://web.archive.org/web/20190621092705/https://www.baligu.com/pondini/TM/Works.html |archive-date=June 21, 2019 |access-date=May 19, 2019 |website=Apple OSX and Time Machine Tips |publisher=baligu.com |at=File System Event Store, Hard Links}}</ref>
Some other backup utilities save deltas for file changes, much like [[version control]] systems. Such an approach permits more frequent backups of minor changes, but can often complicate the interaction with the backup volume. By contrast, it is possible to manually browse a Time Machine backup volume without using the Time Machine interface; Time Machine presents each backup to the user as a complete disk copy.<ref name="PondHowTimeMachineWorks" />
Time Machine on HFS+ volumes creates multiple hard links to unmodified directories.<ref name="PondHowTimeMachineWorks" /> Multiple linking of directories is a peculiar feature for HFS+, and is not supported on modern Unix file systems including Apple's own APFS.<ref name="MacObserverTimeMachineAPFS">{{cite web |last1=Butts |first1=Jeff |title=Time Machine and APFS: What You Need to Know |url=https://www.macobserver.com/tips/deep-dive/time-machine-and-apfs-need-know/ |website=The Mac Observer |access-date=23 April 2019 |date=25 September 2017}}</ref> As a result, tools like [[rsync]] cannot be used to replicate a Time Machine volume; replication can only reliably be done by imaging the entire filesystem.
Apple system events record when each directory is modified on the hard drive. This means that instead of examining every file's modification date when it is activated, Time Machine only needs to scan the directories that changed for files to copy. This differs from the approach taken by similar backup utilities [[rsync]] and [[FlyBack]], which examine modification dates of all files during backup.
Time Machine is also available in the [[macOS]] installation process. One of the features in the [[Migration Assistant (Apple)|Migration Assistant]] interface is to restore the contents of a Time Machine backup. In other words, a hard drive can be restored from a Time Machine backup in the event of a catastrophic crash.
[[OS X Mountain Lion]] introduced the ability to use multiple volumes simultaneously for Time Machine operations. When the user specifies more than one volume to use, macOS rotates among the desired volumes each time it does a backup.<ref>{{cite web | url=http://www.macworld.com/article/1165496/ten_exciting_system_changes_in_mountain_lion.html | title=Ten exciting system changes in Mountain Lion | publisher=Mac-world | date=February 21, 2012 | access-date=April 29, 2012 | author=Caldwell, Serenity}}</ref>
== Exclusion ==
Time Machine supports two forms of exclusion: one based on a user-configured list of paths (plus a set of system defaults), the other based on the [[Extended file attributes|extended file attribute]] {{code|com.apple.metadata:com_apple_backup_excludeItem dependencies}}. Since the attribute is applied to the file or directory directly, moving or copying will not affect the exclusion. The attribute should contain the string {{code|com.apple.backup}} in any [[property list]] format. Writing {{code|com.apple.MobileBackup}} instead sets the exclusion for iOS backups.<ref name=bob>{{cite web |last1=Bobby |first1=Brant |title=macos - On OS X, what files are excluded by rule from a Time Machine backup? |url=https://apple.stackexchange.com/a/25833 |website=Ask Different}}</ref>
Google Chrome is known to use the attribute to exclude its histories.<ref name=bob/> Third-party backup applications that respect this setting include CrashPlan and Arq.<ref>{{cite web |title=Feature Request: Honor com_apple_backup_excludeItem on MacOS · Issue #478 · gilbertchen/duplicacy |url=https://github.com/gilbertchen/duplicacy/issues/478 |website=GitHub |language=en}}</ref> Apple wraps the attribute into the {{code|tmutil}} command-line utility<ref name=bob/> as well as a CoreServices API.<ref>{{cite web |title=CSBackupSetItemExcluded - Core Services |url=https://developer.apple.com/documentation/coreservices/1445043-csbackupsetitemexcluded?language=objc |website=Apple Developers Documentation}}</ref>
==See also==
*[[Backup (backup software)|MobileMe Backup]]
*[[List of backup software]]
*Backup options built into Microsoft Windows: [[System Restore]], [[Features new to Windows 8#File History|File History]]
==References==
Line 105 ⟶ 113:
==External links==
*[
*[
*[https://eclecticlight.co/2021/03/04/time-machine-to-apfs-evolution/ brief history of Time Machine and its evolution to using APFS], by Howard Oakley
{{
{{Backup software}}
{{DEFAULTSORT:Time Machine (
[[Category:2007 software]]
[[Category:
[[Category:Backup software for
|