postgres Datenbank Rücksicherung

Hallo,

ich habe eine postgres Datenbank (Besitzer postgres) ich möchte meine damalige Sicherung postgres Sicherung zurücksichern, wo der Besitzer lxoffice ist.

Wie kann ich das machen? Wie kann ich postgres Datenbank löschen? Ich habe kein Passwort davon.

Je nachdem, ob das ein binäres oder ein ASCII-Dump ist mit pg_restore oder psql.

Wie kann ich postgres Datenbank löschen? Ich habe kein Passwort davon.

Dafür wurde der Befehl ‘DROP DATABASE’ erfunden.


Andreas

hi mit dropdb hat es geklappt. Danke.

ich habe dann

createdb -U lxoffice -W postgres --owner=lxoffice \ –encoding=LATIN9 --template=template1

gemacht und dann

psql -U lxoffice postgres < 120608-dump-postgres.sql

aber der meldet:

SET
SET
SET
SET
SET
SET
COMMENT
WARNING: no privileges could be revoked for “public”
REVOKE
WARNING: no privileges could be revoked for “public”
REVOKE
WARNING: no privileges were granted for “public”
GRANT
WARNING: no privileges were granted for “public”
GRANT

Bekomme das hier

psql -U postgres < 120608-dump-postgres.sql
SET
SET
SET
SET
SET
SET
COMMENT
REVOKE
REVOKE
GRANT
GRANT
postgres@salsero:/home/salsero/Dokumente/lxoffice$ psql -U lxoffice lxerp_auth < 120531-dump-lxerp_auth.sql
Passwort für Benutzer lxoffice:
SET
SET
SET
SET
SET
SET
COMMENT
ERROR: schema “auth” already exists
ALTER SCHEMA
ERROR: language “plpgsql” already exists
ALTER LANGUAGE
SET
ERROR: permission denied for language c
ALTER FUNCTION
SET
ERROR: relation “group_id_seq” already exists
ALTER TABLE
setval

1
(1 Zeile)

SET
SET
ERROR: relation “group” already exists
ALTER TABLE
ERROR: relation “group_rights” already exists
ALTER TABLE
ERROR: relation “schema_info” already exists
ALTER TABLE
ERROR: relation “session” already exists
ALTER TABLE
ERROR: relation “session_content” already exists
ALTER TABLE
ERROR: relation “user_id_seq” already exists
ALTER TABLE
setval

4
(1 Zeile)

ERROR: relation “user” already exists
ALTER TABLE
ERROR: relation “user_config” already exists
ALTER TABLE
ERROR: relation “user_group” already exists
ALTER TABLE
ERROR: duplicate key value violates unique constraint “group_name_key”
CONTEXT: COPY group, line 1: “1 Vollzugriff Vollzugriff auf alle Funktionen”
ERROR: duplicate key value violates unique constraint “group_rights_pkey”
CONTEXT: COPY group_rights, line 1: “1 crm_follow t”
ERROR: duplicate key value violates unique constraint “schema_info_pkey”
CONTEXT: COPY schema_info, line 1: “auth_schema_normalization_1 admin 2011-03-04 21:53:14.158936”
ERROR: duplicate key value violates unique constraint “user_login_key”
CONTEXT: COPY user, line 1: “1 admin adpMqgqRIojpo”
ERROR: duplicate key value violates unique constraint “user_config_pkey”
CONTEXT: COPY user_config, line 1: "3 duns "
ERROR: duplicate key value violates unique constraint “user_group_pkey”
CONTEXT: COPY user_group, line 1: “1 1”
ERROR: relation “group_name_key” already exists
ERROR: multiple primary keys for table “group” are not allowed
ERROR: multiple primary keys for table “group_rights” are not allowed
ERROR: multiple primary keys for table “schema_info” are not allowed
ERROR: multiple primary keys for table “session” are not allowed
ERROR: multiple primary keys for table “user_config” are not allowed
ERROR: multiple primary keys for table “user_group” are not allowed
ERROR: relation “user_login_key” already exists
ERROR: multiple primary keys for table “user” are not allowed
ERROR: constraint “group_rights_group_id_fkey” for relation “group_rights” already exists
ERROR: constraint “session_content_session_id_fkey” for relation “session_content” already exists
ERROR: constraint “user_config_user_id_fkey” for relation “user_config” already exists
ERROR: constraint “user_group_group_id_fkey” for relation “user_group” already exists
ERROR: constraint “user_group_user_id_fkey” for relation “user_group” already exists
WARNING: no privileges could be revoked for “public”
REVOKE
WARNING: no privileges could be revoked for “public”
REVOKE
WARNING: no privileges were granted for “public”
GRANT
WARNING: no privileges were granted for “public”
GRANT
postgres@salsero:/home/salsero/Dokumente/lxoffice$ psql -U lxerp_auth < 120608-dump-lxerp_auth.sql
bash: 120608-dump-lxerp_auth.sql: Keine Berechtigung
postgres@salsero:/home/salsero/Dokumente/lxoffice$ psql -U lxerp_auth < 120608-dump-lxerp_auth.sql
psql: FATAL: Ident authentication failed for user “lxerp_auth”
postgres@salsero:/home/salsero/Dokumente/lxoffice$ psql -U lxoffice lxerp_auth < 120608-dump-lxerp_auth.sql
Passwort für Benutzer lxoffice:
SET
SET
SET
SET
SET
SET
COMMENT
ERROR: schema “auth” already exists
ALTER SCHEMA
ERROR: language “plpgsql” already exists
ALTER LANGUAGE
SET
ERROR: permission denied for language c
ALTER FUNCTION
SET
ERROR: relation “group_id_seq” already exists
ALTER TABLE
setval

1
(1 Zeile)

SET
SET
ERROR: relation “group” already exists
ALTER TABLE
ERROR: relation “group_rights” already exists
ALTER TABLE
ERROR: relation “schema_info” already exists
ALTER TABLE
ERROR: relation “session” already exists
ALTER TABLE
ERROR: relation “session_content” already exists
ALTER TABLE
ERROR: relation “user_id_seq” already exists
ALTER TABLE
setval

4
(1 Zeile)

ERROR: relation “user” already exists
ALTER TABLE
ERROR: relation “user_config” already exists
ALTER TABLE
ERROR: relation “user_group” already exists
ALTER TABLE
ERROR: duplicate key value violates unique constraint “group_name_key”
CONTEXT: COPY group, line 1: “1 Vollzugriff Vollzugriff auf alle Funktionen”
ERROR: duplicate key value violates unique constraint “group_rights_pkey”
CONTEXT: COPY group_rights, line 1: “1 crm_follow t”
ERROR: duplicate key value violates unique constraint “schema_info_pkey”
CONTEXT: COPY schema_info, line 1: “auth_schema_normalization_1 admin 2011-03-04 21:53:14.158936”
ERROR: column “auto_restore” of relation “session_content” does not exist
ungültige Anweisung .
ERROR: syntax error at or near “f6022edb9a030900f4f4e4d9c51df97c”
LINE 1: f6022edb9a030900f4f4e4d9c51df97c password
^
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung .
ERROR: syntax error at or near “3”
LINE 1: 3 EbayKleinanzeigen
^
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \nD-47269
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ERROR: syntax error at or near “3”
LINE 1: 3 duns
^
ERROR: syntax error at or near “host”
LINE 1: host=localhost;
^
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \nD-47269
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ERROR: syntax error at or near “port”
LINE 1: port=5432
^
ERROR: syntax error at or near “host”
LINE 1: host=localhost;
^
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \nD-47269
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ERROR: syntax error at or near “port”
LINE 1: port=5432
^
ERROR: syntax error at or near “host”
LINE 1: host=localhost;
^
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \nD-47269
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ERROR: syntax error at or near “port”
LINE 1: port=5432
^
ERROR: syntax error at or near “host”
LINE 1: host=localhost;
^
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung \N
ungültige Anweisung .
ERROR: syntax error at or near “port”
LINE 1: port=5432
^
ungültige Anweisung .
ERROR: syntax error at or near “1”
LINE 1: 1 1
^
ERROR: multiple primary keys for table “group” are not allowed
ERROR: multiple primary keys for table “group_rights” are not allowed
ERROR: multiple primary keys for table “schema_info” are not allowed
ERROR: multiple primary keys for table “session” are not allowed
ERROR: multiple primary keys for table “user_config” are not allowed
ERROR: multiple primary keys for table “user_group” are not allowed
ERROR: relation “user_login_key” already exists
ERROR: multiple primary keys for table “user” are not allowed
ERROR: constraint “group_rights_group_id_fkey” for relation “group_rights” already exists
ERROR: constraint “session_content_session_id_fkey” for relation “session_content” already exists
ERROR: constraint “user_config_user_id_fkey” for relation “user_config” already exists
ERROR: constraint “user_group_group_id_fkey” for relation “user_group” already exists
ERROR: constraint “user_group_user_id_fkey” for relation “user_group” already exists
WARNING: no privileges could be revoked for “public”
REVOKE
WARNING: no privileges could be revoked for “public”
REVOKE
WARNING: no privileges were granted for “public”
GRANT
WARNING: no privileges were granted for “public”
GRANT

was mache ich falsch?

Offenbar einiges. Aber ohne genau zu wissen, was z.B. in den Dumps steht, schwer zu erraten. Du hantierst übrigens auf der postgresql-DB, zumindest teilweise. Möglicherweise ist das schon gar nicht gewollt.


Andreas

Also die Sicherung habe ich per:

http://localhost/phppgadmin/

gemacht. Bin auf Datenbank exportieren gegangen und dann Struktur und Daten heruntergeladen.

Reichen diese Infos? Was für Infos brauchst du noch?

Ich nutze das Programm:

und bekomme

SELECT id, description
FROM department
WHERE role = ‘P’
ORDER BY description
ERROR: column “role” does not exist
LINE 3: WHERE role = ‘P’
^

das gemeldet, wenn ich eine Auftragsbestätigung z.B. machen möchte

Nein, damit kann ich nicht viel anfangen.

Aber interessant zu hören, daß es wohl mit LX-Office weitergeht. Ähm, das läuft bei einem Hoster, oder?

Andreas

Das läuft auf einem Rechner sprich localhost.

Hallo, ich komme hier bei einfach nicht weiter. Kann mir jemand bitte weiter helfen. Danke.

Schwer, Dir zu helfen, dazu sind Deine Informationen zu dürftig / wirr.

Ich könnte Dir aber anbieten, es bei uns zu hosten :wink:


Andreas

es geht hier nicht ums hosten. eher um das Programm zum laufen zu bekommen. Ich weiss ja auch nicht was ich noch melden soll. Die Fehlermeldungen habe ich mitgeteilt und was ich ausgeführt habe.

Schon klar soweit. Nur fällt es mir schwer bzw. mag ich jetzt nicht durch die ganzen Probleme mit Deinem DROP DATABASE, bereits vorhandenen Objekten etc. mich durchwuseln. Vielleicht fängst mal ganz sauber von vorne an …


Andreas

ok das werde ich auch machen, aber was ist das für eine Fehlermeldung? Womit hat das zu tun?

SELECT id, description
FROM department
WHERE role = ‘P’
ORDER BY description
ERROR: column “role” does not exist
LINE 3: WHERE role = ‘P’

Naja, was ist denn an der Meldung “ERROR: column “role” does not exist” nicht zu verstehen? In der Tabelle department gibt es keine Spalte die role heisst.

Vielleicht verstehst Du es an einem Beispiel:

test=# create table sisqonrw (col1 int, col2 int);
CREATE TABLE
test=*# select col1, col2 from sisqonrw where role = 'nicht da';
ERROR:  column "role" does not exist
LINE 1: select col1, col2 from sisqonrw where role = 'nicht da';

Andreas