Hallo Andreas,
 
ein
 
pi@raspberrypi:~ $ php /var/www/volkszaehler.org/bin/doctrine orm:schema-tool:create --dump-sql
 The following SQL statements will be executed:
     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;
     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;
     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;
     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;
     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;
     ALTER TABLE aggregate ADD CONSTRAINT FK_B77949FF72F5A1AA FOREIGN KEY (channel_id) REFERENCES entities (id);
     ALTER TABLE entities_in_aggregator ADD CONSTRAINT FK_2BD88468727ACA70 FOREIGN KEY (parent_id) REFERENCES entities (id);
     ALTER TABLE entities_in_aggregator ADD CONSTRAINT FK_2BD88468DD62C21B FOREIGN KEY (child_id) REFERENCES entities (id);
     ALTER TABLE properties ADD CONSTRAINT FK_87C331C781257D5D FOREIGN KEY (entity_id) REFERENCES entities (id);
     ALTER TABLE data ADD CONSTRAINT FK_ADF3F36372F5A1AA FOREIGN KEY (channel_id) REFERENCES entities (id);

ist fehlerfrei durchgelaufen. An dem aggregate-Problem ändert das leider nichts ....
Was könnte ich noch versuchen ?
 
Bevor Du fragst:
 
pi@raspberrypi:~ $ php /var/www/volkszaehler.org/bin/doctrine orm:schema-tool:create --force
                                        
  The "--force" option does not exist.  
                                        

Beste Grüße
 
JD.
 
 
Sent: Sunday, November 08, 2020 at 4:53 PM
From: "Andreas Götz" <cpui...@gmail.com>
To: "volkszaehler.org - users" <volkszaehler-users@demo.volkszaehler.org>
Subject: Re: [vz-users] Neubeginn nach Kartencrash
Bis Du sicher, dass Deine Zieldatwnvank auch Indizes hat? Beim Restore werden die gelöscht um nicht an temporär Fehlenden Relationen zu scheitern. 
 
Hatten wir vmtl. auch schon: das Zauberwergzeug heisst orm schema-tool. 
 
Viele Grüße,
Andreas
 
Am 08.11.2020 um 16:25 schrieb John Doe <john...@null.net>:
 

Hallo zusammen,
 
mea culpa. Ihr hattet natürlich recht - ich musste mein Backup natürlich noch in die neu creierte Datenbank füllen.
Habe jetzt alles soweit wieder am Laufen - bis auf eine Kleinigkeit: Ich bekomme aggregate nicht zum Laufen.
 
vzlogger ist gestopt:
 
pi@raspberrypi:~ $ sudo systemctl status vzlogger.service
● vzlogger.service - vzlogger
   Loaded: loaded (/etc/systemd/system/vzlogger.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sun 2020-11-08 16:16:42 CET; 5min ago
  Process: 729 ExecStart=/usr/local/bin/vzlogger -c /etc/vzlogger.conf (code=killed, signal=KILL)
 Main PID: 729 (code=killed, signal=KILL)
Nov 08 16:14:49 raspberrypi systemd[1]: Started vzlogger.
Nov 08 16:15:01 raspberrypi systemd[1]: Stopping vzlogger...
Nov 08 16:16:42 raspberrypi systemd[1]: vzlogger.service: State 'stop-sigterm' timed out. Killing.
Nov 08 16:16:42 raspberrypi systemd[1]: vzlogger.service: Killing process 729 (vzlogger) with signal SIGKILL.
Nov 08 16:16:42 raspberrypi systemd[1]: vzlogger.service: Main process exited, code=killed, status=9/KILL
Nov 08 16:16:42 raspberrypi systemd[1]: vzlogger.service: Failed with result 'timeout'.
Nov 08 16:16:42 raspberrypi systemd[1]: Stopped vzlogger.
 
cron ist gestopt:
 
pi@raspberrypi:~ $ sudo systemctl status cron.service
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sun 2020-11-08 16:14:56 CET; 8min ago
     Docs: man:cron(8)
  Process: 407 ExecStart=/usr/sbin/cron -f $EXTRA_OPTS (code=killed, signal=TERM)
 Main PID: 407 (code=killed, signal=TERM)
Nov 08 16:14:35 raspberrypi systemd[1]: Started Regular background program processing daemon.
Nov 08 16:14:35 raspberrypi cron[407]: (CRON) INFO (pidfile fd = 3)
Nov 08 16:14:35 raspberrypi cron[407]: (CRON) INFO (Running @reboot jobs)
Nov 08 16:14:56 raspberrypi systemd[1]: Stopping Regular background program processing daemon...
Nov 08 16:14:56 raspberrypi systemd[1]: cron.service: Main process exited, code=killed, status=15/TERM
Nov 08 16:14:56 raspberrypi systemd[1]: cron.service: Succeeded.
Nov 08 16:14:56 raspberrypi systemd[1]: Stopped Regular background program processing daemon.
 
 
aggregate:
 
php /var/www/volkszaehler.org/bin/aggregate run -m full -l day -l hour -l minute
Performing 'full' aggregation on 'day' level
 [>---------------------------]   0%  < 1 sec/< 1 sec  0 channels
 
An diesem Zustand ändert sich über lange Zeit nichts.
 
Hat jemand einen Tip, woran das liegen könnte ?
 
Beste Grüße und Dank
 
JD.
Sent: Sunday, November 08, 2020 at 11:19 AM
From: "Andreas Goetz" <cpui...@gmail.com>
To: "volkszaehler.org - users" <volkszaehler-users@demo.volkszaehler.org>
Subject: Re: [vz-users] Neubeginn nach Kartencrash
Also mit create hast Du das Datenbankschema angelegt, das ist aber leer. Du musst auch die Daten noch reinkopieren ;)
 
Viele Grüße, Andreas 
 
Am 08.11.2020 um 11:05 schrieb John Doe <john...@null.net>:
 

Hallo Andreas,
 
ich bin ein Stück weiter.
Ein
 
sudo apt-get install php-sqlite3
 
liess das
 
sudo /var/www/volkszaehler.org/vendor/bin/dbcopy create -c /etc/dbcopy.yaml
 
fehlerfrei durchlaufen.
Allerdings scheint mir das Wiedereinspielen der gesicherten Datenbank (natürlich mit sqlite.db3 als source) irgendwie nichts zu finden:
 
pi@raspberrypi:~ $ sudo /var/www/volkszaehler.org/vendor/bin/dbcopy copy -c /etc/dbcopy.yaml
entities: copying 0 rows (overwrite)
    0 [>---------------------------] < 1 sec 4.0 MiB
properties: copying 0 rows (overwrite)
    0 [>---------------------------] < 1 sec 4.0 MiB
entities_in_aggregator: copying 0 rows (overwrite)
    0 [>---------------------------] < 1 sec 4.0 MiB
data: copying 0 rows (partial copy)
    0 [>---------------------------] < 1 sec 4.0 MiB
 
Hättest Du eine Idee, woran das liegen kann ?
Beste Grüße
 
JD:
Sent: Saturday, November 07, 2020 at 8:10 PM
From: "Andreas Götz" <cpui...@gmail.com>
To: "volkszaehler.org - users" <volkszaehler-users@demo.volkszaehler.org>
Subject: Re: [vz-users] Neubeginn nach Kartencrash
Ist ohne Deine Datei schwer zu sagen...
 
Viele Grüße,
Andreas
 
Am 07.11.2020 um 18:12 schrieb John Doe <john...@null.net>:
 

 

Hallo zusammen,
 
da ich mir leider doch das Vorgehen vom letzten Mal nicht notiert habe, fehlt mir jetzt wieder der Einstieg.
Ich habe
 
- eine Kopie sqlite.db3 der Datenbank
- eine Kopie der vzlogger.conf
- eine Kopie der dbcopy.yaml, mir der ich die Datenbank-Kopie erstellt habe.
 
Ich habe
 
- das aktuelle VZ-Image installiert und mit Updates versehen
- die Kopie sqlite.dpb3 in das neue Home-Verzeichnis kopiert
- die gesicherte vzlogger.conf und dbcopy.yaml nach /etc kopiert.
 
Ein Aufruf von
 
sudo /var/www/volkszaehler.org/vendor/bin/dbcopy create -c /etc/dbcopy.yaml
 
bringt
 
Creating target schema
PHP Notice:  Undefined variable: schema in /home/pi/volkszaehler.org/vendor/andig/dbcopy/src/Command/CreateCommand.php on line 155
PHP Fatal error:  Uncaught Error: Call to a member function toSql() on null in /home/pi/volkszaehler.org/vendor/andig/dbcopy/src/Command/CreateCommand.php:155
Stack trace:
#0 /home/pi/volkszaehler.org/vendor/symfony/console/Command/Command.php(255): DatabaseCopy\Command\CreateCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /home/pi/volkszaehler.org/vendor/symfony/console/Application.php(921): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/pi/volkszaehler.org/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(DatabaseCopy\Command\CreateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/pi/volkszaehler.org/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Co in /home/pi/volkszaehler.org/vendor/andig/dbcopy/src/Command/CreateCommand.php on line 155
 
 
Was mache ich denn diesmal wieder falsch ?
Beste Grüße
 
JD.

Antwort per Email an