Results 1 to 14 of 14
  1. #1

    Restoring a phpbb database from a cpanel backup after a hacking incident

    One of my client domains (incidentally, one that I manage) had their phpbb forum seriously hacked. I have re-gained control over the forum and updated it to the latest phpbb version. However, for some reason the hacker deleted some 30,000 posts from the database. I don't know if this was intentional or incidental to his other activities. At anyrate, I have a cpanel back up of the entire domain. I want to take the database for the forum ONLY and install that. However, when I extract the cpanel back-up I cannot find where the mysql databases are being stored in order to upload the specific one that I need.

    Can anyone help?

    How does cpanel bundle the mysql databases so that I can identify the one I need?

    [email protected]

  2. #2
    Join Date
    Nov 2003
    After you extract the backup - it should be in the "mysql" directory.

    it will be a .sql file.

  3. #3
    Join Date
    Nov 2004
    In the backup you will find one mysql directory inside that you will the,

    database.sql [Note here database will be replaced by your phpbb database name.]

    if you have root access you can restore it using the following methods,

    mysql database.sql < database_phpbb

    Here database_phpbb will be your existing phpbb database.
    AssistanZ - Beyond Boundaries...
    Cloudstack Consultancy / 24x7 Web Hosting Support / 24x7 Server Management / Infrastructure Management Services
    Web & Mobile Apps Development / Web Designing Services / Php, Grails, Java Development

  4. #4
    Yea. There doesn't seem to be a mysql directory. A search through the extracted archive using *.sql as the search term does not return the relevant database.

  5. #5
    Join Date
    Nov 2003
    Is it possible that you grabbed a backup that was made AFTER the site was hacked?...

  6. #6
    Oh, no, that's definately not the case. The site backup was made three weeks ago. I was on the site and managing the forums the very night before it was hacked. The next day, I discovered the hacking early on. In fact, I strongly suspect that I interrupted the hacking 'in process' because as I was changing parameters and trying to restore order, things that I had just changed a moment ago were suddenly changed back. And especially, suddenly my account was stripped of permissions. I suspended the whole domain, waited 30 minutes for the guy to get bored, then came in and finished securing it.

    No, I'm certain that the backup was well before the hacking. It was a full cpanel backup of the entire domain, some 800mb large.

  7. #7
    Join Date
    Nov 2003
    In that case - if there's no mysql directory within the backup - The backup process at that particular time didn't run properly.

  8. #8
    That's a serious, serious bummer.

  9. #9
    Join Date
    Dec 2004
    New York, NY
    What folders do you see inside of it? You probably should backup each database individually next time.

    MediaLayer, LLC - Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  10. #10
    lol, yea THANKS. That little tidbit won't help me in the current situation, and point of fact, I do have some older straight back-ups of the forums. It would stand to reason, though, wouldn't it, that I would want to have the most recent backup possible. When you don't have all that much time, a full cpanel backup should do the trick, don't you think?

    and a few others like that, as well as


    That's not an exhaustive list. There is no mysql folder, though.

  11. #11
    Join Date
    Nov 2003
    That doesn't look like a full backup.
    Looks only like a home directory backup.

    A full account backup would have quite a few more directories and files.

  12. #12
    LIke I said, it is not an exhaustive list. I just gave a sampling. the point seems to be that there is no mysql folder, which there isn't.

    Other databases on the domain have database dump files. Its just the phpbb one that appears to be missing.

  13. #13
    Join Date
    Jan 2005
    Scotland, UK
    Its because its a cPanel backup. Its not .sql files, it is the raw database.

    I would suggest you just restore that backup then update.

    /scripts/restorepkg accountname

    then that will restore the actual database and files, then just dump the database.

    /scripts/killacct accountname

    and then restore the database YOU outputted to the new one.

    Server Management -
    Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
    WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
    Check our wordpress varnish plugin. Contact us for quote: [email protected]

  14. #14
    I've been working on this and think I might be able to pull it off. There is one big problem- the cpanel backkup I have is 800mb. If I extract the files to my local computer, eliminate the audio and video and re-zip the backup directory and upload it, will I still have those critical files?

    It took 10 hours to upload the backup, and it didn't work, but there are some things to try before crying uncle on it. If I could cut it from 10 hours to 1 hour I might be done in a week...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts