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

Contents of /rpms/e-smith-backup/sme9/e-smith-backup-2.4.0-workstation-report.patch

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


Revision 1.1 - (show annotations) (download)
Sun Dec 1 07:58:59 2013 UTC (10 years, 5 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-25_el6_sme, e-smith-backup-2_4_0-46_el6_sme, e-smith-backup-2_4_0-23_el6_sme, e-smith-backup-2_4_0-28_el6_sme, e-smith-backup-2_4_0-35_el6_sme, e-smith-backup-2_4_0-21_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-24_el6_sme, e-smith-backup-2_4_0-45_el6_sme, e-smith-backup-2_4_0-31_el6_sme, e-smith-backup-2_4_0-30_el6_sme, e-smith-backup-2_4_0-16_el6_sme, e-smith-backup-2_4_0-39_el6_sme, e-smith-backup-2_4_0-40_el6_sme, e-smith-backup-2_4_0-43_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-19_el6_sme, e-smith-backup-2_4_0-34_el6_sme, e-smith-backup-2_4_0-22_el6_sme, e-smith-backup-2_4_0-36_el6_sme, e-smith-backup-2_4_0-20_el6_sme, e-smith-backup-2_4_0-17_el6_sme, e-smith-backup-2_4_0-33_el6_sme, e-smith-backup-2_4_0-26_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-27_el6_sme, e-smith-backup-2_4_0-18_el6_sme, e-smith-backup-2_4_0-41_el6_sme, e-smith-backup-2_4_0-15_el6_sme, HEAD
* Sat Nov 30 2013 Ian Wells <esmith@wellsi.com> 2.4.0-15.sme
- Simplify the workstation backup report [SME: 7791]

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 2013-11-30 21:03:09.000000000 -0800
3 +++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2013-11-30 22:21:33.000000000 -0800
4 @@ -94,8 +94,6 @@
5 $report .= "DAILY BACKUP TO WORKSTATION REPORT \n";
6 $report .= "================================== \n";
7 $report .= "Backup of ".$id." started at " .$tim . "\n";
8 -$report .= "Backup of mysql databases has been done\n";
9 -$report .= "Mounting backup shared directory <//$smbhost/$smbshare>\n";
10
11 # ping the SMB Host to see if it is awake
12
13 @@ -139,16 +137,6 @@
14 $setnum %= $setsmax;
15 }
16
17 -$report .= sprintf("Using set number %d of %d\n", $setnum + 1, $setsmax);
18 -if ($incnum == 0)
19 -{
20 - $report .= "Attempt full backup \n";
21 -}
22 -else
23 -{
24 - $report .= sprintf("Attempt incremental backup number %d of %d\n", $incnum, $daysinset - 1);
25 -}
26 -
27 # if no set directory, make it
28 my $setname = "set" . $setnum;
29 my $setdirname = $mntdir . "/$id/" . $setname;
30 @@ -160,12 +148,10 @@
31
32 &removeTree ("$tmpdir/$id");
33 &createTree ("$tmpdir/$id");
34 - $report .= "Backup temp directory $tmpdir/$id is mounted and is writable \n";
35 -}
36 -else
37 -{
38 - $report .= "Backup directory $setdirname is mounted \n";
39 + $report .= "Working directory //$smbhost/$smbshare/tmp_dir/$id\n";
40 }
41 +$report .= "Destination //$smbhost/$smbshare/$id/$setname\n";
42 +
43
44 if ( $incnum == 0 )
45 {
46 @@ -208,7 +194,7 @@
47 ldie("Not a permitted day for full backup. Aborting...\nNext full backup in $delay days.\n");
48 }
49
50 -$report .= "Backup to $bkname in $id/$setname\n";
51 +$report .= "Basename $bkname\n";
52
53 # calculate real timeout if we timeout incrementals only.
54 # timeout of 88500 is a security for aborting backup within 24h
55 @@ -217,7 +203,7 @@
56 {
57 $timeout = 88500;
58 }
59 -$report .= "Starting the backup with a timeout of $timeout seconds\n";
60 +$report .= "Starting the backup with a timeout of ". int ($timeout/(60*60)). " hours\n";
61
62 # expanding backup configuration file template
63
64 @@ -244,7 +230,6 @@
65
66 if ($deleteearly ne 'true') # Not DeleteEarly so move backup to $setdirname
67 {
68 - $report .= "Moving backup files to target directory $setdirname \n";
69 if ($incnum == 0)
70 {
71 &removeTree ($setdirname);
72 @@ -259,8 +244,6 @@
73 }
74
75 # update dar_manager catalog
76 -$report .= "Updating catalog\n";
77 -
78 my %backupfiles = ();
79 my $mntbkdir;
80 my $mounted;
81 @@ -358,24 +341,22 @@
82 my $df = qx(/bin/df -Ph \"$mntdir\");
83 if ($df =~ /(\S+)\s+(\S+)\s+(\S+)\s+(\d*%)/)
84 {
85 - $report .= "Disk usage $2, $4 full, $3 available\n";
86 + $report .= "Destination disk usage $2, $4 full, $3 available\n";
87 }
88 else
89 {
90 - $report .= "Disk space not available\n";
91 + $report .= "Destination disk space not available\n";
92 }
93
94 # unmount shared folder
95 system("/bin/umount", "-f", "$mntdir");
96
97 # time now to update backup configuration
98 -
99 -$report .= "Updating backup configuration data \n";
100 $backupwk->set_prop('SetNum', $setnum);
101 $backupwk->set_prop('IncNum', $incnum);
102
103 $tim = ctime();
104 -$report .= "Backup successfully terminated at : $tim \n";
105 +$report .= "Backup successfully terminated at $tim \n";
106
107 if ($mail eq 'yes')
108 {

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