티스토리 뷰

OS

Rsync: How to ignore 'file has vanished'

빼인트 2023. 2. 13. 16:40
  • When performing an Rsync, you may encounter the error "file has vanished".
  • It means that the file disappeared during the transfer.
  • You can ignore it, but it keeps showing up as an error.
  • This section explains how to ignore it.

There are two ways to do this.

Version Upgrade ( > 3.2.4)

  • https://download.samba.org/pub/rsync/NEWS#3.2.4
  • Transformed the atomic-rsync script into a python script and added the ability to ignore one or more non-zero exit codes. By default, it now ignores code 24, the file-vanished exit code. (See the support dir.)

Rsync Rwrapper

ignore "vanished files" warning
Some folks would like to ignore the "vanished files" warning, which manifests as an exit-code 24. The easiest way to do this is to create a shell script wrapper. For instance, name this something like "rsync-no24":

 

#!/bin/sh
/usr/bin/rsync "$@"
e=$?
if test $e = 24; then
    exit 0
fi
exit $e
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함