[vz-users] Probleme beim Datenbank-BackUp

Frank Richter frank.richter83 at gmail.com
Thu Jun 13 22:35:32 CEST 2019


update war falsch, sorry. Hatte nicht nachgeschaut. Korrekt ist backup.

Also nicht dbcopy create, sondern dbcopy backup. Steht übrigens auch im
Wiki...


Am Do., 13. Juni 2019 um 22:31 Uhr schrieb John Doe <johndoe at null.net>:

> Hallo Frank,
>
> ein Update von was denn?
> Und woher kommt der Fehler?
> Grüße,
>
> JD.
>
> > Sent: Thursday, June 13, 2019 at 9:14 PM
> > From: "Frank Richter" <frank.richter83 at gmail.com>
> > To: "volkszaehler.org - users" <volkszaehler-users at demo.volkszaehler.org
> >
> > Subject: Re: [vz-users] Probleme beim Datenbank-BackUp
> >
> > Die Fehlermeldung ist eigentlich eindeutig: die Tabelle gibt's schon,
> also
> > ist create der falsche Befehl. Ich glaub update müsste passen.
> >
> > Grüße
> > Frank
> >
> > John Doe <johndoe at null.net> schrieb am Do., 13. Juni 2019, 20:00:
> >
> > > Hallo zusammen,
> > >
> > > mein Problem nach dem rpi-update hat sich durch ein aktuelles
> rpi-update
> > > erledigt, alles läuft soweit wieder.
> > > Leider habe ich jetzt wieder ein Problem mit dem Backup der Datenbank:
> > >
> > >  sudo /var/www/volkszaehler.org/vendor/bin/dbcopy create -c
> > > /etc/dbcopy.yaml
> > > Creating target schema
> > > Creating tables
> > > Updating schema assets for target platform compatibility: sqlite
> > > table: aggregate
> > > table: data
> > > table: entities
> > > table: entities_in_aggregator
> > > table: properties
> > > CREATE TABLE aggregate (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
> > > channel_id INTEGER DEFAULT NULL, type SMALLINT NOT NULL, timestamp
> BIGINT
> > > NOT NULL, value DOUBLE PRECISION NOT NULL, count INTEGER NOT NULL,
> > > CONSTRAINT FK_B77949FF72F5A1AA FOREIGN KEY (channel_id) REFERENCES
> entities
> > > (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
> > > CREATE UNIQUE INDEX aggregate_unique ON aggregate (channel_id, type,
> > > timestamp)
> > > CREATE INDEX IDX_B77949FF72F5A1AA ON aggregate (channel_id)
> > > CREATE TABLE data (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
> > > channel_id INTEGER DEFAULT NULL, timestamp BIGINT NOT NULL, value
> DOUBLE
> > > PRECISION NOT NULL, CONSTRAINT FK_ADF3F36372F5A1AA FOREIGN KEY
> (channel_id)
> > > REFERENCES entities (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
> > > CREATE UNIQUE INDEX data_unique ON data (channel_id, timestamp)
> > > CREATE INDEX IDX_ADF3F36372F5A1AA ON data (channel_id)
> > > CREATE TABLE entities (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
> uuid
> > > VARCHAR(36) NOT NULL, type VARCHAR(255) NOT NULL, class VARCHAR(255)
> NOT
> > > NULL)
> > > CREATE UNIQUE INDEX UNIQ_50EC64E5D17F50A6 ON entities (uuid)
> > > CREATE TABLE entities_in_aggregator (parent_id INTEGER NOT NULL,
> child_id
> > > INTEGER NOT NULL, PRIMARY KEY(parent_id, child_id), CONSTRAINT
> > > FK_2BD88468727ACA70 FOREIGN KEY (parent_id) REFERENCES entities (id)
> NOT
> > > DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_2BD88468DD62C21B FOREIGN
> KEY
> > > (child_id) REFERENCES entities (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
> > > CREATE INDEX IDX_2BD88468727ACA70 ON entities_in_aggregator (parent_id)
> > > CREATE INDEX IDX_2BD88468DD62C21B ON entities_in_aggregator (child_id)
> > > CREATE TABLE properties (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
> > > entity_id INTEGER DEFAULT NULL, pkey VARCHAR(255) NOT NULL, value CLOB
> NOT
> > > NULL, CONSTRAINT FK_87C331C781257D5D FOREIGN KEY (entity_id) REFERENCES
> > > entities (id) NOT DEFERRABLE INITIALLY IMMEDIATE)
> > > CREATE UNIQUE INDEX property_unique ON properties (entity_id, pkey)
> > > CREATE INDEX IDX_87C331C781257D5D ON properties (entity_id)
> > > In AbstractSQLiteDriver.php line 47:
> > >   An exception occurred while executing 'CREATE TABLE aggregate (id
> > > INTEGER PRIMARY KEY AUTOINCRE
> > >   MENT NOT NULL, channel_id INTEGER DEFAULT NULL, type SMALLINT NOT
> NULL,
> > > timestamp BIGINT NOT NU
> > >   LL, value DOUBLE PRECISION NOT NULL, count INTEGER NOT NULL,
> CONSTRAINT
> > > FK_B77949FF72F5A1AA FOR
> > >   EIGN KEY (channel_id) REFERENCES entities (id) NOT DEFERRABLE
> INITIALLY
> > > IMMEDIATE)':
> > >   SQLSTATE[HY000]: General error: 1 table aggregate already exists
> > >
> > > In PDOConnection.php line 43:
> > >   SQLSTATE[HY000]: General error: 1 table aggregate already exists
> > >
> > > In PDOConnection.php line 41:
> > >   SQLSTATE[HY000]: General error: 1 table aggregate already exists
> > >
> > > create [-c|--config CONFIG]
> > >
> > > Hat jemand einen Tip, was ich tun könnte ?
> > > Grüße,
> > >
> > > JD.
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20190613/4c24bef8/attachment.html>


More information about the volkszaehler-users mailing list