1 |
diff -ruN e-smith-backup-2.4.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar |
2 |
--- e-smith-backup-2.4.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 13:04:23.000000000 -0800 |
3 |
+++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 13:07:03.000000000 -0800 |
4 |
@@ -147,14 +147,6 @@ |
5 |
my $setdirname = $mntdir . "/$id/" . $setname; |
6 |
&createTree ($setdirname); |
7 |
|
8 |
-if ($deleteearly ne 'true') |
9 |
-{ |
10 |
- $tmpdir = $mntdir . '/tmp_dir'; |
11 |
- |
12 |
- &removeTree ("$tmpdir/$id"); |
13 |
- &createTree ("$tmpdir/$id"); |
14 |
- $report .= "Working directory //$smbhost/$smbshare/tmp_dir/$id\n"; |
15 |
-} |
16 |
$report .= "Destination //$smbhost/$smbshare/$id/$setname\n"; |
17 |
|
18 |
if ( $incnum == 0 ) |
19 |
@@ -222,7 +214,7 @@ |
20 |
&createTree ($setdirname); |
21 |
} |
22 |
|
23 |
-my $destination = ($deleteearly ne 'true') ? "$tmpdir/$id/$bkname" : "$setdirname/$bkname"; |
24 |
+my $destination = ($deleteearly ne 'true') ? "$mntdir/$id/$bkname" : "$setdirname/$bkname"; |
25 |
|
26 |
# Perform the actual backup |
27 |
my $rc = run_backup($destination); |
28 |
@@ -234,17 +226,16 @@ |
29 |
|
30 |
if ($deleteearly ne 'true') # Not DeleteEarly so move backup to $setdirname |
31 |
{ |
32 |
- if ($incnum == 0) |
33 |
+ if ($incnum == 0) # Create new set directory |
34 |
{ |
35 |
&removeTree ($setdirname); |
36 |
&createTree ($setdirname); |
37 |
} |
38 |
- foreach (bsd_glob("$tmpdir/$id/$bkname*")) |
39 |
+ foreach (bsd_glob("$mntdir/$id/$bkname*")) # Move the backup files to the set directory |
40 |
{ |
41 |
ldie("Error while moving backup file $_ from temporary dir $tmpdir/$id to $setdirname : $!") |
42 |
unless move($_, $setdirname); |
43 |
} |
44 |
- &removeTree ("$tmpdir/$id"); |
45 |
} |
46 |
|
47 |
# update dar_manager catalog |