[vz-users] Automatisches Backupkonzept auf NAS

Andreas Götz cpuidle at gmail.com
Mon Nov 24 23:01:28 CET 2014


Mach mal php misc/tools/doctrine statt dem deep link aus vendor, dann geht auch das.

Viele Grüße, Andreas




> Am 24.11.2014 um 22:21 schrieb justin at justinotherguy.org:
> 
> Hi Andreas,
> 
>> Am 24.11.2014 um 20:12 schrieb Andreas Goetz <cpuidle at gmail.com>:
>> 
>> 2014-11-24 0:12 GMT+01:00 <justin at justinotherguy.org>:
>>> - git clone https://github.com/andig/dbcopy.git
>> 
>> Braucht es nicht- einfach `git pull` in Deiner VZ Installation, dann `composer install`- es ist als Abhängigkeit bereits drin.
> 
> aha, ok.
> 
> 
>>> - Ziel-DB erzeugen:
>>> php /opt/dbcopy/dbcopy.php create -c /opt/dbcopy/dbcopy.json
>>> Creating target schema
>>> renaming assets for target platform: sqlite
>>> table: data
>>> table: entities
>>> table: entities_in_aggregator
>>> table: properties
>>> (Anm.: scheint keine sqlite-DB zu erzeugen - im lokalen Verzeichnis liegt jedenfalls nix)
>>> 
>> Ja. Scheint ein Fehler zu sein, muss ich mir anschauen. Aber selbst wenn ich den behebe klappt das bei Dir nicht:
>> - wir haben im Schema keys mit identischem Namen die bei sqlite zu Duplikaten führen
>> - ich habs im git schon gefixt, aber...
>> - doctrine weigert sich das key rename zu synchronisieren wenn man nicht auch sonst was am schema ändert :(
> 
> ahja, *hüstel*, klar! ;-)
> 
> 
>> Als Workaround kannst Du das Schema von Hand anlegen indem Du in der vz.conf.php auf sqlite änderst und dann das Schema mit doctrine schema-tool anlegst.
> 
> das hab ich probiert:
> - etc/volkszaehler.conf.php:
>    $config['db']['driver']                         = 'pdo_sqlite‘;
>    $config['db']['path'] = 'volkszaehler.sqlite‘;
> 
> $ php vendor/doctrine/orm/bin/doctrine.php orm:schema-tool:create --dump-sql
> You are missing a "cli-config.php" or "config/cli-config.php" file in your
> project, which is required to get the Doctrine Console working. You can use the
> following sample as a template:
> 
> <?php
> use Doctrine\ORM\Tools\Console\ConsoleRunner;
> 
> // replace with file to your own project bootstrap
> require_once 'bootstrap.php';
> 
> // replace with mechanism to retrieve EntityManager in your app
> $entityManager = GetEntityManager();
> 
> return ConsoleRunner::createHelperSet($entityManager);
> 
> hm - das war mir dann doch zu suspekt...
> 
> 
>>> - backup:
>>> php /opt/dbcopy/dbcopy.php backup  -c /opt/dbcopy/dbcopy.json
>> 
>> Dann sollte das auch funktionieren.
> 
> bis hier bin ich leider nicht gekommen...
> 
> 
>> Versuchst Du es nochmal und machst mir für das Anlegen ein Issue auf?
> 
> done: https://github.com/volkszaehler/volkszaehler.org/issues/188
> 
> 
> Gruß, J.
> 


More information about the volkszaehler-users mailing list