/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-DeleteEarly.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-DeleteEarly.patch

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


Revision 1.1 - (show annotations) (download)
Sun Jul 7 04:31:02 2013 UTC (10 years, 10 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_2_0-72_el5_sme, e-smith-backup-2_2_0-80_el5_sme, e-smith-backup-2_2_0-83_el5_sme, e-smith-backup-2_2_0-82_el5_sme, e-smith-backup-2_2_0-88_el5_sme, e-smith-backup-2_2_0-74_el5_sme, e-smith-backup-2_2_0-84_el5_sme, e-smith-backup-2_2_0-87_el5_sme, e-smith-backup-2_2_0-81_el5_sme, e-smith-backup-2_2_0-68_el5_sme, e-smith-backup-2_2_0-86_el5_sme, e-smith-backup-2_2_0-71_el5_sme, e-smith-backup-2_2_0-78_el5_sme, e-smith-backup-2_2_0-73_el5_sme, e-smith-backup-2_2_0-79_el5_sme, e-smith-backup-2_2_0-75_el5_sme, e-smith-backup-2_2_0-76_el5_sme, e-smith-backup-2_2_0-67_el5_sme, e-smith-backup-2_2_0-70_el5_sme, e-smith-backup-2_2_0-77_el5_sme, e-smith-backup-2_2_0-85_el5_sme, e-smith-backup-2_2_0-69_el5_sme, HEAD
* Sat Jul 6 2013 Ian Wells <esmith@wellsi.com> 2.2.0-67.sme
- Workstation Backup, add a choice to delete old backup before or after backup [SME: 6811]

1 diff -ruN e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar
2 --- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2013-07-06 19:50:52.000000000 -0700
3 +++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2013-07-06 20:10:43.000000000 -0700
4 @@ -84,6 +84,7 @@
5 my $mntdir = $backupwk->prop('Mount') || '/mnt/smb';
6 my $frommail = $backupwk->prop('FromMail') || 'admin-backup';
7 my $tomail = $backupwk->prop('ToMail') || 'admin';
8 +my $deleteearly = $backupwk->prop('DeleteEarly') || 'false';
9 my $ether = $internalinterface->prop('Name');
10 my $tmpdir;
11
12 @@ -304,15 +305,22 @@
13
14 # launching dar backup
15
16 -my $rc = run_backup();
17 -if ($rc != 0 && $rc != 11)
18 +if (($deleteearly eq 'true') && (($incnum == 0))) # Allow delete before backup
19 {
20 - ldie("Error while running dar: $rc");
21 + &remove_tree ($setdirname);
22 + &create_tree ($setdirname);
23 }
24
25 -if ($incnum == 0)
26 +# Perform the actual backup
27 +my $rc = run_backup();
28 +
29 +if ($rc != 0 && $rc != 11)
30 +{
31 + ldie("Error while running dar: $rc");
32 +}
33 +
34 +if (($deleteearly ne 'true') && (($incnum == 0))) # Allow delete after backup
35 {
36 - $report .= "Rotating backups in a new set $setdirname. \n";
37 &remove_tree ($setdirname);
38 &create_tree ($setdirname);
39 }

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