Answers:
尽管Time Machine必须在大多数情况下使用HFS Plus,但值得注意的是文件系统并不理想。
巧合:在我第一次获得此答案的几个小时后,我自己的Time Machine Backups卷(稀疏的捆绑磁盘映像)发生了文件系统故障。我确定基础存储是可以的–在HFS Plus发生故障之前和之后,对ZFS池进行了无错误的清理。作为记录:
2013-06-07 18:02:54.332 com.apple.backupd[18433] Starting automatic backup
2013-06-07 18:02:56.292 com.apple.backupd[18433] Resizing backup disk image from 2.65 TB to 2.6 TB
2013-06-07 18:03:34.119 com.apple.backupd[18433] Disk image /Volumes/tall/com.apple.backupd/GPES3E-gjp4-1.sparsebundle mounted at: /Volumes/Time Machine Backups
2013-06-07 18:03:35.244 com.apple.backupd[18433] Backing up to: /Volumes/Time Machine Backups/Backups.backupdb
2013-06-07 18:03:44.013 com.apple.backupd[18433] Inherited root volume OS, UUID: C5C41F95-133B-3EB0-9013-F94DAAA0D99B
2013-06-07 18:03:44.147 com.apple.backupd[18433] Forcing deep traversal on source: "OS" (mount: '/' fsUUID: 03AF4C8A-66E8-3DE2-B30F-176C0C2337C3 eventDBUUID: BDCB9532-A4A8-4B94-A6C1-928FD741B07A)
2013-06-07 18:03:44.148 com.apple.backupd[18433] Event store UUIDs don't match for volume: spare
2013-06-07 18:03:44.150 com.apple.backupd[18433] Event store UUIDs don't match for volume: disk0s3
2013-06-07 18:03:47.612 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-103948 does not contain spare. Skipping it.
2013-06-07 18:03:47.663 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215311 does not contain spare. Skipping it.
2013-06-07 18:03:47.714 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-075155 does not contain spare. Skipping it.
2013-06-07 18:03:47.764 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-055748 does not contain spare. Skipping it.
2013-06-07 18:03:47.827 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-220121 does not contain spare. Skipping it.
2013-06-07 18:03:47.888 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-081211 does not contain spare. Skipping it.
2013-06-07 18:03:47.966 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215312 does not contain spare. Skipping it.
2013-06-07 18:03:48.025 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-235752 does not contain spare. Skipping it.
2013-06-07 18:03:48.087 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-140311 does not contain spare. Skipping it.
2013-06-07 18:03:48.145 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215718 does not contain spare. Skipping it.
2013-06-07 18:03:48.202 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-005749 does not contain spare. Skipping it.
2013-06-07 18:03:48.261 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-235753 does not contain spare. Skipping it.
2013-06-07 18:03:48.321 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-160310 does not contain spare. Skipping it.
2013-06-07 18:03:48.558 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-074020 does not contain spare. Skipping it.
2013-06-07 18:03:48.619 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-025748 does not contain spare. Skipping it.
2013-06-07 18:03:48.709 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-015751 does not contain spare. Skipping it.
2013-06-07 18:03:48.904 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-025749 does not contain spare. Skipping it.
2013-06-07 18:03:48.954 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-015752 does not contain spare. Skipping it.
2013-06-07 18:03:49.004 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-130310 does not contain spare. Skipping it.
2013-06-07 18:03:49.055 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-045748 does not contain spare. Skipping it.
2013-06-07 18:03:49.162 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215950 does not contain spare. Skipping it.
2013-06-07 18:03:49.211 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-092036 does not contain spare. Skipping it.
2013-06-07 18:03:49.273 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-035751 does not contain spare. Skipping it.
2013-06-07 18:03:49.321 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-225752 does not contain spare. Skipping it.
2013-06-07 18:03:49.371 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-065747 does not contain spare. Skipping it.
2013-06-07 18:03:49.420 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-045749 does not contain spare. Skipping it.
2013-06-07 18:03:49.470 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-213710 does not contain spare. Skipping it.
2013-06-07 18:03:49.519 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-091305 does not contain spare. Skipping it.
2013-06-07 18:03:49.589 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-150310 does not contain spare. Skipping it.
2013-06-07 18:03:49.639 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-065748 does not contain spare. Skipping it.
2013-06-07 18:03:49.688 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-074521 does not contain spare. Skipping it.
2013-06-07 18:03:49.776 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-220105 does not contain spare. Skipping it.
2013-06-07 18:03:49.838 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-225749 does not contain spare. Skipping it.
2013-06-07 18:03:49.899 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-092118 does not contain spare. Skipping it.
2013-06-07 18:03:50.119 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-120311 does not contain spare. Skipping it.
2013-06-07 18:03:50.388 com.apple.backupd[18433] Mobile backup /Volumes/MobileBackups/Backups.backupdb/GPES3E-gjp4-1/2013-06-07-035749 does not contain spare. Skipping it.
2013-06-07 18:03:51.141 com.apple.backupd[18433] Deep event scan at path:/ reason:must scan subdirs|require scan|
2013-06-07 18:03:51.141 com.apple.backupd[18433] Finished scan
2013-06-07 18:16:29.077 com.apple.backupd[18433] Deep event scan at path:/Volumes/spare reason:must scan subdirs|new event db|
2013-06-07 18:16:29.086 com.apple.backupd[18433] Finished scan
2013-06-07 18:16:29.570 com.apple.backupd[18433] Deep event scan at path:/Volumes/disk0s3 reason:must scan subdirs|new event db|
2013-06-07 18:16:29.786 com.apple.backupd[18433] Finished scan
2013-06-07 18:16:30.310 com.apple.backupd[18433] Found 1695685 files (84.93 GB) needing backup
2013-06-07 18:16:31.053 com.apple.backupd[18433] 109.44 GB required (including padding), 2 TB available
2013-06-07 18:54:10.918 com.apple.backupd[18433] Unexpected result from MDBackupIndexFile (1) for: /Applications/Freenet/datastore/CHK-cache.hd, /Volumes/Time Machine Backups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215332.inProgress/9086512E-E386-475E-AE99-34BAA1D2E485/OS/Applications/Freenet/datastore/CHK-cache.hd
2013-06-07 18:54:24.848 com.apple.backupd[18433] Unexpected result from MDBackupIndexFile (1) for: /Applications/Freenet/datastore/CHK-store.hd, /Volumes/Time Machine Backups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215332.inProgress/9086512E-E386-475E-AE99-34BAA1D2E485/OS/Applications/Freenet/datastore/CHK-store.hd
2013-06-07 19:03:44.609 com.apple.backupd[18433] Copied 18.81 GB of 84.93 GB, 460244 of 1695685 items
2013-06-07 20:03:44.827 com.apple.backupd[18433] Copied 34.12 GB of 84.93 GB, 815234 of 1695685 items
2013-06-07 21:03:54.004 com.apple.backupd[18433] Copied 40.73 GB of 84.93 GB, 1013214 of 1695685 items
2013-06-07 22:03:54.678 com.apple.backupd[18433] Copied 67.55 GB of 84.93 GB, 1508426 of 1695685 items
2013-06-07 22:28:43.226 com.apple.backupd[18433] Copied 1786731 files (77.59 GB) from volume OS.
2013-06-07 22:28:49.157 com.apple.backupd[18433] Unexpected result from MDBackupIndexFile (1) for: /Volumes/spare/Tocar y Luchar JAA.cdr, /Volumes/Time Machine Backups/Backups.backupdb/GPES3E-gjp4-1/2013-06-06-215332.inProgress/9086512E-E386-475E-AE99-34BAA1D2E485/spare/Tocar y Luchar JAA.cdr
2013-06-07 22:28:51.508 com.apple.backupd[18433] Error: Flushing index to disk returned an error: 1
2013-06-07 22:28:51.508 com.apple.backupd[18433] Copied 1786746 files (77.59 GB) from volume spare.
2013-06-07 22:29:11.108 com.apple.backupd[18433] Backup canceled.
2013-06-07 22:29:23.227 com.apple.backupd[18433] Ejected Time Machine disk image: /Volumes/tall/com.apple.backupd/GPES3E-gjp4-1.sparsebundle
2013-06-07 23:10:44.791 com.apple.backupd[28884] Starting automatic backup
2013-06-07 23:10:45.269 com.apple.backupd[28884] Backup failed with error: 1002
2013-06-07 23:10:45.382 com.apple.backupd[28884] Starting automatic backup
2013-06-07 23:10:46.446 com.apple.backupd[28884] Resizing backup disk image from 2.6 TB to 2.6 TB
2013-06-07 23:10:50.162 com.apple.backupd[28884] Runtime corruption detected on /Volumes/tall/com.apple.backupd/GPES3E-gjp4-1.sparsebundle (fsck_hfs -q termination status: 3)
2013-06-07 22:28:49的消息引人注目,但在我的情况下是预期的(涉及HFS Plus的错误的症状;涉及AppleFSCompression的损坏的症状)–在此答案的上下文中可能可以忽略不计
该消息在2013-06-07 22:28:51可能与文件系统故障更相关。
/private/var/log/fsck_hfs.log
然后显示:
/dev/rdisk7s2: fsck_hfs run at Fri Jun 7 23:10:48 2013
/dev/rdisk7s2: ** /dev/rdisk7s2 (NO WRITE)
/dev/rdisk7s2: Executing fsck_hfs (version diskdev_cmds-557.3.1~5).
QUICKCHECK ONLY; FILESYSTEM DIRTY
/dev/rdisk7s2: fsck_hfs run at Fri Jun 7 23:10:49 2013
/dev/rdisk7s2: ** /dev/rdisk7s2 (NO WRITE)
/dev/rdisk7s2: Executing fsck_hfs (version diskdev_cmds-557.3.1~5).
QUICKCHECK ONLY; FILESYSTEM DIRTY
确认当时没有错误影响基础存储:
GPES3E-gjp4-1:~ gjp22$ date
Sat 8 Jun 2013 06:57:46 BST
GPES3E-gjp4-1:~ gjp22$ uptime
6:57 up 21:51, 5 users, load averages: 0.92 1.27 1.37
GPES3E-gjp4-1:~ gjp22$ zpool status
pool: gjp22
state: ONLINE
scan: scrub repaired 0 in 24h8m with 0 errors on Sat May 25 23:25:38 2013
config:
NAME STATE READ WRITE CKSUM
gjp22 ONLINE 0 0 0
GPTE_71B8BDA2-3EBA-4B91-9E1C-2AE2B1DAAD06 ONLINE 0 0 0 at disk3s2
cache
GPTE_2605CCB0-67B7-4C93-A4B1-83EF764CE617 OFFLINE 1.48Ki 0
errors: No known data errors
pool: tall
state: ONLINE
scan: scrub repaired 0 in 28h10m with 0 errors on Sun May 26 18:47:22 2013
config:
NAME STATE READ WRITE CKSUM
tall ONLINE 0 0 0
GPTE_78301A52-4AFF-4D96-8DE9-E76ABC14909C ONLINE 0 0 0 at disk2s2
GPTE_99056308-F5E2-4314-852C-4DA04732A2D0 ONLINE 0 0 0 at disk6s2
errors: No known data errors
GPES3E-gjp4-1:~ gjp22$
尽管我们需要一个解决方案,但类似的文件系统故障似乎是:
如果没有好的解决方案,我最好的建议是不要依赖单个Time Machine备份。最终故障和无法修复的风险太高了。
在过去,我有时会强迫fsck_hfs
(8)重建b树文件…成功有限但不确定。尽管文件系统可能看起来不错(在“磁盘工具”等中),但我不再相信它可以用于Time Machine备份或还原。
在最近的一种情况(以上)中,多次施加力(对目录b树的多次重建,对扩展属性b树的重建以及对范围b树的重建)并未导致可验证的文件系统。我从这些尝试中获得了调试日志,这里不再赘述;他们很大。
使用本地连接的磁盘(USB 2.0),尝试修复Time Machine备份卷可能会非常耗时。无线–通过AFP –您可能会发现无法忍受的时间。
时光机器-故障排除– C13。“…Time Machine必须为您创建一个新的备份。” (詹姆斯·庞德)包括许多有用的信息。实质上:
…备份已损坏,超出了磁盘实用程序的修复能力……
当OS X报告HFS Plus 文件系统似乎正常时,磁盘可能存在重大问题-OS X根本无法检测到该问题。
由于腐败发生了不止一次,因此可能存在以下问题:
NAS的品牌和型号是什么?
如果NAS的操作系统允许您验证其磁盘上块的完整性,请执行以下操作:
如果NAS的操作系统缺乏该功能,则可以尝试使用更适合测试的其他操作系统来引导硬件。选项可能包括Ubuntu和一系列badblocks。
此类型的检查:
为了增加@GrahamPerrin的警告,我想分享我的计划。
在进行设置之前,意识到“ Time Machine必须创建新的备份”问题,所以我将NAS上的TimeMachine主机卷设为单独的ZFS卷,仅用于此目的。然后,我指定了每日卷快照。如果卷的内容ZPool1/Backups/TimeMachine
由于网络问题或另一个卷内的HFS +虚拟磁盘普遍不可靠而损坏,我可以将其回滚到NAS。我有时将其称为元备份。
要清楚一点
ZPool1/Backups/TimeMachine
"John's MacBook Pro.sparsebundle"
,该目录本身具有一个bands
子目录,该子目录包含完全配置的虚拟驱动器存储,为951个文件,其名称类似于e8
(十六进制数字从0开始计数)。ZPool1/Backups/TimeMachine
为“用于Time Machine”标志设置为AFP共享。TimeMachine希望包含它随后使用的虚拟磁盘,或者创建它是否是该网络位置的第一个使用来进行备份的虚拟磁盘。因此,ZFS卷快照功能之所以起作用,是因为它是一个ZFS卷,其中包含一堆128MB带有乏味名称的数据文件。Time Machine之所以能够工作,是因为它将虚拟磁盘格式化为HFS +放在了所显示的任何文件系统上。
当我第一次配置Time Machine以使用NAS时,我遇到了同样的问题-每隔几周,我会在该线程的顶部弹出窗口。非常令人沮丧。但是随着时间的推移,我注意到这仅发生在一周的特定几天。然后,我意识到它仅在每周清理(星期一早上)或重新同步(星期二早上)操作期间发生。因此,我获得了“ Time Machine Editor”的一个副本,该副本可让您告诉Time Machine何时可以运行以及何时不能运行,星期一和星期二上午不包括在内,瞧,问题解决了。
我想知道您是否正在达到目标目录的最大文件数?在像ext2这样的经典Unix文件系统中,每个目录限制有32,000(2 ^ 15)个文件(或子目录或链接(事物))。Time Machine备份是一个稀疏的磁盘映像,它是一堆8MB的文件。300GB的8MB文件大约为37,000。哎呀
您可以增加Time Machine在稀疏捆绑中使用的文件的大小(这些说明会将备份的最大大小增加16),或更改NAS,Reiserfs,ext4(某些ext3版本)上的文件系统,等,如果这是问题,可能会起作用。
用户KingKongFrog添加了此答案,我正在将其添加到我的答案中(但也请对其进行投票),这使您可以将现有备份转换为较大的备份
hdiutil convert MyMac_001acb9cb23d.sparsebundle -format UDSB -tgtimagekey sparse-band-size=2097152 -o NEW_MyMac_001acb9cb23d.sparsebundle
# creates a sparsebundle disk image with a 128MB band size
MACHINE_NAME=your-machine-name
echo $MACHINE_NAME
hdiutil create -size 900g -type SPARSEBUNDLE -nospotlight -volname "Backup of $MACHINE_NAME" -fs "Case-sensitive Journaled HFS+" -imagekey sparse-band-size=262144 -verbose ./$MACHINE_NAME.sparsebundle
# copy the plists from TIME_MACHINE_IMAGE to NEW_IMAGE
TIME_MACHINE_IMAGE=your-machine-name.old.sparsebundle
NEW_IMAGE=your-machine-name.sparsebundle
cp $TIME_MACHINE_IMAGE/com.apple.TimeMachine.*.plist $NEW_IMAGE
我在以下位置找到了最简洁的说明(该说明有效并恢复了我的TM备份稀疏性)
http://jd-powered.net/notes/fixing-your-time-machine-backup
和
http://tonylawrence.com/post/unix/fixing-corrupted-time-machine-backups/ 似乎是原始文章(2012年)
答案是分享我的经验并邀请您提供反馈。
我遇到了损坏的备份错误,因此我尝试了Ronald Pottol给出的解决方案,但没有成功。hdiutil: create failed - ...
在我的NAS(运行Debian Wheezy和ext4分区的家用NAS)上创建Sparsbundle时,我总是遇到错误。
因此,经过一番谷歌搜索后,我尝试了此操作(从此处开始):
获取计算机的标识符:
$ ifconfig en0 | grep ether | sed s/://g | sed s/ether//
b88d120afd6c
使用该标识符使用Ronald Pottol中的参数创建一个稀疏包(在您的主目录中)(ComputerName将替换为实际的计算机名称)
sudo hdiutil create -size 190g -type SPARSEBUNDLE -nospotlight -volname "Backup of ComputerName" -fs "Case-sensitive Journaled HFS+" -imagekey sparse-band-size=262144 -verbose ~/ComputerName_b88d120afd6c
“ Backup of ComputerName”应替换为与您的语言设置匹配的字符串。法语:“副本sauvegarde时光机”
添加-encryption AES-128 -stdinpass
(例如,之后-verbose
)以启用备份加密。系统将提示您输入加密密码。您也可以使用AES-256
代替AES-128
。
挂载将包含Time Machine备份的NAS驱动器。
使用Finder将创建的Sparsbundle从主目录复制到该驱动器。
配置Time Machine以使用NAS驱动器。如果启用了加密,请选择使用相同的备份文件并确认您之前设置的密码。
运行第一次备份。
在控制台实用程序中,应写入一条消息,指示已将sparsebundle重命名。因此,它具有正确的sparse-band-size参数,应避免将来出现错误:
18/07/2014 06:50:25,712 com.apple.backupd[3573]: Renaming /Volumes/tmNasDrive-1/ComputerName_b88d120afd5c.sparsebundle to /Volumes/tmNasDrive-1/ComputerName.sparsebundle
自启动此新备份以来,我没有任何错误,但这并不意味着该解决方案确实可靠。我希望这将有所帮助。欢迎任何反馈。