<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">In dem Fall kannst Du den Restore Prozess einfach nochmal anstarten. Die große Tabelle ist data, die wird dann nur schrittweise kopiert.</div><div dir="ltr"><br></div><div dir="ltr">Aber zur Sicherheit: Du hast nicht noch parallel vzlogger gegen die neue (Ziel-)Datenbank laufen? Es wundert mich doch sehr dass es da einen Deadlock in MySQL gibt.</div><div dir="ltr"><br></div><div dir="ltr">Viele Grüße, </div><div dir="ltr">Andreas</div><div dir="ltr"><br></div><div dir="ltr"><blockquote type="cite">Am 10.06.2020 um 11:52 schrieb John Doe <johndoe@null.net>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div style="font-family: Verdana;font-size: 12.0px;"><div>Schade, zu früh gefreut:</div>
<div> </div>
<div>
<div>data: copying 29003424 rows (partial copy)<br>
[>---------------------------] 2% 3 mins/2 hrs 629000 rows<br>
In AbstractMySQLDriver.php line 34:<br>
<br>
An exception occurred while executing 'INSERT INTO `data` (`id`,`channel_id`,`timestamp`,`value`) VALUES (?,?,?,?)' with params [ <br>
"629070", "1", "1560170157864", "52342.2111"]: <br>
<br>
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction <br>
</div>
<div>In PDOStatement.php line 119:<br>
<br>
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction <br>
</div>
<div>In PDOStatement.php line 117:<br>
<br>
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction <br>
</div>
<div>copy [-c|--config CONFIG] [-b|--batch BATCH] [-k|--keep-constraints] [--] [<tables>...]</div>
<div> </div>
<div>Grüße</div>
<div> </div>
<div>JD.</div>
</div>
<div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Wednesday, June 10, 2020 at 11:49 AM<br>
<b>From:</b> "John Doe" <johndoe@null.net><br>
<b>To:</b> volkszaehler-users@demo.volkszaehler.org<br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div name="quoted-content">
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo Andreas,</div>
<div> </div>
<div>das sieht besser aus:</div>
<div> </div>
<div>
<div>pi@raspberrypi:~/volkszaehler.org $ bin/doctrine orm:schema-tool:create</div>
<div> ! <br>
! [CAUTION] This operation should not be executed in a production environment! <br>
! </div>
<div> Creating database schema...</div>
<div> <br>
[OK] Database schema created successfully! </div>
<div> </div>
<div>Aktuell wird die Datenbank kopiert, daher melde ich mich in zwei Stunden mit dem Ergebnis.</div>
<div>Bis dahin erst mal tausend Dank !</div>
<div>Grüße</div>
<div> </div>
<div>JD.</div>
</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Wednesday, June 10, 2020 at 11:34 AM<br>
<b>From:</b> "Andreas Goetz" <cpuidle@gmail.com><br>
<b>To:</b> "volkszaehler.org - users" <volkszaehler-users@demo.volkszaehler.org><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>OK, dann ohne das —force. Alternativ kannst Du auch (falls das Schema in Teilen existiert) ein inkrementelles Update machen:
<div> </div>
<div>bin/doctrine orm:schema-tool:update
<div> </div>
<div>Viele Grüße, Andreas</div>
<div>
<blockquote>
<div>On 10. Jun 2020, at 11:20, John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo Andreas,</div>
<div> </div>
<div>gerne:</div>
<div> </div>
<div>
<div>pi@raspberrypi:~/<a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> $ bin/doctrine orm:schema-tool:create --dump-sql</div>
<div> The following SQL statements will be executed:</div>
<div> CREATE TABLE aggregate (id INT AUTO_INCREMENT NOT NULL, channel_id INT DEFAULT NULL, type SMALLINT NOT NULL, timestamp BIGINT NOT NULL, value DOUBLE PRECISION NOT NULL, count INT NOT NULL, INDEX IDX_B77949FF72F5A1AA (channel_id), UNIQUE INDEX aggregate_unique (channel_id, type, timestamp), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;<br>
CREATE TABLE entities (id INT AUTO_INCREMENT NOT NULL, uuid VARCHAR(36) NOT NULL, type VARCHAR(255) NOT NULL, class VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_50EC64E5D17F50A6 (uuid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;<br>
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>
CREATE TABLE properties (id INT AUTO_INCREMENT NOT NULL, entity_id INT DEFAULT NULL, pkey VARCHAR(255) NOT NULL, value LONGTEXT NOT NULL, INDEX IDX_87C331C781257D5D (entity_id), UNIQUE INDEX property_unique (entity_id, pkey), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;<br>
CREATE TABLE data (id INT AUTO_INCREMENT NOT NULL, channel_id INT DEFAULT NULL, timestamp BIGINT NOT NULL, value DOUBLE PRECISION NOT NULL, INDEX IDX_ADF3F36372F5A1AA (channel_id), UNIQUE INDEX data_unique (channel_id, timestamp), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;<br>
ALTER TABLE aggregate ADD CONSTRAINT FK_B77949FF72F5A1AA FOREIGN KEY (channel_id) REFERENCES entities (id);<br>
ALTER TABLE entities_in_aggregator ADD CONSTRAINT FK_2BD88468727ACA70 FOREIGN KEY (parent_id) REFERENCES entities (id);<br>
ALTER TABLE entities_in_aggregator ADD CONSTRAINT FK_2BD88468DD62C21B FOREIGN KEY (child_id) REFERENCES entities (id);<br>
ALTER TABLE properties ADD CONSTRAINT FK_87C331C781257D5D FOREIGN KEY (entity_id) REFERENCES entities (id);<br>
ALTER TABLE data ADD CONSTRAINT FK_ADF3F36372F5A1AA FOREIGN KEY (channel_id) REFERENCES entities (id);</div>
<div> </div>
<div> </div>
<div>
<div>pi@raspberrypi:~/<a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> $ bin/doctrine orm:schema-tool:create —force</div>
<div> <br>
Too many arguments, expected arguments "command". <br>
</div>
<div>orm:schema-tool:create [--dump-sql]</div>
<div> </div>
<div>Grüße</div>
<div> </div>
<div>JD.</div>
</div>
<div> </div>
</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Wednesday, June 10, 2020 at 10:48 AM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>Mhhm, alles sehr merkwürdig. Versuch bitte nochmal das Schema im Ziel anzulegen:
<div> </div>
<div>bin/<span style="font-family: Verdana;font-size: 12.0px;">doctrine orm:schema-tool:create --dump-sql </span></div>
<div> </div>
<div><font face="Verdana"><span style="font-size: 12.0px;">Output bitte zeigen. Dann:</span></font></div>
<div> </div>
<div>bin/<font face="Verdana"><span style="font-size: 12.0px;">doctrine orm:schema-tool:create —force</span></font></div>
<div> </div>
<div><font face="Verdana"><span style="font-size: 12.0px;">zum anlegen.</span></font></div>
<div> </div>
<div><font face="Verdana"><span style="font-size: 12.0px;">Vielen Dank, Andreas</span></font></div>
<div>
<div>
<div>
<blockquote>
<div>On 10. Jun 2020, at 10:44, John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo Andreas,</div>
<div> </div>
<div>
<div>das scheint zunächst zu klappen:</div>
<div> </div>
<div>pi@raspberrypi:~ $ /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy" target="_blank">volkszaehler.org/vendor/bin/dbcopy</a> create -c /etc/dbcopy.yaml<br>
Creating target schema<br>
Creating tables<br>
Updating schema assets for target platform compatibility: sqlite</div>
<div> </div>
<div>Die dbcopy.yaml:</div>
<div> </div>
<div>
<div># DATABASE DEFINITION<br>
source:<br>
driver: pdo_mysql<br>
host: localhost<br>
user: vz<br>
password: demo<br>
dbname: volkszaehler</div>
<div>target:<br>
driver: pdo_sqlite<br>
host: localhost<br>
user: root<br>
password: raspberry<br>
dbname: volkszaehler_backup<br>
path: sqlite.db3 # path is only used if driver = pdo_sqlite<br>
<br>
# influxdb target database connection<br>
influx:<br>
dsn: <a>influxdb://localhost:8086</a><br>
dbname: volkszaehler<br>
measurement: data<br>
<br>
# TABLE DEFINITION<br>
# ----------------<br>
# tables will be processed in the order they are mentioned:<br>
# - foreign keys on target will be dropped<br>
# - if a table is not listed here, it will not be touched<br>
# transfer mode<br>
# skip: table will not be copied<br>
# copy: entire table will be truncated on target and copied from source<br>
# pk: selective copy by primary key. only data not present on target<br>
# will be copied from source.<br>
tables:<br>
entities: copy<br>
properties: copy<br>
entities_in_aggregator: copy<br>
data: pk<br>
aggregate: skip</div>
<div> </div>
<div>Bei Vertauschung von sorec und target passiert leider das:</div>
<div> </div>
<div>
<div>pi@raspberrypi:~ $ /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy" target="_blank">volkszaehler.org/vendor/bin/dbcopy</a> copy -c /etc/dbcopy.yaml</div>
<div>In CopyCommand.php line 49:<br>
<br>
Table entities doesn't exist.To create the schema run <br>
<br>
doctrine.php orm:schema-tool:create --dump-sql <br>
</div>
<div>copy [-c|--config CONFIG] [-b|--batch BATCH] [-k|--keep-constraints] [--] [<tables>...]</div>
<div> </div>
<div>Hättest Du noch einen Tip, oder ist mein Backup verloren ?</div>
<div>Grüße</div>
<div> </div>
<div>JD.</div>
</div>
</div>
</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Wednesday, June 10, 2020 at 10:35 AM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>Klar:
<div> </div>
<div>
<div>❯ ./vendor/bin/dbcopy </div>
<div>Database backup tool</div>
<div> </div>
<div>Usage:</div>
<div> command [options] [arguments]</div>
<div> </div>
<div>Options:</div>
<div> -h, --help Display this help message.</div>
<div> </div>
<div>Available commands:</div>
<div> clear Clear target tables</div>
<div> copy Run copy</div>
<div> create Create target schema</div>
<div> drop Drop target schema</div>
<div> help Displays help for a command</div>
<div> influx Copy data to InfluxDB</div>
<div> list Lists commands</div>
<div> </div>
<div>create wäre in diesem Fall das Kommando der Wahl!</div>
<div> </div>
<div>Viele Grüße, Andreas</div>
<div>
<blockquote>
<div>On 10. Jun 2020, at 09:52, John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo zusammen,</div>
<div> </div>
<div>ein</div>
<div> </div>
<div>DROP DATABASE volkszaehler;</div>
<div>CREATE DATABASE volkszaehler;</div>
<div> </div>
<div>hat nun leider zur Folge, das nach dem Wiederherstellen meines Backups mit</div>
<div> </div>
<div>sudo /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy" target="_blank">volkszaehler.org/vendor/bin/dbcopy</a> copy -c /etc/dbcopy.yaml</div>
<div> </div>
<div>meine Kanäle weg sind.</div>
<div>Hat noch jemand einen Tip, wie ich meine alten Daten wieder herstellen kann ?</div>
<div>Beste Grüße</div>
<div> </div>
<div>JD.</div>
<div> </div>
<div> </div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Tuesday, June 09, 2020 at 7:07 PM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>
<div>Sieht aus als wären die Daten schon vorhanden (duplicate key)- hattest Du die Zieldatenbank denn wieder leer gemacht?</div>
<div> </div>
<div>Viele Grüße, Andreas </div>
<div>
<blockquote>Am 09.06.2020 um 19:02 schrieb John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>>:<br>
</blockquote>
</div>
<blockquote>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo Andreas,</div>
<div> </div>
<div>es scheint prinzipiell am User, unabhängig vom PW zu liegen:</div>
<div> </div>
<div>
<div>mysql -u root -h localhost volkszaehler<br>
ERROR 1698 (28000): Access denied for user 'root'@'localhost'</div>
<div> </div>
<div>127.0.0.1 führt zum gleichen Ergebnis.</div>
<div>Mit</div>
<div> </div>
<div>sudo mysql -u root -h localhost volkszaehler</div>
<div> </div>
<div>klappt das Ganze. Leider hängt es nun hier:</div>
<div> </div>
<div>
<div>data: copying 28925979 rows (partial copy)<br>
[>---------------------------] 0% < 1 sec/< 1 sec 0 rows<br>
In AbstractMySQLDriver.php line 55:<br>
<br>
An exception occurred while executing 'INSERT INTO `data` (`id`,`channel_id`,`timestamp`,`value`) VALUES (?, <br>
?,?,?)' with params ["77446", "1", "1559552806523", "52268.478"]: <br>
<br>
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '77446' for key 'PRIMARY' <br>
</div>
<div>In PDOStatement.php line 119:<br>
<br>
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '77446' for key 'PRIMARY' <br>
</div>
<div>In PDOStatement.php line 117:<br>
<br>
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '77446' for key 'PRIMARY' <br>
</div>
<div>copy [-c|--config CONFIG] [-b|--batch BATCH] [-k|--keep-constraints] [--] [<tables>...]</div>
<div> </div>
<div>Grüße</div>
<div> </div>
<div>JD.</div>
</div>
<div> </div>
</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Tuesday, June 09, 2020 at 6:07 PM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>
<div>
<blockquote>
<div>On 9. Jun 2020, at 17:28, John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo Andreas,</div>
<div> </div>
<div>das klappt nicht:</div>
<div> </div>
<div>
<div>pi@raspberrypi:~ $ /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy" target="_blank">volkszaehler.org/vendor/bin/dbcopy</a> copy -c /etc/dbcopy.yaml</div>
<div>In AbstractMySQLDriver.php line 106:<br>
<br>
An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' <br>
</div>
<div>In PDOConnection.php line 31:<br>
<br>
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' <br>
</div>
<div>In PDOConnection.php line 27:<br>
<br>
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' <br>
</div>
<div>copy [-c|--config CONFIG] [-b|--batch BATCH] [-k|--keep-constraints] [--] [<tables>...]</div>
<div> </div>
<div> </div>
<div>Ich bin mir hundertprozentig sicher, dass die user/pw-Kombi stimmt ...</div>
</div>
</div>
</div>
</div>
</blockquote>
<div> </div>
Das ist…. sehr unwahrscheinlich. Was passiert denn beim Login auf der Kommandozeile mit der gleichen Kombination (<a href="https://stackoverflow.com/questions/5131931/connecting-to-mysql-from-the-command-line" target="_blank">https://stackoverflow.com/questions/5131931/connecting-to-mysql-from-the-command-line</a>)?</div>
<div> </div>
<div>Evtl. liegt es auch an <a href="https://github.com/volkszaehler/volkszaehler.org/pull/799" target="_blank">https://github.com/volkszaehler/volkszaehler.org/pull/799</a>? </div>
<div> </div>
<div>Viele Grüße, Andreas</div>
<div>
<blockquote>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>Grüße</div>
<div> </div>
<div>JD.</div>
</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Tuesday, June 09, 2020 at 5:18 PM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>Sieht nicht offensichtlich falsch aus. Falls sie im Backup ist könntest Du auch noch die aggregate Tabelle kopieren, anderenfalls müsstest Du die im Ziel neu erstellen, sinnigerweise bevor Du Aggregation wieder einschaltest (sonst könnten sich die SQL Queries dazu aufstapeln).
<div> </div>
<div>Viele Grüße, Andreas</div>
<div>
<div>
<blockquote>
<div>On 9. Jun 2020, at 17:13, John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Okay, letzte Frage: Passt das so, bevor ich starte?</div>
<div> </div>
<div>
<div># DATABASE DEFINITION<br>
source:<br>
#driver: pdo_mysql<br>
driver: pdo_sqlite<br>
#host: localhost<br>
#user: vz<br>
#password: demo<br>
#dbname: volkszaehler<br>
path: sqlite.db3<br>
target:<br>
driver: pdo_mysql<br>
host: localhost<br>
user: root<br>
password: raspberry<br>
dbname: volkszaehler<br>
#path: sqlite.db3 # path is only used if driver = pdo_sqlite</div>
<div># influxdb target database connection<br>
influx:<br>
dsn: <a>influxdb://localhost:8086</a><br>
dbname: volkszaehler<br>
measurement: data</div>
<div># TABLE DEFINITION<br>
# ----------------<br>
# tables will be processed in the order they are mentioned:<br>
# - foreign keys on target will be dropped<br>
# - if a table is not listed here, it will not be touched<br>
# transfer mode<br>
# skip: table will not be copied<br>
# copy: entire table will be truncated on target and copied from source<br>
# pk: selective copy by primary key. only data not present on target<br>
# will be copied from source.<br>
tables:<br>
entities: copy<br>
properties: copy<br>
entities_in_aggregator: copy<br>
data: pk<br>
aggregate: skip</div>
<div> </div>
<div> </div>
<div>Beste Grüße</div>
<div> </div>
<div>JD.</div>
</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Tuesday, June 09, 2020 at 5:02 PM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>
<div>Ja genau- und mach auch von der „neuen“ Quelle vorher noch ein Backup! Better be safe than sorry...</div>
<div> </div>
<div>Viele Grüße, Andreas</div>
<div> </div>
<div>
<blockquote>Am 09.06.2020 um 17:00 schrieb John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>>:<br>
</blockquote>
</div>
<blockquote>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo Andreas,</div>
<div> </div>
<div>danke für die schnelle Reaktion.</div>
<div>Dann opfere ich logischerweise den kleineren Datensatz.</div>
<div>Die GrundIdee mit dem Vertauschen von Quelle und Ziel klappt aber dann ?</div>
<div>Beste Grüße</div>
<div> </div>
<div>JD.</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Tuesday, June 09, 2020 at 4:46 PM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>Hi,
<div>
<blockquote>
<div>On 9. Jun 2020, at 16:43, John Doe <<a href="mailto:johndoe@null.net" target="_blank">johndoe@null.net</a>> wrote:</div>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hallo zusammen,</div>
<div> </div>
<div>bevor ich jetzt wieder Mist mit der Datenbank mache, würde ich gerne hier nachfragen.</div>
<div> </div>
<div>1. Neuer aufgesetzter VZ läuft zunächst mal wieder auf einem RPi3 wie gewünscht.</div>
<div>2. dbcopy läuft auch, ich kann lokal eine sqlite.db3 anlegen.</div>
<div>3. Da ich noch die Sicherung der alten DB habe (ebenfalls sqlite.db3), würde ich diese mit der aktuellen gerne "mergen". Kann ich das einfach doof und hoffentlich gefahrlos tun, indem ich in der dbcopy.yaml Quelle und Ziel vertausche ? Bleiben meine aktuell schon vorliegenden Daten existent ?</div>
</div>
</div>
</div>
</blockquote>
<div> </div>
Das kannst Du auf KEINEN Fall tun:</div>
<div> </div>
<div>- es gibt keinen “merge” Prozess</div>
<div>- in beiden Datenbanken werden die gleichen IDs existieren</div>
<div>- die Entities werden bei Default Einstellungen überschrieben</div>
<div> </div>
<div>—> vmtl. Desaster</div>
<div> </div>
<div>DBCopy ist ausschließlich dafür geeignet, “linear” von einer DB in eine andere DB zu kopieren die ein Subset der identischen Daten enthält. Bei Dir scheinen aber in beiden DBs disjunkte Datenbestände zu liegen- Du wirst nicht drum herum kommen einen der DB-Stände zu opfern.</div>
<div> </div>
<div>Viele Grüße, </div>
<div>Andreas</div>
<div>
<blockquote>
<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div> </div>
<div>Beste Grüße</div>
<div> </div>
<div>JD.</div>
<div>
<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b> Tuesday, June 09, 2020 at 9:24 AM<br>
<b>From:</b> "Andreas Goetz" <<a href="mailto:cpuidle@gmail.com" target="_blank">cpuidle@gmail.com</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</div>
<div>
<div>Hallo Christian,
<div>
<blockquote>
<div>On 8. Jun 2020, at 19:46, Christian Wimmer <<a href="mailto:christian@nega.at" target="_blank">christian@nega.at</a>> wrote:</div>
<div>
<div class="WordSection1" style="page: WordSection1;font-family: Helvetica;font-size: 14.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;text-decoration: none;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span>Hallo JD</span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span> </span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span>Danke, das hört sich gut an. Ich verwende nur Sandisk.</span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span> </span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span>Am liebsten würde ich ja die DB auf das NAS auslagern, so dass nur dort geschrieben wird.</span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span>Aber das liest sich alles so kompliziert.</span></div>
</div>
</div>
</blockquote>
<div> </div>
Jetzt verbreitest Du aber ziemliche Panik ;)</div>
<div> </div>
<div>Eine Datenbank auf dem NAS zu nutzen statt einer Datenbank auf dem Raspi bedeutet einfach nur die Konfigurationsdatei zu ändern (URL, User, Passwort). Wenn Du z.B. schon ein Backup auf dem NAS hättest könnte das direkt Deine “Haupt”Datenbank werden (brauchst Du dann natürlich ein neues Backup).</div>
<div> </div>
<div>Viele Grüße, </div>
<div>Andreas</div>
<div> </div>
<div>
<blockquote>
<div class="WordSection1" style="page: WordSection1;font-family: Helvetica;font-size: 14.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;text-decoration: none;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"> </div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"> </div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span> </span></div>
<div>
<div style="border-style: solid none none;border-top-width: 1.0pt;border-top-color: rgb(225,225,225);padding: 3.0pt 0.0cm 0.0cm;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><b><span>Von:</span></b><span><span class="Apple-converted-space"> </span>volkszaehler-users <<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" target="_blank">volkszaehler-users-bounces@demo.volkszaehler.org</a>><span class="Apple-converted-space"> </span><b>Im Auftrag von<span class="Apple-converted-space"> </span></b>John Doe<br>
<b>Gesendet:</b><span class="Apple-converted-space"> </span>Montag, 8. Juni 2020 19:15<br>
<b>An:</b><span class="Apple-converted-space"> </span><a href="mailto:volkszaehler-users@demo.volkszaehler.org" target="_blank">volkszaehler-users@demo.volkszaehler.org</a><br>
<b>Betreff:</b><span class="Apple-converted-space"> </span>Re: [vz-users] Bevorstehender Kartencrash</span></div>
</div>
</div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"> </div>
<div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Hallo Christian,</span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">das hängt wohl auch von der Aggregation-Time ab. Ich glaube aber tendenziell ausgemacht zu haben, dass Sandisk-Karten bei gleicher vzlogger.conf länger halten als Transcend. Erstere lief bei mir über Jahre, letztere einige Monate bis ca. halbes Jahr.</span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Beste Grüße</span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">JD.</span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div style="border-style: none none none solid;border-left-width: 1.5pt;border-left-color: rgb(195,217,229);padding: 0.0cm 0.0cm 0.0cm 8.0pt;margin: 7.5pt 3.75pt 3.75pt 7.5pt;">
<div style="margin-bottom: 7.5pt;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><b><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Sent:</span></b><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> Monday, June 08, 2020 at 6:13 PM<br>
<b>From:</b> "Christian Wimmer" <<a href="mailto:christian@nega.at" style="color: blue;text-decoration: underline;" target="_blank">christian@nega.at</a>><br>
<b>To:</b> "<a href="http://volkszaehler.org/" target="_blank">volkszaehler.org</a> - users" <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" style="color: blue;text-decoration: underline;" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Subject:</b> Re: [vz-users] Bevorstehender Kartencrash</span></div>
</div>
<div>
<div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Hallo</span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Frage zwischendurch: wie lange hält im Durchschnitt eine SD-Karte?</span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div>
<div style="border-style: solid none none;border-top-width: 1.0pt;border-top-color: rgb(225,225,225);padding: 3.0pt 0.0cm 0.0cm;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><b><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Von:</span></b><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"><span class="Apple-converted-space"> </span>volkszaehler-users <<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" style="color: blue;text-decoration: underline;" target="_blank">volkszaehler-users-bounces@demo.volkszaehler.org</a>><span class="Apple-converted-space"> </span><b>Im Auftrag von<span class="Apple-converted-space"> </span></b>Andreas Goetz<br>
<b>Gesendet:</b><span class="Apple-converted-space"> </span>Montag, 8. Juni 2020 17:34<br>
<b>An:</b><span class="Apple-converted-space"> </span>volkszaehler-users <<a href="mailto:volkszaehler-users@demo.volkszaehler.org" style="color: blue;text-decoration: underline;" target="_blank">volkszaehler-users@demo.volkszaehler.org</a>><br>
<b>Betreff:</b><span class="Apple-converted-space"> </span>Re: [vz-users] Bevorstehender Kartencrash</span></div>
</div>
</div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Servus</span></div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><br>
<span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<blockquote style="margin-top: 5.0pt;margin-bottom: 5.0pt;">
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">On 8. Jun 2020, at 16:38, Daniel Lauckner <<a href="mailto:vz@jahp.de" style="color: blue;text-decoration: underline;" target="_blank">vz@jahp.de</a>> wrote:</span></div>
</div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Hallo,<br>
<br>
<br>
am Montag, 8. Juni 2020 um 11:02 hat John Doe geschrieben:<br>
</span></div>
<blockquote style="margin-top: 5.0pt;margin-bottom: 5.0pt;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Gibt es ein wiki zum Docker-Image und dessen Installation ?</span></div>
</blockquote>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><br>
<span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Nein.</span></div>
</div>
</div>
</blockquote>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
</div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Also “Installation” ist ja bei Docker relativ :). Wenn Du schmerzresistent bist (und es am Ende dokumentieren möchtest) lass es uns gerne zusammen ausprobieren ;). Das Image heißt volkszaehler/volkszaehler, die Oberfläche+API lauscht dann auf 8080. Die Configdatei muss nach </span><span style="font-size: 9.0pt;font-family: Consolas;color: rgb(36,41,46);background-color: white;">/vz/etc/middleware.json<span class="Apple-converted-space"> </span></span><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">gemappt werden.</span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
</div>
<div>
<blockquote style="margin-top: 5.0pt;margin-bottom: 5.0pt;">
<div>
<div>
<blockquote style="margin-top: 5.0pt;margin-bottom: 5.0pt;">
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Falls ich Deinen Weg mit der Datenbank-Installation auf dem NAS<br>
gehe: Welche DB-Software würdest Du vorschlagen ? </span></div>
</blockquote>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><br>
<span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Am besten die SQL-Datenbank was das NAS anbietet.<br>
Üblicherweise MySQL oder MariaDB.</span></div>
</div>
</div>
</blockquote>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
</div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">…oder einfach auch einen Docker Container mit Volume Mount für die Datenablage. Normalerweise sind diese Images deutlich besser als jede NAS-gebundelte Funktionalität und bekommen auch häufigere Updates.</span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><br>
<span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
<blockquote style="margin-top: 5.0pt;margin-bottom: 5.0pt;">
<div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Mit freundlichen Grüßen</span></div>
</div>
</div>
</blockquote>
<blockquote style="margin-top: 5.0pt;margin-bottom: 5.0pt;">
<div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Daniel</span></div>
</div>
</div>
</blockquote>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;"> </span></div>
</div>
<div>
<div style="font-size: 11.0pt;font-family: Calibri , sans-serif;"><span style="font-size: 9.0pt;font-family: Verdana , sans-serif;">Viele Grüße, Andreas</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div>
</div></blockquote></body></html>