pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRestoring database question..
3+ messages / 2 participants
[nested] [flat]
* Restoring database question..
@ 2006-08-12 17:58 arsi@aranzo.netg.se
0 siblings, 1 reply; 3+ messages in thread
From: arsi@aranzo.netg.se @ 2006-08-12 17:58 UTC (permalink / raw)
To: pgsql-admin
Hi all,
I have a problem. My server got hacked and someone did an rm -rf * on the
/home and /var folders. The backups to my database were not as fresh as
they should be but I have been able to recover all the files that existed
before the rm from the old harddrive, including the files located in the
data folder for postgres.
My question is as follows, is it possible to simply copy the data files
to their correct location and getting access to the databases as they
looked at the time of the hacking attempt?
I should have the exact same setup before the hack as after, no version
changes or anything.
Or do I simply have to count my losses and restore from an old backup??
I have a Debian Linux (stable) and the Postgres version is 7.4.
Thanks in advance,
Archie
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Restoring database question..
@ 2006-08-18 19:52 Bruno Wolff III <bruno@wolff.to>
parent: arsi@aranzo.netg.se
0 siblings, 1 reply; 3+ messages in thread
From: Bruno Wolff III @ 2006-08-18 19:52 UTC (permalink / raw)
To: arsi@aranzo.netg.se; +Cc: pgsql-admin
On Sat, Aug 12, 2006 at 19:58:52 +0200,
arsi@aranzo.netg.se wrote:
>
> My question is as follows, is it possible to simply copy the data files
> to their correct location and getting access to the databases as they
> looked at the time of the hacking attempt?
> I should have the exact same setup before the hack as after, no version
> changes or anything.
If the database was running when the files were backed up, then just copying
them over is very unlikely to work.
> Or do I simply have to count my losses and restore from an old backup??
This is probably your best option.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Restoring database question..
@ 2006-08-19 09:59 arsi@aranzo.netg.se
parent: Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 3+ messages in thread
From: arsi@aranzo.netg.se @ 2006-08-19 09:59 UTC (permalink / raw)
To: Bruno Wolff III <bruno@wolff.to>; +Cc: pgsql-admin
Hi there,
>> My question is as follows, is it possible to simply copy the data files
>> to their correct location and getting access to the databases as they
>> looked at the time of the hacking attempt?
>> I should have the exact same setup before the hack as after, no version
>> changes or anything.
>
> If the database was running when the files were backed up, then just copying
> them over is very unlikely to work.
>
The thing is, there was no backup. The machine was hacked and someone did
an 'rm -rf *' on / and I don't know if it removed the postgres program
first or the datafiles first, nor do I know if that matters.
Also, the main data files also exist (I copied the data folder to its
correct place as the restoring technique), I can select from the actual
data, only the pg_* tables seem to be missing since I can't dump the
database or do \d on any tables.
Archie
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2006-08-19 09:59 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-12 17:58 Restoring database question.. arsi@aranzo.netg.se
2006-08-18 19:52 ` Bruno Wolff III <bruno@wolff.to>
2006-08-19 09:59 ` arsi@aranzo.netg.se
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox