rsync in sequential mode

Latest response

Hi, I have a challenge. Trying to rsync a file from normal filesystem to a filesystem known as tamper-proof (net-app). The way that works is that is makes a file only appendable, so one can't change the content of the file, only append to the file.

So my problem is, that when using rsync with append mode option, the file ends up being different from the source. So it looks like append isn't writing in a sequential mode. As during rsync I'm getting back "read-only system"

rsync: ftruncate failed on "/TMPPROF/messages/2019/10/28/test02": Read-only file system (30)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]

The command I use is :

/bin/rsync --inplace --append --progress /metrocluster/2019/11/10/messages /TMPPROF/2019/11/10/test02

[root@test01 11]# cat  /metrocluster/2019/11/10/messages | wc -l
4346

[root@test01 10]# cat  /TMPPROF/2019/11/10/test02 | wc -l
3422

Also diff shows that there is difference in the file.
So is there a switch, that I've overseen, that can be used, so rsync writes the lines being differnt, in a sequiential mode, or is rsync written in a way, so that isn't possible ?

FYI:
Please note I've tried other different methodes, as diff, patch. But patch doesn't have an inplace option. Also diff to a file, remove the special char. that diff writes, using sed, and the write the lines to the target file. But diff shows difference, even though the file content is the same, and that I can have.

Responses