From: | Dianne Yumul <dianne(at)wellsgaming(dot)com> |
---|---|
To: | PostgreSQL List <pgsql-general(at)postgresql(dot)org> |
Subject: | Restoring from filesystem backup |
Date: | 2005-11-10 22:41:00 |
Message-ID: | 4a167cd2ab6f60d68568631ce8794990@wellsgaming.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello to everybody.
I just have a couple of newbie questions. I'm trying to restore our
databases from a file system backup. The backups are done with rsync,
the postgresql service is stopped before backups are done on the
server. The system is Fedora Core 4 with Postgresql 8.0.3.
Now back to restoring. I tried the following on a development box :)
1. stop postgresql service
2. mv /home/postgres/data /home/postgres/data.old
3. rsync over desired data/ folder from an external drive
4. start postgresql service
The last step failed with this error from the logs:
postmaster: could not find the database system
Expected to find it in the directory "/home/postgres/data", but could
not open file "/home/postgres/data/global/pg_control":
No such file or directory
Sure enough pg_control data was missing, actually
/home/postgres/data/global was empty. So I removed the 'bad' data/
directory and replaced it with a previous day's backup, and everything
restored nicely.
My questions are (1) what am I doing wrong that the filesystem backups
would sometimes have an empty /home/postgres/data/global directory,
thereby not permitting me to restore from it, and (2) what is the
preferred way to restore from a file system backup.
Any help, even a shove to the right direction, would be greatly
appreciated. Thank you and have a pleasant day.
Dianne
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Frankel | 2005-11-10 22:43:33 | pg_restore errors |
Previous Message | oayasli | 2005-11-10 22:33:36 | table copy |