gpt4 book ai didi

macos - rsync 备份到外部硬盘 exFat 失败

转载 作者:行者123 更新时间:2023-12-01 08:53:54 52 4
gpt4 key购买 nike

我试图将数据从我的 macbook 备份到外部硬盘驱动器 - 格式化为 exFat (因为 Windows 和 Linux/Mac 兼容)。

使用 Automator,我将创建一个小程序,以轻松备份我的数据。它在本地驱动器和从本地驱动器到 SD 卡上都可以正常工作。但它不能从本地驱动器到外部硬盘驱动器。怎么了?

SOURCE=/Users/username/Pictures/test
TARGET=/Volumes/Backup/
LOG=~/Documents/AutomatorLogs/BackupSync.log

rsync -aze "ssh" --delete --exclude=".*" "$SOURCE" "$TARGET" > "$LOG"

我收到此错误:

rsync: recv_generator: mkdir "/Volumes/Backup/test" failed: Permission denied (13)

最佳答案

我知道这是旧的,但我刚刚遇到了这个,我想确保包含这些信息。我知道 OP 有点不同,但我使用的是 macbook 并遇到了我描述的错误,所以我不知道即使更改磁盘名称它也能工作。
当目标是 exfat 驱动器时,rsync 不能使用 -a。它将使目录看起来正在备份,但实际上没有创建任何文件。您需要使用:

rsync -rltDv [SRC] [DESTINATION]

where:
-v, --verbose increase verbosity
-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
--devices preserve device files (super-user only)
--specials preserve special files
-D same as --devices --specials
-t, --times preserve times
原因是 rsync 不处理 exfat 的权限。您将看到 rsync 错误(在 syslog 中或如果您使用 control-c 输出):
chgrp [file] failed: Function not implemented (38)

关于macos - rsync 备份到外部硬盘 exFat 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32682694/

52 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com