我已经按照以下说明设置了 Samba 共享,用于 Time machine 备份本指南。
我的 Mac 正确识别共享,但初始备份失败,并显示无法在我的共享上创建备份的通用错误消息。
运行log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info
后出现如下日志:
MacBook-Air-2:~ xxx$ log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info
Filtering the log data using "senderImagePath CONTAINS[cd] "TimeMachine""
Timestamp (process)[PID]
2018-12-04 22:26:10.213195+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogInfo] Starting manual backup
2018-12-04 22:26:10.338732+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogInfo] Attempting to mount 'smb://pi@raspberrypi._smb._tcp.local./Time%20Machine%20Backups'
2018-12-04 22:26:10.897172+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogInfo] Mounted 'smb://pi@raspberrypi._smb._tcp.local./Time%20Machine%20Backups' at '/Volumes/com.apple.TimeMachine.Time Machine Backups-74F8F302-361C-4490-9E35-1F2598F9D16E'
2018-12-04 22:26:11.816536+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogInfo] Failed to find matching sparsebundle in directory '/Volumes/com.apple.TimeMachine.Time Machine Backups-74F8F302-361C-4490-9E35-1F2598F9D16E', directory contents: (
)
2018-12-04 22:26:11.845958+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogInfo] Creating a sparsebundle using Case-sensitive Journaled HFS+ filesystem
2018-12-04 22:26:13.544412+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogError] Failed to create '/Volumes/com.apple.TimeMachine.Time Machine Backups-74F8F302-361C-4490-9E35-1F2598F9D16E/A76BCEEB-A3BD-5D63-82F4-8AEBB2F5ACBA.sparsebundle', results: {
}, error: 512 Fehler 512
2018-12-04 22:26:13.548494+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogError] Backup failed with error 20: 20
2018-12-04 22:26:13.621842+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogInfo] Unmounted '/Volumes/com.apple.TimeMachine.Time Machine Backups-74F8F302-361C-4490-9E35-1F2598F9D16E'
2018-12-04 22:26:13.622367+0100 localhost backupd[34893]: (TimeMachine) [com.apple.TimeMachine:TMLogError] Failed to remove directory '(null)', error: 14 Bad address
奇怪的是:与日志相反,一个名为 的稀疏束74F8F302-361C-4490-9E35-1F2598F9D16E/A76BCEEB-A3BD-5D63-82F4-8AEBB2F5ACBA.sparsebundle
实际上在我的共享中创建。因此写入权限肯定不是问题。
macOS 10.14.1 Samba 4.8.0
答案1
事实证明,我尝试的配置不适用于 HFS+ 格式的驱动器。使用 ext4 重新格式化驱动器可消除错误,因此备份实际上可以开始。