1 |
stephdl |
1.1 |
diff -Nur e-smith-backup-2.6.0.old/createlinks e-smith-backup-2.6.0.new/createlinks |
2 |
|
|
--- e-smith-backup-2.6.0.old/createlinks 2013-02-13 16:21:38.000000000 +0100 |
3 |
|
|
+++ e-smith-backup-2.6.0.new/createlinks 2016-06-30 15:43:04.012136084 +0200 |
4 |
|
|
@@ -34,6 +34,7 @@ |
5 |
|
|
|
6 |
|
|
templates2events("/etc/crontab", $event); |
7 |
|
|
templates2events("/etc/dar/CIFScredentials", $event); |
8 |
|
|
+templates2events("/etc/dar/DailyBackup.dcf", $event); |
9 |
|
|
|
10 |
|
|
#-------------------------------------------------- |
11 |
|
|
# events for pre-backup action |
12 |
|
|
diff -Nur e-smith-backup-2.6.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.6.0.new/root/etc/e-smith/events/actions/workstation-backup-dar |
13 |
|
|
--- e-smith-backup-2.6.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2016-02-05 00:08:22.000000000 +0100 |
14 |
stephdl |
1.2 |
+++ e-smith-backup-2.6.0.new/root/etc/e-smith/events/actions/workstation-backup-dar 2016-07-28 11:02:39.939632127 +0200 |
15 |
stephdl |
1.1 |
@@ -30,6 +30,7 @@ |
16 |
|
|
use POSIX qw(:sys_wait_h strftime); |
17 |
|
|
use File::Glob qw(bsd_glob); |
18 |
|
|
use esmith::ConfigDB; |
19 |
|
|
+use esmith::Backup; |
20 |
|
|
|
21 |
|
|
sub ldie; |
22 |
|
|
sub start_dar_killer; |
23 |
|
|
@@ -66,6 +67,8 @@ |
24 |
|
|
my $mntdir = $backupwk->prop('Mount') || '/mnt/smb'; |
25 |
|
|
$mntdir = "\/$smbshare" if ($VFSType eq 'usb'); # ToDo change to $backupwk->prop('Mount') |
26 |
|
|
my $deleteearly = $backupwk->prop('DeleteEarly') || 'false'; |
27 |
|
|
+my @backup_excludes = esmith::Backup->excludes; |
28 |
|
|
+@backup_excludes = map "\t/$_\n", sort @backup_excludes; |
29 |
|
|
|
30 |
|
|
my $report = "From: $frommail\n"; |
31 |
|
|
$report .= "To: $tomail\n"; |
32 |
stephdl |
1.2 |
@@ -74,6 +77,13 @@ |
33 |
stephdl |
1.1 |
$report .= "DAILY BACKUP TO WORKSTATION REPORT \n"; |
34 |
|
|
$report .= "================================== \n"; |
35 |
|
|
$report .= "Backup of $id started at " .localtime() . "\n"; |
36 |
|
|
+$report .= "================================== \n"; |
37 |
stephdl |
1.2 |
+ |
38 |
|
|
+if (@backup_excludes) { |
39 |
|
|
+ $report .= "Some parts are excluded of your backup: \n"; |
40 |
|
|
+ $report .= "@backup_excludes"; |
41 |
|
|
+ $report .= "================================== \n"; |
42 |
|
|
+ } |
43 |
stephdl |
1.1 |
|
44 |
|
|
# ping the SMB Host to see if it is awake |
45 |
|
|
$report .= wol ($ether,$smbhost,$smbhostmac,$smbhostdelay); |
46 |
|
|
diff -Nur e-smith-backup-2.6.0.old/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/45prune e-smith-backup-2.6.0.new/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/45prune |
47 |
|
|
--- e-smith-backup-2.6.0.old/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/45prune 1970-01-01 01:00:00.000000000 +0100 |
48 |
|
|
+++ e-smith-backup-2.6.0.new/root/etc/e-smith/templates/etc/dar/DailyBackup.dcf/45prune 2016-06-30 15:54:52.836309465 +0200 |
49 |
|
|
@@ -0,0 +1,7 @@ |
50 |
|
|
+{ |
51 |
|
|
+ use esmith::Backup; |
52 |
|
|
+ my @exclusion_list = esmith::Backup->excludes; |
53 |
|
|
+ foreach my $dir ( @exclusion_list ) { |
54 |
|
|
+ $OUT .= "--prune $dir\n"; |
55 |
|
|
+ } |
56 |
|
|
+} |