File "rsync.sh"

Full path: /www/wwwroot/fabriciovc.eti.br/downloads/scripts/snmp/rsync.sh
File size: 737 B
MIME-type: text/x-shellscript
Charset: utf-8

Download   Open   Back

#!/bin/bash

MKDIR=$(which mkdir)
RSYNC=$(which rsync)
RSYNC_OPT="--delete -av --stats"

DADOS="/mnt/VOL05/Dados"
if [ ! -d ${DADOS} ]; then
	${MKDIR} -p ${DADOS}
fi
${RSYNC} ${RSYNC_OPT} 192.168.0.8:/home/samba	${DADOS}/
${RSYNC} ${RSYNC_OPT} 192.168.0.8:/var/Publico	${DADOS}/


BIBLIA="/mnt/VOL02/Biblia"
EXCLUDE_DIR="--exclude=bin --exclude=boot --exclude=dev --exclude=initrd --exclude=lib --exclude=proc --exclude=sbin --exclude=sys --exclude=tmp"
if [ ! -d ${BIBLIA} ]; then
	${MKDIR} -p ${BIBLIA}
fi
${RSYNC} ${RSYNC_OPT} ${EXCLUDE_DIR} 192.168.0.6:/* ${BIBLIA}


${RSYNC} ${RSYNC_OPT} 192.168.0.8:/COMUNICA	/mnt/VOL03/
${RSYNC} ${RSYNC_OPT} 192.168.0.8:/DIARIO	/mnt/VOL04/
${RSYNC} ${RSYNC_OPT} 192.168.0.8:/SETORES	/mnt/VOL06/

PHP File Manager