macOS Mojave 使用SMB局域网共享作为TimeMachine时间机器的备份盘报错Disk does not support Time Machine backups. (error 45)

参考网上的教程,使用“磁盘工具”创建一个“稀疏磁盘映像”在共享的文件夹中,然后使用命令设置为TimeMachine的目标盘。

sudo tmutil setdestination -a /Volumes/SMBTimeMachine

但是报错:

/Volumes/SMBTimeMachine: Disk does not support Time Machine backups. (error 45)
The backup destination could not be added.

Google很久,没有找到解决办法,最终在Apple帮助中的找到一个解决方案分享的方法,终于顺利解决:

1、使用命令行工具创建一个“稀疏捆绑磁盘映像”,不能是“磁盘工具”,我试过用“磁盘工具”依然不行,用命令行就没有问题。

sudo hdiutil create -size 260g -type SPARSEBUNDLE -nospotlight -volname "SMBTimeMachine" -fs "Case-sensitive Journaled HFS+" -verbose /Volumes/yanghl/HaiLong_Mac_TimeMachine.sparsebundle

“SMBTimeMachine”是新建的磁盘映像的标签,最后面跟的是磁盘映像文件保存的路径,“-size 260g”是磁盘映像的大小,这些参数可以修改。
命令运行输出参考:

正在初始化…
正在创建…
DIDiskImageCreatorProbe: interface  1, score     1000, CSparseBundleDiskImage
DIDiskImageCreatorProbe: interface  2, score    -1000, CSparseDiskImage
DIDiskImageCreatorProbe: interface  3, score    -1000, CRawDiskImage
DIDiskImageCreatorProbe: interface  7, score    -1000, CWOUDIFDiskImage
DIDiskImageCreatorProbe: interface  9, score    -1000, CCFPlugInDiskImage
DIDiskImageCreateWithCFURL: CSparseBundleDiskImage
CBSDBackingStore::createProbe directory, not a valid image file.
DIBackingStoreCreatorProbe: interface  0, score    -1000, CBSDBackingStore
DIBackingStoreCreatorProbe: interface  1, score     1000, CBundleBackingStore
DIBackingStoreCreatorProbe: interface  2, score        0, CRAMBackingStore
DIBackingStoreCreatorProbe: interface  3, score      100, CCarbonBackingStore
DIBackingStoreCreatorProbe: interface  5, score     -100, CCURLBackingStore
DIBackingStoreCreateWithCFURL: CBundleBackingStore
DIFileEncodingCreatorProbe: interface  2, score    -1000, CEncryptedEncoding
DIBackingStoreCreatorProbe: interface  0, score      100, CBSDBackingStore
DIBackingStoreCreatorProbe: interface  1, score    -1000, CBundleBackingStore
DIBackingStoreCreatorProbe: interface  2, score        0, CRAMBackingStore
DIBackingStoreCreatorProbe: interface  3, score      100, CCarbonBackingStore
DIBackingStoreCreatorProbe: interface  5, score     -100, CCURLBackingStore
DIBackingStoreCreateWithCFURL: CBSDBackingStore
DIBackingStoreCreateWithCFURL: creator returned 0
DIBackingStoreCreateWithCFURL: creator returned 0
DIDiskImageCreateWithCFURL: creator returned 0
DI_kextWaitQuiet: about to call IOServiceWaitQuiet...
DI_kextWaitQuiet: IOServiceWaitQuiet took 0.000007 seconds
正在格式化…
即将完成…
created: /Volumes/yanghl/HaiLong_Mac_TimeMachine.sparsebundle
hdiutil: create: returning 0

2、完成后,在Finder中找到磁盘映像文件,双击加载。然后再使用命令:

sudo tmutil setdestination -a /Volumes/SMBTimeMachine/

3、命令成功执行,没有任何输出。进入“系统设置”->“时间机器”,可以看到“ SMBTimeMachine”已被设置为目标磁盘。

这下就可以正常进行TimeMachine的后续操作了。

注意:目前发现这种方法必须一次备份完,如果备份中途中断,sparsebundle磁盘映像一旦卸载,就不能再加载了,因为没有备份完成,该文件就不完整,就无法再次加载

该文章同时发布在我的简书:https://www.jianshu.com/p/9f56587af82c

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值