Solved

Roll back sql queries on phpbb boards - mysql?

Posted on 2014-03-23
11
553 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
  • 4
  • 4
  • 3
11 Comments
 
LVL 34

Expert Comment

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

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 77

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 34

Expert Comment

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

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 77

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 34

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

778 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