On 03/04/2022 16:29, Frank Steinmetzger wrote:
Am Sun, Apr 03, 2022 at 09:59:22AM +0100 schrieb Wols Lists:
On 03/04/2022 02:15, Bill Kenworthy wrote:
Rsync has a bwlimit argument which helps here. Note that rsync copies
the whole file on what it considers local storage (which can be mounted
network shares) ... this can cause a real slowdown.
It won't help on the initial copy, but look at the - I think it is -
--in-place option.
This one is mostly useful if space on the destination is tight or the data
link (for FS commands) is slooow, because normally rsync creates a new temp
file and moves it into place once the transfer is complete. This to ensure
you never lose data due to a broken connection. If space is tight you could
also consider --delete-before instead, to first do all deletions before
copying the new stuff.
And making a temporary file may be exactly what you DON'T want. I make
heavy use of hard links, and "make a temp file" absolutely buggers file
system integrity ...
And my use case with LVM and backups, "make a temp file" does both
absolutely nothing to protect file system integrity, and makes every
backup waste far more space than is necessary ...
So --in-place actually has a lot of uses outside your two examples. I
have oodles of space, and both my source and target are on fast sata
links in the same computer, but not using --in-place would be *very*
costly for me.
Cheers,
Wol