0

I'm currently building a solution to rsync Gerrit data into a Kubernetes container which has storage (a persistent volume) mounted at /var/gerrit/logs/. I am trying to use the rsync command below, but it fails as it can not edit the attributes of the topmost directory (./ below). Writing files under this path is permitted though. Is it possible to tell rsync to not set attributes of any sort on this particular directory? I need a solution that works without shell globbing as I'm running it in Python with shell=False.

$ rsync --verbose --archive --delete --human-readable --rsh 'ssh -i /home/ubuntu/.ssh/id_rsa' /var/lib/docker/volumes/my-gerrit-logs/_data/ receiver@10.20.30.40:/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]

0 Answers0