Solved

Roll back sql queries on phpbb boards - mysql?

Posted on 2014-03-23
11
558 Views
Last Modified: 2014-04-23
I deleted accidentally some messages on my phpbb boards that use mysql underneath for database, is there anyway i can roll back these queries and get back my messages?

Those messages are now very important, the police is asking for them, since they were someone1 posting some personal info in public, that i had to delete (and i did) but by mistake i didnt fully back up it first.

is there any way?

haven't touched a thing ever since. there are cache in phpbb i guess. but i dont know how to solve this mess!
0
Comment
Question by:celtician
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
11 Comments
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39949400
Not unless you have binary logging turned on.
0
 
LVL 78

Expert Comment

by:arnold
ID: 39949436
fad have them going back to hen those posts were made (just to be clear).
Depending on access to your site and the pragma directives in use, you might be able to use the web.archive.org.


Do you have any backups prior to the delete? Do you have an offline/replication DB server? You might have a copy on a development platform.
0
 

Author Comment

by:celtician
ID: 39949911
Where do i check if binary is turned on?

thanks.
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 78

Expert Comment

by:arnold
ID: 39949955
Binary logging is set in /etc/my.cnf
Bin-log directive
Look in /var/lib/mysql you would have .bin files.

What was the timeframe between the post and the deletion?

For future practice, I would think the PHPBB has the option of marking the post such that it will not display rather than having to be deleted out right.
0
 

Author Comment

by:celtician
ID: 39949984
This is shared hosting, i dont have access to such folders, only to the phpbb folders
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 39950367
Ask your hosting company for the logs.
0
 
LVL 78

Expert Comment

by:arnold
ID: 39950792
Check with the hosting company if they have a backup.
do you have phpmyadmin or any other tool that allows you to adminiter the mysql?
run show variables query and look for log-bin

show variables where variable_name=log-bin;
see if it is set to ON.
0
 

Author Comment

by:celtician
ID: 39955697
I do have mysql admin option (phpmyadmin), however my hosting company does not have a back up. Where can i check such thing on phpmyadmin?
0
 
LVL 78

Expert Comment

by:arnold
ID: 39955954
In phpmyadmin you have the option to back the data to your local system.
But this is what you would have to implement for future, along with checking whether the PHPBB has a column that indicates the record is deleted and should not be displayed.

Based on the information, the record is done and gone.
0
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 500 total points
ID: 39956147
I'd agree. It sounds like the record's gone. Unfortunately, that's sort of the intention of the way databases handle deletes. It doesn't have safeguards in place unless you turn them on because every safeguard will reduce performance.

If it's significant enough for the police for some case, they could potentially get the physical hardware from the hosting company and run forensics on it to try and recover data, but that's very unlikely to happen, and the chances dramatically decrease over time as new data is written to the drives.

At this point, you can learn from this experience and make regular backups. My guess is that you're on a cPanel-based system, so you should be able to set up a cron job to create daily or hourly snapshots of the database.
0
 

Author Closing Comment

by:celtician
ID: 40019229
I dont think the police will do such thing as the case is so minor (some insults ind a board and a phone number published...) thanks anyway! i couldn't get the log back, anyway hte police hasn't contacted me yet and i was able to get the IP elseway as this moron posted more and more posts with the same thing from the same IP...
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question