Score:0

Can I prevent rsync from setting attributes on the topmost directory?

kr flag

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/ [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]
SYN avatar
hk flag
SYN
see https://stackoverflow.com/a/20027168/5607207
SYN avatar
hk flag
SYN
or that one as well: https://unix.stackexchange.com/questions/295619/rsync-no-need-to-copy-the-time-stamp
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.