[root@~]# more /opt/rsync/rsync-26To35optwwwdataExclude.sh

#!/bin/bash

SRC=/opt/www/data/

DES=data

WEB2=192.168.1.35

USER=root

/usr/local/bin/inotifywait --fromfile '/etc/exclude/excludedata.list'  -mrq -e create,move,modify $SRC | while read D E F

do

rsync --no-iconv -ahqzt --exclude-from=/etc/exclude/excludedata1.list --password-file=/etc/rsync.passwd1 --progress $SRC $USER@$WEB2::$DES

done

[root@~]# more /etc/exclude/excludedata.list

@/opt/www/data/magazine/

@/opt/www/data/newspaper/

[root@~]# more /etc/exclude/excludedata1.list

magazine

newspaper

相关文章:

  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-06
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案