Hi,
I did it before last week - and it worked like a charm.
This week, I wanted to re-migrate my database to cover any changes from last week - and I got an error:

2020-11-29 11:21:57 : ERROR : Command "PGPASSWORD="$(cat unplug.opalmigration-local.passwd)" psql -q -w -U unplug -d unplug < unplug.opalmigration.sql" exited with status 2
Traceback (most recent call last):
  File "/usr/local/bin/wfmigrate", line 74, in <module>
    migrator.run()
  File "/opt/app_migrators-1.6.3/wf_generic_psql/migrator.py", line 59, in run
    self.migrate()
  File "/opt/app_migrators-1.6.3/wf_generic_psql/migrator.py", line 41, in migrate
    self.wf_migrator_psql.import_db()
  File "/opt/app_migrators-1.6.3/lib/wf_migrator_psql.py", line 127, in import_db
    raise RuntimeError(f'Command "{cmd}" exited with status {result.returncode}')
RuntimeError: Command "PGPASSWORD="$(cat unplug.opalmigration-local.passwd)" psql -q -w -U unplug -d unplug < unplug.opalmigration.sql" exited with status 2

No error when doing a "simulate" - when actually doing it, it happened:

wfmigrate psql ./config.ini --mode do

And I started off with a new config.ini

Any ideas?

Thanks,
Stephan

  • sean replied to this.

    stephan0h Are you able to log in to your database with the password shown in the file unplug.opalmigration-local.passwd?

    Thanks for the hint. I now deleted the database AND the user. Did unset the password in the config.ini. Now it worked. Thanks!

    Mastodon