0

I get hacked by several tables dropping for the postgres database.

It is on a cloud ECS environment. During the hack, I realized the attack and created a snapshot but unfortunately I still have several important tables dropped.

But I have the database XLOG file not be deleted. And besides I have the dump.sql for the data several months ago.

Please help me find the solutions that recover the data if possible. Thanks in advance.

Postgres 9.2 does not have xlogdump tool, I tried to build it https://github.com/snaga/xlogdump However it does not have very detailed document, I did not quite understand the steps.

1
  • If I upgrade the postgres server from 9.2 to 9.5 using the tool like pg_upgrade, will the xlog content be compatible with 9.5 Commented Jan 25, 2024 at 16:28

1 Answer 1

1

Bad news I'm afraid. You have just learned why it is important to have regular, tested backups.

The transaction logs are not going to be much use to you without a valid filesystem-level backup that they overlap. Once you manage to get the tool to compile you will only be able to come up with changes to a copy of the tables you don't have. You will also have to try and untangle possible other changes by the hackers. Dropping tables might just have been the last thing they did.

You can spend a lot of time or money (or both) on this and get what is probably not a valid database back. If it is that important to you I would join the mailing lists and start a conversation there. Or hire one of the PostgreSQL consultancies listed on the website.

You may also be required (depending on where in the world you are and what information this database held) to report this as a breach of data protection laws.

Sign up to request clarification or add additional context in comments.

2 Comments

Well, if the data were important, they wouldn't have used 9.2 in 2024.
Hi Richard...Thanks for the message. I do need some help either the advice or any support. I do appreciate that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.