mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
98_configdb.pm: for debug only
git-svn-id: https://svn.fhem.de/fhem/trunk@16119 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b3973af13d
commit
5e86381150
@ -76,7 +76,8 @@ sub CommandConfigdb($$) {
|
|||||||
|
|
||||||
if ($dbtype eq 'SQLITE') {
|
if ($dbtype eq 'SQLITE') {
|
||||||
(undef,$source) = split (/=/, $dbconn);
|
(undef,$source) = split (/=/, $dbconn);
|
||||||
my $dumpcmd = "echo '.dump' | sqlite3 $source $gzip > $target";
|
my $dbtables = "fhemversions fhemconfig fhemstate fhemb64filesave";
|
||||||
|
my $dumpcmd = "echo '.dump ".$dbtables."' | sqlite3 $source $gzip > $target";
|
||||||
Log 4,"configDB: $dumpcmd";
|
Log 4,"configDB: $dumpcmd";
|
||||||
$ret = qx($dumpcmd);
|
$ret = qx($dumpcmd);
|
||||||
return $ret if $ret; # return error message if available
|
return $ret if $ret; # return error message if available
|
||||||
@ -87,7 +88,8 @@ sub CommandConfigdb($$) {
|
|||||||
(undef,$dbname) = split (/=/,$dbname);
|
(undef,$dbname) = split (/=/,$dbname);
|
||||||
(undef,$dbhostname) = split (/=/,$dbhostname);
|
(undef,$dbhostname) = split (/=/,$dbhostname);
|
||||||
(undef,$dbport) = split (/=/,$dbport);
|
(undef,$dbport) = split (/=/,$dbport);
|
||||||
my $dumpcmd = "mysqldump --user=$dbuser --password=$dbpass --host=$dbhostname --port=$dbport -Q $dbname $gzip > $target";
|
my $dbtables = "fhemversions fhemconfig fhemstate fhemb64filesave";
|
||||||
|
my $dumpcmd = "mysqldump --user=$dbuser --password=$dbpass --host=$dbhostname --port=$dbport -Q $dbname $dbtables $gzip > $target";
|
||||||
Log 4,"configDB: $dumpcmd";
|
Log 4,"configDB: $dumpcmd";
|
||||||
$ret = qx($dumpcmd);
|
$ret = qx($dumpcmd);
|
||||||
return $ret if $ret;
|
return $ret if $ret;
|
||||||
@ -99,7 +101,8 @@ sub CommandConfigdb($$) {
|
|||||||
(undef,$dbname) = split (/=/,$dbname);
|
(undef,$dbname) = split (/=/,$dbname);
|
||||||
(undef,$dbhostname) = split (/=/,$dbhostname);
|
(undef,$dbhostname) = split (/=/,$dbhostname);
|
||||||
(undef,$dbport) = split (/=/,$dbport);
|
(undef,$dbport) = split (/=/,$dbport);
|
||||||
my $dumpcmd = "PGPASSWORD=$dbpass pg_dump -U $dbuser -h $dbhostname -p $dbport $dbname $gzip > $target";
|
my $dbtables = "-t fhemversions -t fhemconfig -t fhemstate -t fhemb64filesave";
|
||||||
|
my $dumpcmd = "PGPASSWORD=$dbpass pg_dump -U $dbuser -h $dbhostname -p $dbport $dbname $dbtables $gzip > $target";
|
||||||
Log 4,"configDB: $dumpcmd";
|
Log 4,"configDB: $dumpcmd";
|
||||||
$ret = qx($dumpcmd);
|
$ret = qx($dumpcmd);
|
||||||
return $ret if $ret;
|
return $ret if $ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user