backup: error on configDB

update: skip backup on configDB


git-svn-id: https://svn.fhem.de/fhem/trunk@5173 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-03-09 09:12:35 +00:00
parent c9f65028eb
commit bb6432f9ea
2 changed files with 6 additions and 1 deletions

View File

@ -47,12 +47,15 @@ sub
CommandBackup($$) CommandBackup($$)
{ {
my ($cl, $param) = @_; my ($cl, $param) = @_;
my $modpath = $attr{global}{modpath}; my $modpath = $attr{global}{modpath};
my $configfile = (!defined($attr{global}{configfile}) ? undef : $attr{global}{configfile}); my $configfile = (!defined($attr{global}{configfile}) ? undef : $attr{global}{configfile});
my $statefile = (!defined($attr{global}{statefile}) ? undef : $attr{global}{statefile}); my $statefile = (!defined($attr{global}{statefile}) ? undef : $attr{global}{statefile});
my $msg; my $msg;
my $ret; my $ret;
return "Backup is not supported for configDB" if($configfile eq 'configDB');
# set backupdir # set backupdir
my $backupdir; my $backupdir;
if (!defined($attr{global}{backupdir})) { if (!defined($attr{global}{backupdir})) {

View File

@ -432,7 +432,9 @@ update_DoUpdate(@)
} }
# do a backup first # 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) { if ($doBackup) {
my $cmdret = AnalyzeCommand(undef, "backup"); my $cmdret = AnalyzeCommand(undef, "backup");