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

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

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


Revision 1.1 - (hide annotations) (download)
Sun Feb 9 04:59:57 2014 UTC (10 years, 9 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-31_el6_sme, e-smith-backup-2_4_0-32_el6_sme, e-smith-backup-2_4_0-42_el6_sme, e-smith-backup-2_4_0-38_el6_sme, e-smith-backup-2_4_0-29_el6_sme, e-smith-backup-2_4_0-46_el6_sme, e-smith-backup-2_4_0-34_el6_sme, e-smith-backup-2_4_0-27_el6_sme, e-smith-backup-2_4_0-28_el6_sme, e-smith-backup-2_4_0-30_el6_sme, e-smith-backup-2_4_0-35_el6_sme, e-smith-backup-2_4_0-36_el6_sme, e-smith-backup-2_4_0-44_el6_sme, e-smith-backup-2_4_0-37_el6_sme, e-smith-backup-2_4_0-33_el6_sme, e-smith-backup-2_4_0-41_el6_sme, e-smith-backup-2_4_0-39_el6_sme, e-smith-backup-2_4_0-45_el6_sme, e-smith-backup-2_4_0-40_el6_sme, e-smith-backup-2_4_0-43_el6_sme, HEAD
* Sat Feb 8 2014 Ian Wells <esmith@wellsi.com> 2.4.0-27.sme
- Workstation Backup, Don't delete old sets, only empty them. [SME: 8195]

1 wellsi 1.1 diff -ruN e-smith-backup-2.4.0.p25/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.p25/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-08 20:06:35.000000000 -0800
3     +++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-08 20:56:33.000000000 -0800
4     @@ -86,7 +86,7 @@
5     }
6    
7     # create the directory mount point if it does not exist
8     -createTree ($mntdir);
9     +&createTree ($mntdir);
10    
11     # mount the backup directory
12     my $err = &dmount($smbhost,$smbshare,$mntdir,$login,$password,$VFSType);
13     @@ -174,17 +174,17 @@
14     }
15     $report .= "Starting the backup with a timeout of ". int ($timeout/(60*60)). " hours\n";
16    
17     -# expanding backup configuration file template
18     +# Expand backup configuration file template
19     +processTemplate ({TEMPLATE_PATH => "/etc/dar/$job.dcf"});
20    
21     -processTemplate({
22     - TEMPLATE_PATH => "/etc/dar/$job.dcf",
23     - });
24     -
25     -# launching dar backup
26     -if (($deleteearly eq 'true') && (($incnum == 0))) # Allow delete before backup
27     +# If this is a new set and delete before backup is in use
28     +# then empty target directory of any .dar files
29     +if (($deleteearly eq 'true') && (($incnum == 0)))
30     {
31     - &removeTree ($setdirname);
32     - &createTree ($setdirname);
33     + foreach my $file (glob("$setdirname/*.dar"))
34     + {
35     + unlink $file or ldie("Error deleting old backup files in $setdirname : $!")
36     + }
37     }
38    
39     my $destination = ($deleteearly ne 'true') ? "$mntdir/$id/$bkname" : "$setdirname/$bkname";
40     @@ -199,10 +199,12 @@
41    
42     if ($deleteearly ne 'true') # Not DeleteEarly so move backup to $setdirname
43     {
44     - if ($incnum == 0) # Create new set directory
45     + if ($incnum == 0) # If this is a new set then empty target directory of any .dar files
46     {
47     - &removeTree ($setdirname);
48     - &createTree ($setdirname);
49     + foreach my $file (glob("$setdirname/*.dar"))
50     + {
51     + unlink $file or ldie("Error deleting old backup files in $setdirname : $!")
52     + }
53     }
54     foreach (bsd_glob("$mntdir/$id/*.dar")) # Move the backup files to the set directory
55     {

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