我想要使用 Samba“共享”进行 MacOSTime Machine
备份,也进行文件共享(使用 finder 复制文件)。
这可能吗?如果可以,我该如何解决这个问题?
我可以使用该Time Machine
软件备份 MacOS,但是,当我将文件复制到同一个“Time Machine”“共享”时,它会失败并出现错误:
由于发生意外错误(错误代码 100093),该操作无法完成。
当我复制文件时,会创建一个空文件(零字节),并显示错误。我可以创建文件夹,但无法使用 Finder 复制文件。
这是我的 Samba 配置:
[homes]
comment = Home Directories
browsable = no
writable = yes
create mask = 0600
directory mask = 0700
[timemachine]
# https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html
comment = Time Capsule
path = /media/timemachine
browseable = yes
writeable = yes
create mask = 0600
directory mask = 0700
read only = no
guest ok = no
valid users = <user_name> # change this to your user account
write list = <user_name> # change this to your user account
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:time machine = yes
var/log/messages
有此条目:
Jan 8 19:21:05 pi daemon.err smbd[13131]: [2025/01/08 19:21:05.611930, 0] ../../source3/modules/vfs_fruit.c:2684(fruit_pwrite_meta_stream)
Jan 8 19:21:05 pi daemon.err smbd[13131]: fruit_pwrite_meta_stream: On-demand create [iDeaVim.txt:AFP_AfpInfo] in write failed: No such file or directory
[timemachine]
条目的文件系统详细信息
/dev/sda1 on /media/timemachine type exfat (rw,relatime,uid=1000,gid=1000,fmask=0002,dmask=0002,allow_utime=0020,iocharset=utf8,errors=remount-ro)
uid
1000,1000gid
是我的用户 ID。
配置如下global
:
[global]
create mask = 0664
directory mask = 0775
veto files = /.DS_Store/lost+found/
delete veto files = true
nt acl support = no
inherit acls = yes
ea support = yes
security = user
passdb backend = tdbsam
map to guest = Bad User
vfs objects = catia fruit streams_xattr recycle
acl_xattr:ignore system acls = yes
recycle:repository = .recycle
recycle:keeptree = yes
recycle:versions = yes
fruit:aapl = yes
fruit:metadata = stream
fruit:model = MacSamba
fruit:veto_appledouble = yes
fruit:posix_rename = yes
fruit:zero_file_id = yes
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
server max protocol = SMB3
server min protocol = SMB3
workgroup = WORKGROUP
server string = NAS
server role = standalone server
dns proxy = no
我用来改变文件系统的命令,之后一切都正常了。
1: rc-service samba stop
2: mkfs.ext4 /dev/sda1
3: vim /etc/fstab
/dev/sda1 /media/timemachine ext4 rw,defaults 0 0
4: mount -a
5: cd /media && chown -R <user_name>:<group> ./timemachine
6: rc-service samba start