Is there a way to tell rsync to skip its current file while a sync is in progress, maybe by sending it a particular signal?
I already know about ignoring based on patterns, but this would be handy to me sometimes.
Is there a way to tell rsync to skip its current file while a sync is in progress, maybe by sending it a particular signal?
I already know about ignoring based on patterns, but this would be handy to me sometimes.
I'm not familiar with such functionality, and the manual page for the current version doesn't make mention either. Short of browsing thru the source looking for "hidden features" that aren't mentioned in the manual page I think it's safe to assume that there's not any such functionality.
I agree, though, that it sounds like it could be a handy feature.
Sadly, the answer is "no", but there is a Bug Report in the rsync Bugzilla requesting this enhancement. Maybe someday...
I always kill rsync (control-c) and re-run with an --exclude option and possibly --delete. Since rsync leaves the destination directory partially updated, the second run should be faster because you can essentially start where you left off.
You might also look at the partial-dir option for large files.
The rsync feature request mentioned by @dean-serenevy has a workaround:
cp --reflink=always --preserve largefile largefile.backup
echo > largefile
mv largefile.backup largefile
if the inode number does not matter,cat largfile.backup > largefile
if the inode number must stay the same (at the cost of requiring twice the space temporarily). Also consider ownership, permissions, extended attributes, sparseness and special filesystem features such as compression and de-duplication.