mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-12-26 06:30:12 +01:00
Update 02pull
error correction
This commit is contained in:
parent
a386cb2146
commit
58a1c362e2
16
02pull
16
02pull
@ -1,14 +1,16 @@
|
|||||||
SCRIPTPATH='/mnt/Raid'
|
#!/bin/bash
|
||||||
SOURCEHOST='your.dom.tld'
|
SCRIPTPATH='/root'
|
||||||
SOURCEPATH='rpool/vms' # Example showing Proxmox Source
|
SOURCEHOST='host.dom.tld'
|
||||||
DESTPATH='Raid/ssd/32'# Example showing FreeNAS Destination (ssh-keygen and ssh-copy-id necessary)
|
SOURCEPATH='rpool/data'
|
||||||
PORT=10011 # NAT Rule on Source that redirects port 10011 to internal IP 11 on this Port
|
DESTPATH='rpool/data/Replca'
|
||||||
SOURCEALL=$(ssh 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
|
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 ''
|
||||||
echo Repliziere von $SOURCEHOST $SOURCEALL
|
echo Repliziere von $SOURCEHOST $SOURCEALL
|
||||||
echo ''
|
echo ''
|
||||||
for DATA in $SOURCEALL
|
for DATA in $SOURCEALL
|
||||||
do
|
do
|
||||||
$SCRIPTPATH/backup-zfs -p $PORT -k 5 -v $SOURCEHOST:$SOURCEPATH/$DATA $DESTPATH
|
echo $SCRIPTPATH/backup-zfs -p $PORT -k 5 -v $SOURCEHOST:$SOURCEPATH/$DATA $DESTPATH
|
||||||
done
|
done
|
||||||
###
|
###
|
||||||
|
~
|
||||||
|
Loading…
Reference in New Issue
Block a user