-
Notifications
You must be signed in to change notification settings - Fork 0
/
e-smith-backup-2.2.0-once_a_day.patch
22 lines (22 loc) · 1.39 KB
/
e-smith-backup-2.2.0-once_a_day.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff -Naur e-smith-backup-2.2.0-old/root/sbin/e-smith/do_backup e-smith-backup-2.2.0/root/sbin/e-smith/do_backup
--- e-smith-backup-2.2.0-old/root/sbin/e-smith/do_backup 2007-09-05 21:45:52.000000000 +0200
+++ e-smith-backup-2.2.0/root/sbin/e-smith/do_backup 2010-01-25 13:51:23.000000000 +0100
@@ -41,6 +41,7 @@
my $backups = esmith::BackupHistoryDB->open
|| die("Could not open backup history db\n");
my $now = time();
+die "backup not allowed twice at the same date/time, delayed to next day\n" if $backups->get($now);
my $backup_rec = $backups->new_record($now, { type => 'backup_record' });
$backup_rec->set_prop('StartEpochTime', "$now");
$backup_rec->set_prop('BackupType', $backupType);
diff -Naur e-smith-backup-2.2.0-old/root/sbin/e-smith/do_backupwk e-smith-backup-2.2.0/root/sbin/e-smith/do_backupwk
--- e-smith-backup-2.2.0-old/root/sbin/e-smith/do_backupwk 2008-10-07 19:34:33.000000000 +0200
+++ e-smith-backup-2.2.0/root/sbin/e-smith/do_backupwk 2010-01-25 13:47:56.000000000 +0100
@@ -38,6 +38,7 @@
my $backups = esmith::BackupHistoryDB->open
|| die("Could not open backup history db\n");
my $now = time();
+die "backup not allowed twice at the same date/time, delayed to next day\n" if $backups->get($now);
my $backup_rec = $backups->new_record($now, { type => 'backup_record' });
$backup_rec->set_prop('StartEpochTime', "$now");
$backup_rec->set_prop('BackupType', "workstation");