diff -ruN e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar --- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-03 17:13:10.000000000 -0800 +++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-03 17:19:51.000000000 -0800 @@ -213,7 +213,21 @@ if ($incnum == 0) { $setnum %= $setsmax; - ++$setnum; + $setnum++; + + # Remove set0 if reached $setsmax as set0 is deprecated and no longer valid. + if ($setnum == $setsmax && -d "$mntdir/$id/set0") + { + # if $setsmax already exists, just delete set0 + if (-d "$mntdir/$id/set$setsmax") + { + &remove_tree ("$mntdir/$id/set0"); + } + else # move set0 to $setsmax, it will be deleted after a successful backup + { + move("$mntdir/$id/set0", "$mntdir/$id/set$setsmax"); + } + } } $report .= sprintf("Using set number %d of %d\n", $setnum, $setsmax);