<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Du hast die Strandardkonfiguration von <a href="https://github.com/volkszaehler/volkszaehler.org/blob/master/etc/dbcopy.dist.yaml" class="">https://github.com/volkszaehler/volkszaehler.org/blob/master/etc/dbcopy.dist.yaml</a> verändert. Bitte stell für die Tabelle “copy” ein, genau wie vorgegeben.<div class=""><br class=""></div><div class="">Viele Grüße, Andreas</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 31. Dec 2019, at 17:54, dies und das <<a href="mailto:6ecoopen@googlemail.com" class="">6ecoopen@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hallo Andreas,</div><div class=""><br class=""></div><div class="">vielen Dank für die schnelle Antwort, ich dachte das create steht im sinne für create backup</div><div class="">habe jetzt nochmal den Artikel gelesen und den befehl korrigiert sieht schon besser aus bekomme aber jetzt einen anderen Fehler</div><div class=""><br class=""></div><div class="">pi@raspberrypi:~ $ sudo /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy.php" class="">volkszaehler.org/vendor/bin/dbcopy.php</a> backup -c /etc/dbcopy.json<br class="">Dropping FK FK_87C331C781257D5D on properties<br class="">Dropping FK FK_2BD88468727ACA70 on entities_in_aggregator<br class="">Dropping FK FK_2BD88468DD62C21B on entities_in_aggregator<br class="">Dropping FK FK_ADF3F36372F5A1AA on data<br class="">entities: copying 0 rows (partial copy)<br class="">    0 [>---------------------------] < 1 sec 4.0 MiB<br class=""><br class="">properties: copying 0 rows (partial copy)<br class="">    0 [>---------------------------] < 1 sec 4.0 MiB<br class=""><br class=""><br class="">In BackupCommand.php line 38:<br class=""><br class="">  <span style="color:rgb(255,0,0)" class="">Table entities_in_aggregator doesn't have a simple primary key</span><br class=""><br class=""><br class="">backup [-c|--config CONFIG] [-b|--batch BATCH] [-k|--keep-constraints] [--] [<tables>]...</div><div class=""><br class=""></div><div class="">Gruß, Sven<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 31. Dez. 2019 um 17:37 Uhr schrieb Andreas Goetz <<a href="mailto:cpuidle@gmail.com" class="">cpuidle@gmail.com</a>>:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;" class="">Hi Sven,<div class=""><br class=""></div><div class="">“create” legt das Datenbankschema im Ziel an. Die Fehlermeldung dazu ist eindeutig:<br class=""><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div class=""><span style="color:rgb(255,0,0)" class=""><span style="background-color:rgb(255,255,255)" class="">SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'aggregate' already exists</span></span><br class=""></div></div></blockquote></div><div class=""><br class=""></div><div class="">Die Tabellen gibt es also schon- Du brauchst kein “create” mehr.</div><div class=""><br class=""></div><div class="">Viele Grüße, Andreas</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 31. Dec 2019, at 17:33, dies und das <<a href="mailto:6ecoopen@googlemail.com" target="_blank" class="">6ecoopen@googlemail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="">Hallo,</div><div class=""><br class=""></div><div class="">Problem ist gelöst es funktioniert mit 2 Kanälen und gleicher uuid.</div><div class="">Nach Stunden des rumprobierens dachte ich machste mal einen reboot des Raspberry und siehe da es läuft.</div><div class=""><br class=""></div><div class="">Da mit jetzt ein paar daten fehlen wollte ich mal dbcopy ausprobieren um die Datenbanken zwischen Raspberry und dem Virtuellen System abzugleichen und bin dieser <a href="https://wiki.volkszaehler.org/software/tools/dbcopy" target="_blank" class="">https://wiki.volkszaehler.org/software/tools/dbcopy</a> <br class=""></div><div class="">Anleitung gefolgt.</div><div class="">Im Vorfeld habe ich die Rechte von vz-admin und Mariadb config für externen zugriff angepasst (mysqldump funktioniert).</div><div class="">Wenn ich den Abgleich der Datenbanken mit <br class=""></div><div class="">/var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy.php" target="_blank" class="">volkszaehler.org/vendor/bin/dbcopy.php</a> create -c /etc/dbcopy.json</div><div class="">starte bekomme ich Fehlermeldungen ich bin da nicht so versiert und kann damit nichts anfangen <br class=""></div><div class="">würde mich freuen wenn mir da jemand weiterhelfen könnte.</div><div class=""><br class=""></div><div class="">Hier noch der Auszug aus dem Terminal und im Anhang die dbcopy.json :<br class=""></div><div class=""><br class=""></div><div class="">pi@raspberrypi:~ $ sudo /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy.php" target="_blank" class="">volkszaehler.org/vendor/bin/dbcopy.php</a> create -c /etc/dbcopy.json<br class="">Creating target schema<br class="">Creating tables<br class="">CREATE TABLE aggregate (id INT AUTO_INCREMENT NOT NULL, channel_id INT NOT NULL, type TINYINT(1) NOT NULL, timestamp BIGINT NOT NULL, value DOUBLE PRECISION NOT NULL, count INT NOT NULL, UNIQUE INDEX ts_uniq (channel_id, type, timestamp), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB<br class="">CREATE TABLE data (id INT AUTO_INCREMENT NOT NULL, channel_id INT DEFAULT NULL, timestamp BIGINT NOT NULL, value DOUBLE PRECISION NOT NULL, UNIQUE INDEX data_unique (channel_id, timestamp), INDEX IDX_ADF3F36372F5A1AA (channel_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB<br class="">CREATE TABLE entities (id INT AUTO_INCREMENT NOT NULL, uuid VARCHAR(36) NOT NULL COLLATE utf8_unicode_ci, type VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, class VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, UNIQUE INDEX UNIQ_50EC64E5D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB<br class="">CREATE TABLE entities_in_aggregator (parent_id INT NOT NULL, child_id INT NOT NULL, INDEX IDX_2BD88468727ACA70 (parent_id), INDEX IDX_2BD88468DD62C21B (child_id), PRIMARY KEY(parent_id, child_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB<br class="">CREATE TABLE properties (id INT AUTO_INCREMENT NOT NULL, entity_id INT DEFAULT NULL, pkey VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci, value LONGTEXT NOT NULL COLLATE utf8_unicode_ci, UNIQUE INDEX property_unique (entity_id, pkey), INDEX IDX_87C331C781257D5D (entity_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB<br class="">ALTER TABLE data ADD CONSTRAINT FK_ADF3F36372F5A1AA FOREIGN KEY (channel_id) REFERENCES entities (id)<br class="">ALTER TABLE entities_in_aggregator ADD CONSTRAINT FK_2BD88468727ACA70 FOREIGN KEY (parent_id) REFERENCES entities (id)<br class="">ALTER TABLE entities_in_aggregator ADD CONSTRAINT FK_2BD88468DD62C21B FOREIGN KEY (child_id) REFERENCES entities (id)<br class="">ALTER TABLE properties ADD CONSTRAINT FK_87C331C781257D5D FOREIGN KEY (entity_id) REFERENCES entities (id)<br class="">In AbstractMySQLDriver.php line 49:<br class=""><br class=""><span style="color:rgb(255,0,0)" class=""><span style="background-color:rgb(255,255,255)" class="">  An exception occurred while executing 'CREATE TABLE aggregate (id INT AUTO_INCREMENT NOT NULL, channel_id INT NOT NULL, type TINYINT(1) NOT NULL, timestamp BIGINT NOT NULL, value DOUBLE PRECISION NOT NULL, count INT NOT NULL, UNIQUE<br class="">   INDEX ts_uniq (channel_id, type, timestamp), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB':<br class=""><br class="">  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'aggregate' already exists</span></span><br class=""><br class=""><br class="">In PDOConnection.php line 59:<br class=""><br class=""><span style="color:rgb(255,0,0)" class="">  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'aggregate' already exists</span><br class=""><br class=""><br class="">In PDOConnection.php line 57:<br class=""><br class="">  <span style="color:rgb(255,0,0)" class="">SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'aggregate' already exists</span><br class=""><br class=""><br class="">create [-c|--config CONFIG]<br class=""></div><div class=""><br class=""></div><div class="">Mit freundlichen Grüßen und einen guten Rutsch ins neue Jahr</div><div class=""><br class=""></div><div class="">Sven<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mo., 30. Dez. 2019 um 21:12 Uhr schrieb Daniel Lauckner <<a href="mailto:vz@jahp.de" target="_blank" class="">vz@jahp.de</a>>:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hallo,<br class="">
<br class="">
<br class="">
am Montag, 30. Dezember 2019 um 20:18 hat dies und das geschrieben:<br class="">
> nur habe ich<br class="">
> keine Ahnung welchen Port ich da freigeben müsste.<br class="">
<br class="">
Webserver: Port 80.<br class="">
<br class="">
mfg Daniel<br class="">
<br class="">
</blockquote></div>
<span id="gmail-m_1107731117827674348cid:f_k4u2uob40" class=""><dbcopy.json></span></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></div></body></html>