bashclub-zfs-push-pull/02pull

16 lines
488 B
Plaintext
Raw Normal View History

2019-11-21 14:23:29 +01:00
#!/bin/bash
SCRIPTPATH='/root'
SOURCEHOST='host.dom.tld'
SOURCEPATH='rpool/data'
DESTPATH='rpool/data/Replca'
PORT='10022'
SOURCEALL=$(ssh -p$PORT root@$SOURCEHOST 'for src in $(zfs list -H -o name |grep '"$SOURCEPATH"'/|grep -v alt); do echo ${src##*/}; done') #determines Source Datasets without 'alt' in Name
echo ''
echo Repliziere von $SOURCEHOST $SOURCEALL
echo ''
for DATA in $SOURCEALL
do
2022-01-31 16:08:49 +01:00
$SCRIPTPATH/bashclub-zfs -p $PORT -k 5 -v $SOURCEHOST:$SOURCEPATH/$DATA $DESTPATH
done
2019-11-21 14:23:29 +01:00
###