From 50f07db14fd114615dd62e8bb4f5ca4b4135b99e Mon Sep 17 00:00:00 2001 From: Pablo Lalloni Date: Thu, 3 Nov 2016 02:37:04 -0300 Subject: [PATCH 1/3] List only filesystems when finding children Fixes #58 --- syncoid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncoid b/syncoid index 31c9955..35161e8 100755 --- a/syncoid +++ b/syncoid @@ -105,7 +105,7 @@ sub getchilddatasets { if ($isroot) { $mysudocmd = ''; } else { $mysudocmd = $sudocmd; } if ($rhost ne '') { $rhost = "$sshcmd $rhost"; } - my $getchildrencmd = "$rhost $mysudocmd $zfscmd list -o name -Hr $fs |"; + my $getchildrencmd = "$rhost $mysudocmd $zfscmd list -o name -t filesystem -Hr $fs |"; if ($debug) { print "DEBUG: getting list of child datasets on $fs using $getchildrencmd...\n"; } open FH, $getchildrencmd; my @children = ; From 5fa92fa8cb98c93099ea7d19cee20ab8b2bd562f Mon Sep 17 00:00:00 2001 From: Jim Salter Date: Wed, 3 May 2017 15:02:10 -0400 Subject: [PATCH 2/3] don't accidentally pick up snapshots when getting child datasets --- syncoid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncoid b/syncoid index 35161e8..2d7ea16 100755 --- a/syncoid +++ b/syncoid @@ -105,7 +105,7 @@ sub getchilddatasets { if ($isroot) { $mysudocmd = ''; } else { $mysudocmd = $sudocmd; } if ($rhost ne '') { $rhost = "$sshcmd $rhost"; } - my $getchildrencmd = "$rhost $mysudocmd $zfscmd list -o name -t filesystem -Hr $fs |"; + my $getchildrencmd = "$rhost $mysudocmd $zfscmd list -o name -t filesystem,volume -Hr $fs |"; if ($debug) { print "DEBUG: getting list of child datasets on $fs using $getchildrencmd...\n"; } open FH, $getchildrencmd; my @children = ; From e8906de2f07b66d787897ae1affe514217008074 Mon Sep 17 00:00:00 2001 From: Jim Salter Date: Wed, 3 May 2017 15:04:32 -0400 Subject: [PATCH 3/3] only list snapshots in $getsnapcmd --- syncoid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncoid b/syncoid index 2d7ea16..4d08b10 100755 --- a/syncoid +++ b/syncoid @@ -782,7 +782,7 @@ sub getsnaps() { if ($rhost ne '') { $rhost = "$sshcmd $rhost"; } - my $getsnapcmd = "$rhost $mysudocmd $zfscmd get -Hpd 1 creation $fs |"; + my $getsnapcmd = "$rhost $mysudocmd $zfscmd get -Hpd 1 -t snapshot creation $fs |"; if ($debug) { print "DEBUG: getting list of snapshots on $fs using $getsnapcmd...\n"; } open FH, $getsnapcmd; my @rawsnaps = ;