On 12Nov2020 18:55, ToddAndMargo <ToddAndMargo(a)zoho.com> wrote:
On 2020-11-12 18:07, Samuel Sieb wrote:
>On 11/12/20 5:45 PM, ToddAndMargo via users wrote:
>>I am trying to use rsync to
>>1) copy new files on the source to the destination
I like -a for this.
>>2) remove all files on the destination that do not
>> reside on the source
--delete
>>Problem: the extra files on the destination are
>>not being removed.
>>
>>Options="--recursive --verbose --delete --delete-excluded
>>--modify-window=5 --times --inplace --copy-links "
Looks ok. Why --inplace? rsync has a nice make-temp-file-then-rename
default behaviour which means the target file is the old file or the new
file and never some partial chimera of the two.
[...]
# UpdateMyCDs
Resetting permissions
Resetting ownerships
rsync --recursive --verbose --delete --delete-excluded
--modify-window=5 --times --inplace --copy-links --exclude='wine-*'
/home/CDs/Linux /mnt/MyCDs/.
_Is_ there something odd mounted are /mnt/MyCDs or below? As opposed to
plain old Linux filesystems?
sending incremental file list
symlink has no referent:
"/home/CDs/Linux/KVM/virtio-win/RPM/virtio-win_servers_x86.vfd"
IO error encountered -- skipping file deletion
What if you leave our --copy-links? I suspect a symlink pointing at
something which doesn't exist.
From the manual:
‐‐copy‐links, ‐L transform symlink into referent file/dir
I imagine this involves repointing an absolute symlink to an absolute
but adjusted symlink at the far end. Maybe what it refers to would not
exist, causing trouble for the adjustment. I've never tried this option.
Leave it out and see if it is the source of the problem.
Does "IO error encountered -- skipping file deletion" just
skip the file or does it terminate the command completely?
It omited the --delete phase because there was other trouble.
Cheers,
Cameron Simpson <cs(a)cskk.id.au>