Openbravo ERP cannot restore pg dump

using version 3.0PR16Q4.4, you can dump openbravo database, but you can not restore it. some error from TOC happend when restoring data on ad_tab and ad_window tables. This blog share workarround on this issue.

This issue reporting in this openbravo issue tracker. The workarround provide in those link works. This blog post is just another rewrite about it. I only add --disable-triggers when restore db data, to make it works with foreign key constraint.

Step by step:

  1. Before dump openbravo db, run this script.
  2. When restore db, use--schema-only. see pg_dump documentation here.
  3. After resotore db schema, run this script to fix db schema.
  4. Then restore db once again, use --data-only and --disable-triggers. see pg_dump documentation here.

Published by zaien

software engineer

Leave a comment