我目前正在构建一个解决方案,将 Gerrit 数据 rsync 到 Kubernetes 容器中,该容器的存储(持久卷)安装在/var/gerrit/logs/
。我尝试使用下面的 rsync 命令,但它失败了,因为它无法编辑最顶层目录(./
下面)的属性。但是允许在此路径下写入文件。是否可以告诉 rsync 不要在此特定目录上设置任何类型的属性?我需要一个无需 shell 通配符即可工作的解决方案,因为我在 Python 中以 shell=False 运行它。
$ rsync --verbose --archive --delete --human-readable --rsh 'ssh -i /home/ubuntu/.ssh/id_rsa' /var/lib/docker/volumes/my-gerrit-logs/_data/ [email protected]:/var/gerrit/logs/
sending incremental file list
rsync: [generator] failed to set times on "/var/gerrit/logs/.": Operation not permitted (1)
./
error_log
httpd_log
sent 85.90K bytes received 12.69K bytes 65.72K bytes/sec
total size is 106.13M speedup is 1,076.50
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]