1 |
wellsi |
1.2 |
diff -ruN e-smith-backup-2.4.0.p22/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.p22/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 16:38:55.000000000 -0800 |
3 |
|
|
+++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 16:40:07.000000000 -0800 |
4 |
|
|
@@ -85,7 +85,7 @@ |
5 |
|
|
my $tomail = $backupwk->prop('ToMail') || 'admin'; |
6 |
|
|
my $deleteearly = $backupwk->prop('DeleteEarly') || 'false'; |
7 |
|
|
my $ether = $internalinterface->prop('Name'); |
8 |
|
|
-my $tmpdir; |
9 |
|
|
+ |
10 |
|
|
|
11 |
|
|
$report .= "From: ".$frommail."\n"; |
12 |
|
|
$report .= "To: $tomail\n"; |
13 |
wellsi |
1.1 |
@@ -147,14 +147,6 @@ |
14 |
|
|
my $setdirname = $mntdir . "/$id/" . $setname; |
15 |
|
|
&createTree ($setdirname); |
16 |
|
|
|
17 |
|
|
-if ($deleteearly ne 'true') |
18 |
|
|
-{ |
19 |
|
|
- $tmpdir = $mntdir . '/tmp_dir'; |
20 |
|
|
- |
21 |
|
|
- &removeTree ("$tmpdir/$id"); |
22 |
|
|
- &createTree ("$tmpdir/$id"); |
23 |
|
|
- $report .= "Working directory //$smbhost/$smbshare/tmp_dir/$id\n"; |
24 |
|
|
-} |
25 |
|
|
$report .= "Destination //$smbhost/$smbshare/$id/$setname\n"; |
26 |
|
|
|
27 |
|
|
if ( $incnum == 0 ) |
28 |
|
|
@@ -222,7 +214,7 @@ |
29 |
|
|
&createTree ($setdirname); |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
-my $destination = ($deleteearly ne 'true') ? "$tmpdir/$id/$bkname" : "$setdirname/$bkname"; |
33 |
|
|
+my $destination = ($deleteearly ne 'true') ? "$mntdir/$id/$bkname" : "$setdirname/$bkname"; |
34 |
|
|
|
35 |
|
|
# Perform the actual backup |
36 |
|
|
my $rc = run_backup($destination); |
37 |
|
|
@@ -234,17 +226,16 @@ |
38 |
|
|
|
39 |
|
|
if ($deleteearly ne 'true') # Not DeleteEarly so move backup to $setdirname |
40 |
|
|
{ |
41 |
|
|
- if ($incnum == 0) |
42 |
|
|
+ if ($incnum == 0) # Create new set directory |
43 |
|
|
{ |
44 |
|
|
&removeTree ($setdirname); |
45 |
|
|
&createTree ($setdirname); |
46 |
|
|
} |
47 |
|
|
- foreach (bsd_glob("$tmpdir/$id/$bkname*")) |
48 |
wellsi |
1.2 |
+ foreach (bsd_glob("$mntdir/$id/*.dar")) # Move the backup files to the set directory |
49 |
wellsi |
1.1 |
{ |
50 |
wellsi |
1.2 |
- ldie("Error while moving backup file $_ from temporary dir $tmpdir/$id to $setdirname : $!") |
51 |
|
|
+ ldie("Error while moving backup file $_ to $setdirname : $!") |
52 |
wellsi |
1.1 |
unless move($_, $setdirname); |
53 |
|
|
} |
54 |
|
|
- &removeTree ("$tmpdir/$id"); |
55 |
|
|
} |
56 |
|
|
|
57 |
|
|
# update dar_manager catalog |