hallo,
mein Backup unter Ubuntu geht nicht.
root@tomycat:~# sudo -u postgres pg_dump --format=custom --dbname=DATABASEA --file=datenbank.dump
pg_dump: [custom archiver] could not open output file "datenbank.dump": Keine Berechtigung
root@tomycat:~# su postgres
postgres@tomycat:/home/tomycat$ sudo -u postgres pg_dump --format=custom --dbname=DATABASEA --file=datenbank.dump
postgres ist nicht in der sudoers-Datei. Dieser Vorfall wird gemeldet.
stop stop stop ich habe es hinbekommen bis auf…
postgres@tomycat:/home/tomycat$ pg_dump --format=custom --dbname=DATABASEA --file=/tmp/datenbank.dump
postgres@tomycat:/home/tomycat$ createdb DATABASED
bei der Wiederherstellung:
postgres@tomycat:/home/tomycat$ psql -f /tmp/datenbank.dump DATABASED
psql:/tmp/datenbank.dump:1: ERROR: syntax error at or near "PGDMP"
LINE 1: PGDMP
REVOKE ALL ON SCHEMA public FROM postgres;
^
GRANT
GRANT
GRANT
psql:/tmp/datenbank.dump:17: ERROR: syntax error at or near ""
LINE 1: reihenfolge integer NOT NULL,
^
psql:/tmp/datenbank.dump:22: ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
psql:/tmp/datenbank.dump:57: ERROR: syntax error at or near ""
LINE 1: sqlpos integer NOT NULL,
^
psql:/tmp/datenbank.dump:62: ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
psql:/tmp/datenbank.dump:67: ERROR: syntax error at or near ""
LINE
wenn Du einen Dump im custom-format machst, braucht Du pg_restore für das Restore. Sowas könntest Du in meinen Schulungen lernen