Controlscript for Bashclub ZFS

Using that Script collects all Datasets/ZVOLs from a partent Daset and creates individual Jobs instead of a faulty recursive replication
This commit is contained in:
Chriz 2022-03-11 12:34:45 +01:00 committed by GitHub
parent c8f19ac978
commit e1cb6d35ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
02pull
View File

@ -4,7 +4,7 @@ SOURCEHOST='host.dom.tld'
SOURCEPATH='rpool/data'
DESTPATH='rpool/data/Replica'
PORT='22'
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
SOURCEALL=$(ssh -p$PORT root@$SOURCEHOST 'for src in $(zfs list -H -o name |grep '"$SOURCEPATH"'/|grep -v alt|grep -v state|grep -v disk-9); do echo ${src##*/}; done') #determines Source Datasets without 'alt, state and disk-9' in Name - Those are typlically not replicated
echo ''
echo Repliziere von $SOURCEHOST $SOURCEALL
echo ''