mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
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:
parent
c9f65028eb
commit
bb6432f9ea
@ -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})) {
|
||||||
|
@ -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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user