From 58a1c362e2c39a978b3db695e63df819ed11bc13 Mon Sep 17 00:00:00 2001 From: cpzengel Date: Thu, 21 Nov 2019 14:23:29 +0100 Subject: [PATCH] Update 02pull error correction --- 02pull | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/02pull b/02pull index 08c48a9..24a92b1 100644 --- a/02pull +++ b/02pull @@ -1,14 +1,16 @@ -SCRIPTPATH='/mnt/Raid' -SOURCEHOST='your.dom.tld' -SOURCEPATH='rpool/vms' # Example showing Proxmox Source -DESTPATH='Raid/ssd/32'# Example showing FreeNAS Destination (ssh-keygen and ssh-copy-id necessary) -PORT=10011 # NAT Rule on Source that redirects port 10011 to internal IP 11 on this Port -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 +#!/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 -$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 -### \ No newline at end of file +### +~