<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hallo Frank,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>MariaDB [volkszaehler]> TRUNCATE TABLE volkszaehler.data;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Query OK, 0 rows affected (0.072 sec)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Dann:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>pi@SmartMeter:~ $ /var/www/volkszaehler.org/vendor/bin/dbcopy copy -c /etc/dbcopy_restore.yaml<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>entities: copying 7 rows (overwrite)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> [============================] 100% < 1 sec/< 1 sec 7 rows<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>properties: copying 63 rows (overwrite)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> [============================] 100% < 1 sec/< 1 sec 63 rows<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>entities_in_aggregator: copying 0 rows (overwrite)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> 0 [->--------------------------] < 1 sec 4.0 MiB<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>data: copying 7819821 rows (overwrite)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> [============================] 100% 1 sec/1 sec 7819821 rows<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>aggregate: skipping<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Nur Daten sind scheinbar keine in der DB. Zumindest werden im FE keine angezeigt. 1sec für </span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>7819821 Datensätze? Die angelegten Kanäle sind da:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>MariaDB [volkszaehler]> select * from entities;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>+----+--------------------------------------+--------------------+---------+<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| id | uuid | type | class |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>+----+--------------------------------------+--------------------+---------+<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 2 | f26a3af0-a10d-11ea-a487-7d0e2c482631 | electric meter | channel |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 3 | 18688710-a10e-11ea-8ceb-61be7fd3ccbe | powersensor | channel |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 10 | 65f77e50-c388-11ea-a32c-f99381422d2a | workinghours | channel |<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 11 | 58842ff0-c38e-11ea-88ab-9b09e85c4c6e | power | channel |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 12 | d96e01b0-c392-11ea-8bfa-39ff07b6acb0 | virtualconsumption | channel |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 14 | 70919b00-c5f8-11ea-8152-ed29ae9e5e38 | temperature | channel |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>| 15 | b7a82280-d496-11ea-9c22-431f1d1ba5b0 | gas | channel |<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>+----+--------------------------------------+--------------------+---------+<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>7 rows in set (0.001 sec)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Grüße<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Micha</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> volkszaehler-users [mailto:volkszaehler-users-bounces@demo.volkszaehler.org] <b>Im Auftrag von </b>Frank Richter<br><b>Gesendet:</b> Samstag, 21. November 2020 17:48<br><b>An:</b> volkszaehler.org - users<br><b>Betreff:</b> Re: [vz-users] Image mit dd erstellen / Datenbackup<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Versuch mal trotzdem vorher auf dem Zielsystem:<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>TRUNCATE TABLE volkszaehler.data;<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Michael Hartmann <<a href="mailto:hartmann-micha@web.de">hartmann-micha@web.de</a>> schrieb am Sa., 21. Nov. 2020, 17:26:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hallo Frank,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>konkret: leer!</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Das Testsystem hat keine HW. vzlogger empfängt keine Werte, kann also auch keine Daten schreiben oder? Ich hänge die dbcopy config an.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Grüße</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Micha</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> volkszaehler-users [mailto:<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" target="_blank">volkszaehler-users-bounces@demo.volkszaehler.org</a>] <b>Im Auftrag von </b>Frank Richter<br><b>Gesendet:</b> Samstag, 21. November 2020 17:01<br><b>An:</b> <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> - users<br><b>Betreff:</b> Re: [vz-users] Image mit dd erstellen / Datenbackup</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hallo Michael,<o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>was heißt den "weitgehend leer"? Hast du den Restore-Versuch gemacht, bevor du vzlogger neue Daten in die DB schreiben lässt?<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Viele Grüße<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Frank<o:p></o:p></p></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Michael Hartmann <<a href="mailto:hartmann-micha@web.de" target="_blank">hartmann-micha@web.de</a>> schrieb am Sa., 21. Nov. 2020, 16:27:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'>Ich habe nun das Testsystem mit dem Image das im Wiki zum DL bereitsteht komplett neu aufgebaut. Update vzlogger, middleware/frontend, alle Konfigurationen ...<br><br>Auf diesem System sollte sich eine weitgehend leere Datenbank befinden. Und das Ergebnis beim zurückspielen der Daten ist genau das gleiche!<br><br>----------------------------------------------------------<br>pi@SmartMeter:/usr/local/bin $ /var/www/<a href="http://volkszaehler.org/vendor/bin/dbcopy" target="_blank">volkszaehler.org/vendor/bin/dbcopy</a> copy -c /etc/dbcopy_restore.yaml<br>Dropping FK FK_87C331C781257D5D on properties<br>Dropping FK FK_2BD88468727ACA70 on entities_in_aggregator<br>Dropping FK FK_2BD88468DD62C21B on entities_in_aggregator<br>Dropping FK FK_ADF3F36372F5A1AA on data<br>Dropping FK FK_B77949FF72F5A1AA on aggregate<br>entities: copying 7 rows (overwrite)<br> [============================] 100% < 1 sec/< 1 sec 7 rows<br><br>properties: copying 63 rows (overwrite)<br> [============================] 100% < 1 sec/< 1 sec 63 rows<br><br>entities_in_aggregator: copying 0 rows (overwrite)<br> 0 [->--------------------------] < 1 sec 6.0 MiB<br><br>data: copying 7819821 rows (partial copy)<br> [>---------------------------] 0% < 1 sec/< 1 sec 0 rows<br>In AbstractMySQLDriver.php line 74:<br><br> An exception occurred while executing 'INSERT INTO `data` (`id`,`channel_id`,`timestamp`,`value`) VALUES<br> (?,?,?,?)' with params ["1", "2", "1590761781023", "826598.2"]:<br><br> SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'<br><br><br>In Exception.php line 18:<br><br> SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'<br><br><br>In PDOStatement.php line 115:<br><br> SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'<br><br><br>copy [-c|--config CONFIG] [-b|--batch BATCH] [-k|--keep-constraints] [--] [<tables>...]<br>---------------------------------------------------------------------<br><br>Und nun :-/<br><br>Grüße<br><br>Micha<br><br>-----Ursprüngliche Nachricht-----<br>Von: volkszaehler-users [mailto:<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" target="_blank">volkszaehler-users-bounces@demo.volkszaehler.org</a>] Im Auftrag von Thomas Höpfner<br>Gesendet: Freitag, 20. November 2020 19:31<br>An: <a href="http://volkszaehler.org" target="_blank">volkszaehler.org</a> - users<br>Betreff: Re: [vz-users] Image mit dd erstellen / Datenbackup<br><br>Hallo Micha,<br><br>> Am 20.11.2020 um 17:45 schrieb Michael Hartmann <<a href="mailto:hartmann-micha@web.de" target="_blank">hartmann-micha@web.de</a>>:<br>> <br>> Copy statt pk für die Daten in dbcopy.yaml hatte ich auf Daniels Anregung vor ein paar Tagen bereits probiert und das Ergebnis hier berichtet: gleicher Fehler!<br><br>auch beim backup?<br><br>Irgendwie glaube ich an einen Fehler in deiner aktiven DB. <br>Werden fehler angezeigt wenn du auf der console<br> :~# mysqlcheck -p --check volkszaehler <br>ausführst?<br><br>Im Moment habe ich kein System um mein Backup zu testen, aber dein Weg sollte funktionieren. <br><br>Thomas <br><br><o:p></o:p></p></blockquote></div></div></div></blockquote></div></div></body></html>