Help to read data from files

Alle anderen Fragen und Probleme zur Installation.
Antworten
aoglib
Neuer Benutzer
Beiträge: 3
Registriert: Fr 4. Mai 2018, 10:26

Help to read data from files

Beitrag von aoglib » Fr 4. Mai 2018, 11:14

A Jira Software system was installed on Windows Server 2003 (x86) with a connection to the PostgreSQL 9.3 (x86) database.
After the hdd disk crash, most of the files in the folder "date" were restored, but the PostgreSQL server does not start (due to absence of some files)!
Unfortunately, there are no backups...

Help!
How can I get the data from files?
Are there any programs for viewing data in "date/base" folder files?

castorp
Erfahrener Benutzer
Beiträge: 1032
Registriert: Sa 27. Jun 2009, 22:24

Re: Help to read data from files

Beitrag von castorp » Fr 4. Mai 2018, 11:27

Without a backup you can't really do anything.

The files in the data (not "date" btw) directory need to be complete and if you are not a very experienced Postgres DBA you shouldn't touch that at all.

There are Postgres support companies that can help you with that, see https://www.postgresql.org/support/prof ... rt/europe/ for a list of possible companies. But the very first thing you have to do is to copy the existing files to a safe place before you try anything
A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'

akretschmer
Erfahrener Benutzer
Beiträge: 7404
Registriert: So 29. Okt 2006, 13:35
Wohnort: Kaufbach, Sachsen, Germany, Germany
Kontaktdaten:

Re: Help to read data from files

Beitrag von akretschmer » Fr 4. Mai 2018, 12:03

where are you located?

without backup and after you have manipulated files in data-dir it's nearly impossible to recover the database. Was the database running on the windows-server? What is the exact error-message?

can we switch to german?
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

aoglib
Neuer Benutzer
Beiträge: 3
Registriert: Fr 4. Mai 2018, 10:26

Re: Help to read data from files

Beitrag von aoglib » Fr 4. Mai 2018, 16:11

castorp hat geschrieben:
Fr 4. Mai 2018, 11:27
...
There are Postgres support companies that can help you with that, see https://www.postgresql.org/support/prof ... rt/europe/ for a list of possible companies. But the very first thing you have to do is to copy the existing files to a safe place before you try anything
thanks for the advice

aoglib
Neuer Benutzer
Beiträge: 3
Registriert: Fr 4. Mai 2018, 10:26

Re: Help to read data from files

Beitrag von aoglib » Fr 4. Mai 2018, 16:58

akretschmer hat geschrieben:
Fr 4. Mai 2018, 12:03
where are you located?
Kiev, Ukraine
akretschmer hat geschrieben:
Fr 4. Mai 2018, 12:03
Was the database running on the windows-server?
Yes, Windows Server 2003.
akretschmer hat geschrieben:
Fr 4. Mai 2018, 12:03
What is the exact error-message?
Can't find some files like:
- PostgreSQL/9.3/data/global/pg_control
I restored by pg_resetxlog
- PostgreSQL/9.3/data/pg_multixact/offsets/0000

Code: Alles auswählen

2018-05-03 17:56:18 EEST LOG:  database system was interrupted; last known up at 2018-05-03 17:54:32 EEST
2018-05-03 17:56:18 EEST LOG:  database system was not properly shut down; automatic recovery in progress
2018-05-03 17:56:18 EEST LOG:  record with zero length at 2E/A20000F8
2018-05-03 17:56:18 EEST LOG:  redo is not required
2018-05-03 17:56:18 EEST FATAL:  could not access status of transaction 1
2018-05-03 17:56:18 EEST DETAIL:  Could not open file "pg_multixact/offsets/0000": No such file or directory.
2018-05-03 17:56:18 EEST LOG:  startup process (PID 4972) exited with exit code 1
2018-05-03 17:56:18 EEST LOG:  aborting startup due to startup process failure
I created by dd if=/dev/zero of=PostgreSQL/9.3/data/pg_multixact/offsets/0000 bs=256K count=1
- PostgreSQL/9.3/data/global/12025

Code: Alles auswählen

2018-05-03 18:40:34 EEST ERROR:  could not open file "global/12025": No such file or directory
and etc...
akretschmer hat geschrieben:
Fr 4. Mai 2018, 12:03
can we switch to german?
Sorry, i can't write in german

akretschmer
Erfahrener Benutzer
Beiträge: 7404
Registriert: So 29. Okt 2006, 13:35
Wohnort: Kaufbach, Sachsen, Germany, Germany
Kontaktdaten:

Re: Help to read data from files

Beitrag von akretschmer » Fr 4. Mai 2018, 17:29

i would say: see it as an teaching and take backups in the future.

PostgreSQL is crash-safe, but a damaged hard-disk and no backups ...
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Antworten