By default rsync creates a copy of the file at the destination and then atomically replaces the original with the new copy. This is done for safety reasons. What you’re looking for is the --inplace option, which will cause rsync to modify only the portions of the destination file which have changed relative to the source.
For the O.P’s use-case, I recommend turning off pre-allocation as well, so that a sparse copy can be synced, which will be much faster. For downloads, don’t worry about fragmentation unless you’re using a very ancient filesystem like VFAT. Media files in particular are not read at the maximum performance of the storage media, so defragmenting them is a wasted effort.
To copy your downloads directory sparsely to the destination volume, I recommend these flag…
By default rsync creates a copy of the file at the destination and then atomically replaces the original with the new copy. This is done for safety reasons. What you’re looking for is the --inplace option, which will cause rsync to modify only the portions of the destination file which have changed relative to the source.
For the O.P’s use-case, I recommend turning off pre-allocation as well, so that a sparse copy can be synced, which will be much faster. For downloads, don’t worry about fragmentation unless you’re using a very ancient filesystem like VFAT. Media files in particular are not read at the maximum performance of the storage media, so defragmenting them is a wasted effort.
To copy your downloads directory sparsely to the destination volume, I recommend these flags and operations, in this order:
rsync --ignore-existing -vxaHAXS /source /destination
rsync --inplace -vxaHAX /source /destination
The first pass will copy new files sparsely to the destination The second pass will update existing files in-place, copying only the changes
Since it’s doing sparse and in-place delta copies, you can run this repeatedly without incurring much extra IO. Even if you have 20 torrents running simultaneously it’s won’t amplify the writes at the destination, or thrash the source/dest volumes.