利用 APFS 和 tmutil 在完全不需要外部设备的情况使用 Time Machine

更新系统以后用了一个月多,感觉 APFS 表现还是很不错的。

在开启 Time Machine 的情况下对于 APFS 设备会自动产生本地快照。然而用图形界面开启 Time Machine 需要指定个外部备份设备。

但是通过 tmutil 即使在没有外部 Time Machine 设备的情况下,也能创建和管理利用 APFS 建立的本地快照。

以下节选自 man tmutil


     localsnapshot
             Create new local Time Machine snapshots of all APFS volumes included in the
             Time Machine backup.

     listlocalsnapshots mount_point
             List local Time Machine snapshots of the specified volume.

     listlocalsnapshotdates [mount_point]
             List the creation dates of all local Time Machine snapshots.

             Specify mount_point to list snapshot creation dates from a specific volume.

             Listed dates are formatted YYYY-MM-DD-HHMMSS.

     deletelocalsnapshots date
             Delete all local Time Machine snapshots for the specified date (formatted
             YYYY-MM-DD-HHMMSS).

     thinlocalsnapshots mount_point [purge_amount] [urgency]
             Thin local Time Machine snapshots for the specified volume.

应该可以通过 launchctl 创建任务自动管理备份。

备份我现在用Backup In Time, 更简单粗暴直接....

比Time Machine更实用,因为备份可以直接用.

原理其实非常简单:硬连接

不知道谁抄谁的...

我现在都是不涉密资料直接放云盘,涉密的东西放家里硬盘上……

我从来没有做过任何整机备份, 因为我有洁癖……

整机备份咋了?

「物理硬盘」备份可以保证数据更安全,不过现在硬盘都比较耐操。

对于大多数用户来说,使用 Time Machine 没那么重要了。

1 个赞

会把用户配置也备份进去……然后就把那些造成问题或冲突的用户配置也备份进去了。

而我有洁癖,所以……

那你需要每次修改以后复制出來換个新硬盘,或者 dd 清除整个硬盘以后再复制回去,因为被修改的內容还是会作为脏块在硬盘里留著。

我不以水为净,而以眼不见为净。

然而你也看不见备份文件