如何验证Mac的Time Machine备份是否正常工作
You regularly back up your Mac with Time Machine, but how do you know that it’s working?
您定期使用Time Machine备份Mac ,但是您如何知道它正在工作呢?
There are a few ways to check. If you back up over the network, a built-in tool lets you verify that your that your backup isn’t corrupt. If your back up to a local USB, that tool won’t work, but there are other ways you can peek inside your backups and make sure that everything is working. These tools are useful even if you do use a networked drive, so let’s go ahead and dive in.
有几种检查方法。 如果您通过网络备份,则可以使用内置工具来验证您的备份没有损坏。 如果您备份到本地USB,则该工具将不起作用,但是您可以通过其他方法窥探备份并确保一切正常。 即使您确实使用网络驱动器,这些工具也很有用,所以让我们继续前进。
网络备份:从菜单栏中进行验证 (Networked Backups: Verify From the Menu Bar)
Maybe you bought a Time Capsule for backing up. Maybe you use a drive connected to another Mac on your network. Or maybe you used our tutorial to back up to a Raspberry Pi using Time Machine.
也许您购买了Time Capsule进行备份。 也许您使用连接到网络上另一台Mac的驱动器。 或者,也许您已使用我们的教程使用Time Machine备份到Raspberry Pi 。
Whatever your setup, if you back up your Mac over the network, there’s a built-in option for verifying it. This is a relatively new feature, so it will only work with backups created by macOS 10.12 (Sierra) or Mac OS X 10.11 (El Capitan).
无论采用哪种设置,如果您通过网络备份Mac,都有一个内置选项可以对其进行验证。 这是一个相对较新的功能,因此仅适用于由macOS 10.12(Sierra)或Mac OS X 10.11(El Capitan)创建的备份。
First, add the Time Machine icon to the menu bar, if you haven’t already. Head to System Preferences > Time Machine, then check the option at the bottom of the window.
首先,将Time Machine图标添加到菜单栏(如果尚未添加)。 转到“系统偏好设置”>“ Time Machine”,然后检查窗口底部的选项。
Next, click the Time Machine icon in the menu bar.
接下来,单击菜单栏中的Time Machine图标。
Then, hold down the Option key, and a “Verify Backups” option will appear.
然后,按住Option键,将出现“验证备份”选项。
Click the “Verify Backups” option. (If your backup isn’t over the network, or was created by an older version of macOS, the option may be greyed out.) Your Mac will start verifying the backup.
单击“验证备份”选项。 (如果备份不是通过网络进行的,或者是由旧版本的macOS创建的,则该选项可能会显示为灰色。)您的Mac将开始验证备份。
Your Mac actually does this regularly, but there’s no harm in doing it manually from time to time, particularly if you think there might be a problem. If you want to watch the progress closely, feel free to open up the Time Machine panel in System Preferences again.
Mac实际上确实定期执行此操作,但是不时手动执行此操作没有任何危害,特别是如果您认为可能有问题的话。 如果要密切注意进度,请随时在“系统偏好设置”中再次打开“时间机器”面板。
You Mac is comparing your backup with the checksums it has on file. If there’s a problem, you will find out via a notification. If you never get any notification, you don’t have any problems to worry about.
您的Mac正在将您的备份与其已存档的校验和进行比较。 如果有问题,您将通过通知找到。 如果您从未收到任何通知,则无需担心任何问题。
非网络驱动器:运行少量命令 (Non-Networked Drives: Run a Few Commands)
If your Time Machine backup runs locally—for example, if you back up to an external hard drive over USB—you cannot use the menu bar method to verify your drives. But there are a few things you can do.
如果您的Time Machine备份在本地运行(例如,如果您通过USB备份到外部硬盘驱动器),则不能使用菜单栏方法来验证驱动器。 但是您可以做一些事情。
The simplest thing is to launch Time Machine and try to restore some files that you’ve deleted. Connect your backup drive, then launch Time Machine, which is in the Applications folder.
最简单的方法是启动Time Machine并尝试还原一些已删除的文件。 连接您的备份驱动器,然后启动“应用程序”文件夹中的“时间机器”。
Head back in time, and find some files you know you deleted. You can press the Spacebar to preview them, or even restore them. If the files you expect to be there are there, and it’s possible to preview them, your backup is most likely in working order.
时光倒流,找到一些您知道已删除的文件。 您可以按空格键预览它们,甚至可以还原它们。 如果您希望在那里存在文件,并且可以预览它们,则备份很有可能处于工作状态。
But if you’d like more details and assurance that things are working, open the Terminal, which you can find in Applications > Utilities. Type tmutil compare -s
, then hit Enter, and your Mac will compare the contents of your Mac with the contents of your backup. The process will take a while, and results will scroll by.
但是,如果您想了解更多细节并确保一切正常,请打开终端,您可以在“应用程序”>“实用程序”中找到该终端。 键入tmutil compare -s
,然后按Enter,您的Mac会将Mac的内容与备份的内容进行比较。 该过程将花费一些时间,结果将滚动显示。
The first character tells you about the file.
第一个字符告诉您有关文件的信息。
-
A
!
before a file means the given file has changed.A
!
在文件意味着给定文件已更改之前。 -
A
+
before a file means the given file is new.文件前的
+
表示给定文件是新文件。 -
A
-
before a file means the given file was deleted.-
文件前的-
表示已删除给定文件。
The process will take a while to run—it’s not unusual for the process to take 15 minutes, or even a half hour. When it’s done, you’ll see a summary of the difference between your computer and your backup drive.
该过程将需要一段时间才能运行-花费15分钟甚至半小时的时间并不罕见。 完成后,您将看到计算机与备份驱动器之间差异的摘要。
If you’re unsure even after all of this, you can verify and repair your hard drive using Disk Utility. Simply launch the application and click “First Aid” on your drive. Your disk will be scanned for any errors, and the tool will even attempt to fix them if necessary.
如果仍然不确定所有这些操作,则可以使用“磁盘工具”来验证并修复硬盘 。 只需启动应用程序,然后在驱动器上单击“急救”。 将会扫描您的磁盘上是否有任何错误,并且该工具甚至会在必要时尝试修复它们。
Between these three options, you should have a good idea of whether your backups are working or not.
在这三个选项之间,您应该对备份是否正常工作有所了解。