![]() | |
![]() Time Machine's retrieval interface onmacOS 11 | |
Developer(s) | Apple Inc. |
---|---|
Operating system | macOS 10.5 or newer |
Type | Backup software |
License | Proprietary |
Website | support |
Time Machine is thebackup mechanism ofmacOS, the desktopoperating system developed byApple. 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 eitherUSB orThunderbolt. It was first introduced inMac OS X 10.5 Leopard, which was released in October 2007 and incrementally refined in subsequent releases of macOS. Time Machine was revamped inmacOS 11 Big Sur to supportAPFS, thereby enabling "faster, more compact, and more reliable backups" than were possible previously.[1][2]
Time Machine creates incremental backups of files that can be restored at a later date.[3] It allows the user to restore the whole system or specific files. It also works within a number of applications such asMail andiWork, making it possible to restore individual objects (e.g. emails, contacts, text documents, presentations) without leaving the application.
For backups to a network drive, Time Machine allows the user to back up Mac computers over the network, and supports backing up to certainnetwork 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 require the server to support a recent version of Apple'sApple Filing Protocol (AFP) or a recent version of theServer Message Block (SMB) protocol, and Time Machine no longer works with servers using earlier versions of SMB.[4] Some of the legacy support can be re-enabled by using hand-tuned configuration options, accessed through theTerminal. Apple'sTime Capsule, which was introduced in 2008 and discontinued in 2018, acted as anetwork 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.
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.[5]
Time Machine was overhauled inmacOS 11 Big Sur to utilizeAPFS, Apple's modernfile system first introduced in 2016. Specifically, the new version of Time Machine makes use of APFS'ssnapshot technology.[1][6][7] According to Apple, this enables "faster, more compact, and more reliable backups" than were possible previously withHFS+-formatted drives.[1][2] 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+.[2] A more modest yet nevertheless significant advantage was noted as well for backups to network-attached disks.[2]
New 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."[1] 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.[2]
At least in some circumstances, encryption appears to be required (instead of merely optional) in the new version of Time Machine.[2]
Time Machine'suser interface when retrieving a file uses Apple'sCore AnimationAPI. Upon its launch, Time Machine "floats" the activeFinder or application window from the user's desktop to a backdrop depicting the user's blurred desktop wallpaper. Behind the currentactive window are stacked windows, with each window representing asnapshot 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.
Time Machine works with locally connected storage disks, which must be formatted in theAPFS orHFS+ volume formats. Support for backing up to APFS volumes was added withmacOS 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 usessparse 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.
Time Machine places strict requirements on the backup storage medium. The only officially supported configurations are:[8]
On a Time Capsule, the backup data is stored in an HFS+disk image and accessed viaApple Filing Protocol. Although it is not officially supported, users and manufacturers have also configuredFreeBSD andLinux servers andnetwork-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.[9][10][11][12][13][14][15][16]
Time Machine creates a folder on the designated Time Machine volume (local or inside a remotesparse 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 links 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.[17]
Some other backup utilities save deltas for file changes, much likeversion 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.[17]
Time Machine on HFS+ volumes creates multiple hard links to unmodified directories.[17] Multiple linking of directories is a peculiar feature for HFS+, and is not supported on modern Unix file systems including Apple's own APFS.[18] As a result, tools likersync 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 utilitiesrsync andFlyBack, which examine modification dates of all files during backup.
Time Machine is also available in themacOS installation process. One of the features in theMigration 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.[19]
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 theextended file attributecom.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 stringcom.apple.backup
in anyproperty list format. Writingcom.apple.MobileBackup
instead sets the exclusion for iOS backups.[20]
Google Chrome is known to use the attribute to exclude its histories.[20] Third-party backup applications that respect this setting include CrashPlan and Arq.[21] Apple wraps the attribute into thetmutil
command-line utility[20] as well as a CoreServices API.[22]
{{cite web}}
: CS1 maint: numeric names: authors list (link)AFPD_UAMLIST="-U uams_guest.so"
to the[Global]
section inafp.conf
.