/[smeserver]/rpms/e-smith-backup/sme9/e-smith-backup-2.4.0-workstation-noTempDir.patch
ViewVC logotype

Annotation of /rpms/e-smith-backup/sme9/e-smith-backup-2.4.0-workstation-noTempDir.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Feb 5 23:13:06 2014 UTC (10 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-25_el6_sme, e-smith-backup-2_4_0-24_el6_sme
* Wed Feb 5 2014 Ian Wells <esmith@wellsi.com> 2.4.0-24.sme
- Workstation Backup, remove the need for a temporary directory. [SME: 7767]

1 wellsi 1.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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed