From 310a71502f9aeb498cde1f953311e95da1c3f3d0 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Sun, 9 Mar 2014 09:12:35 +0000 Subject: [PATCH] backup: error on configDB update: skip backup on configDB git-svn-id: https://svn.fhem.de/fhem/trunk@5173 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_backup.pm | 3 +++ fhem/FHEM/98_update.pm | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/98_backup.pm b/fhem/FHEM/98_backup.pm index a4a09fdf2..52312edf1 100644 --- a/fhem/FHEM/98_backup.pm +++ b/fhem/FHEM/98_backup.pm @@ -47,12 +47,15 @@ sub CommandBackup($$) { my ($cl, $param) = @_; + my $modpath = $attr{global}{modpath}; my $configfile = (!defined($attr{global}{configfile}) ? undef : $attr{global}{configfile}); my $statefile = (!defined($attr{global}{statefile}) ? undef : $attr{global}{statefile}); my $msg; my $ret; + return "Backup is not supported for configDB" if($configfile eq 'configDB'); + # set backupdir my $backupdir; if (!defined($attr{global}{backupdir})) { diff --git a/fhem/FHEM/98_update.pm b/fhem/FHEM/98_update.pm index 3b8f787c1..fdabb1e29 100644 --- a/fhem/FHEM/98_update.pm +++ b/fhem/FHEM/98_update.pm @@ -432,7 +432,9 @@ update_DoUpdate(@) } # do a backup first - my $doBackup = (!defined($attr{global}{backup_before_update}) ? 1 : $attr{global}{backup_before_update}); + my $configfile = AttrVal("global", "configfile", ""); + my $doBackup = AttrVal("global", "backup_before_update", + ($configfile ne 'configDB')); if ($doBackup) { my $cmdret = AnalyzeCommand(undef, "backup");