rsync同出IO error encountered-skipping file deletion解決方法
3334 ワード
以前は同期が発生していました:
そこで同期スクリプトにrとforceパラメータを加えました.
同期にIOerror encountered-skipping file deletionが表示されるのを見た
同時に別のエラーが発生しました.
rsyncのパラメータをよく見てみると、次のオプションがあります.
--ignore-errors I/Oエラーが発生しても削除
(I/Oエラーが発生しても削除)
はい、今のところ間違いはありません.
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [generator=3.1.2]
そこで同期スクリプトにrとforceパラメータを加えました.
# cat mirrors.sh
#!/bin/bash
### rsync
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
echo `date +%F_%H%M%S` >> /tmp/rsync_process.log
echo '################### ######################' >> /tmp/rsync_process.log
#http://mirrors.ustc.edu.cn/help/rsync-guide.html
URL="rsync://mirrors.tuna.tsinghua.edu.cn"
#URL="rsync://rsync.mirrors.ustc.edu.cn/repo"
rsync -ravzPH --delete --force $URL/centos/ /data/centos/ >> /tmp/rsync_centos.log
rsync -ravzPH --delete --force $URL/epel/ /data/epel >> /tmp/rsync_epel.log
#rsync -avzPH --delete $URL/ceph/ /data/ceph >> /tmp/rsync_ceph.log
echo `date +%F_%H%M%S` >> /tmp/rsync_process.log
echo '################### ######################' >> /tmp/rsync_process.log
同期にIOerror encountered-skipping file deletionが表示されるのを見た
[root@mirrors tmp]# tail -f rsync_centos.log
| Service Provided by |
| neomirrors |
| |
+==================================================+
Note: This service is provided with a modified
version of rsync. For detailed information, please
visit: https://github.com/tuna/rsync
receiving incremental file list
IO error encountered -- skipping file deletion
同時に別のエラーが発生しました.
rsync: readlink_stat("7.7.1908/isos/x86_64/.CentOS-7-x86_64-Everything-1908.iso.RjFDl5" (in centos)) failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [generator=3.1.2]
rsyncのパラメータをよく見てみると、次のオプションがあります.
--ignore-errors I/Oエラーが発生しても削除
(I/Oエラーが発生しても削除)
[root@mirrors bin]# cat mirrors.sh
#!/bin/bash
### rsync
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
echo `date +%F_%H%M%S` >> /tmp/rsync_process.log
echo '################### ######################' >> /tmp/rsync_process.log
#http://mirrors.ustc.edu.cn/help/rsync-guide.html
URL="rsync://mirrors.tuna.tsinghua.edu.cn"
#URL="rsync://rsync.mirrors.ustc.edu.cn/repo"
rsync -ravzPH --delete --force --ignore-errors $URL/centos/ /data/centos/ >> /tmp/rsync_centos.log
rsync -ravzPH --delete --force --ignore-errors $URL/epel/ /data/epel >> /tmp/rsync_epel.log
#rsync -avzPH --delete $URL/ceph/ /data/ceph >> /tmp/rsync_ceph.log
echo `date +%F_%H%M%S` >> /tmp/rsync_process.log
echo '################### ######################' >> /tmp/rsync_process.log
はい、今のところ間違いはありません.