[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: restore database errors
- Subject: Re: restore database errors
- From: Jeff Kowalczyk <..hidden..>
- Date: Mon, 23 Apr 2007 15:57:57 -0400
On Mon, 23 Apr 2007 11:36:37 -0700, RYAN M. vAN GINNEKEN wrote:
> (Upgrading instructions) do not seem to apply as i have a broken version
> of sqlledger on one server and a new version of smbledger on the new
OK, that would be different problem, a broken SL dataset should not be
expected to migrate to LedgerSMB as smoothly as a non-broken one. It may
not be actually corrupt, perhaps only the schema is not up to date, see
If you think your SL dataset is truly damaged in some way, you may want to
consider closing it out as of a certain date and starting anew, or seeking
commercial support to clean it up safely. Migrations issues are complex,
your data is confidential and usually high-value, so paying one of the
professionals may be a justifiable expense.
> All i need is to transfer my data set to the new server which i think i
> have done but i get this error when i try to login to ledgersmb
Please be sure you are able to run a fresh LedgerSMB install correctly,
and login/edit newly created datasets. Then, you can try to dump your
existing dataset, and load it into a working environment, once it has been
properly prepared for migration.
> SELECT value FROM defaults
> WHERE setting_key = 'version'
> ERROR: relation "defaults" does not exist
This error tells you that the defaults table (relation is a term for
tables, among other objects in postgresql) does not exist in this dataset.
Can you tell from pgadmin3 whether you have the defaults table?
If not, have you run the sequence of legacy SQL commands to bring your
legacy dataset up to the current schema? Without tracing it through, I see
that the current version CREATE TABLE defaults, appeared somewhere around
schema version 2.6.19:
# grep 'TABLE defaults' sql/legacy/*.sql
sql/legacy/Pg-upgrade-1.2.7-1.4.0.sql:DROP TABLE defaults;
sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql:ALTER TABLE defaults RENAME TO
sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql:CREATE TABLE defaults (
sql/legacy/Pg-upgrade-2.6.18-2.6.19.sql:COMMENT ON TABLE defaults IS
$$This table replaces the old one column per value system with a simple
key => value table$$;
Note that schema versions do not necessarily increment with each release
of the SL program version.
Don't get discouraged, and above all, take your time to investigate your
schema version. You could have a very fixable situation, and this is a a
good opportunity to learn how to do inspection and minor maintenance of
your postgresql database.