Browse Source

zfsync usage

master
n 4 years ago
parent
commit
0d8df5e6d1
  1. 7
      zfsync.sh

7
zfsync.sh

@ -2,7 +2,7 @@
# zfsync: sync zfs pool(s) between two servers
# in case of failure, unexpected reboot while syncing, etc.:
# before first use, or in case of failure, unexpected reboot while syncing, etc.:
#
# launch "zfsync.sh init"
#
@ -13,12 +13,15 @@
# - for i in ftp web mail; do zfs send servers/$i/home@newsync | ssh ${bro} zfs receive -vFd servers ;done
# - for i in ftp web mail; do zfs rename servers/$i/home@newsync servers/$i/home@prevsync ;done
# - ssh ${bro} 'for i in ftp web mail; do zfs rename servers/$i/home@newsync servers/$i/home@prevsync ;done'
#
# once init is done, call it using crontab:
# */10 * * * * root nice -n 19 /usr/local/bin/zfsync.sh >/tmp/zfsync.log
bro="small"
pools="ftp mail web"
SENDNSCA=/usr/local/sbin/send_nsca\ -H\ 192.168.3.3\ -d\ ';;'\ -c\ /usr/local/etc/nagios/send_nsca.cfg
SENDNSCA=/usr/local/sbin/send_nsca\ -H\ 192.168.X.X\ -d\ ';;'\ -c\ /usr/local/etc/nagios/send_nsca.cfg
HOSTNAME=`/bin/hostname -f | /usr/bin/cut -d '.' -f 1,1`
SERVICENAME=zfsync
LOGFILE=/tmp/zfsync.log

Loading…
Cancel
Save