Solved

Roll back sql queries on phpbb boards - mysql?

Posted on 2014-03-23
11
544 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
Comment Utility
Not unless you have binary logging turned on.
0
 
LVL 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
Where do i check if binary is turned on?

thanks.
0
 
LVL 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
This is shared hosting, i dont have access to such folders, only to the phpbb folders
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 34

Expert Comment

by:gr8gonzo
Comment Utility
Ask your hosting company for the logs.
0
 
LVL 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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 76

Expert Comment

by:arnold
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now