1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Recover an old database

Discussion in 'Databases' started by rich1812, Jan 1, 2019.

  1. #1
    Hello, I have an old wordpress database, before I had a chance to do a data dump, I lost it due to an operation error, but I still have the old structure of the database backed up. The old woedpress database is called wp_db, so I dug it out from this directory. /usr/local/mysql-5.7.24-macos10.14-x86_64/data, (I use a Mac.) In this data folder, it contains all databases include wp_db, it has ib_logfile0, ib_logfile1 and ibdata1, if I understand it correctly, the ibdata1 contains most of the old data, is it possible to reconstruct the wp_db base on these items? If so, how? Thanks.
     
    Last edited: Jan 1, 2019
    rich1812, Jan 1, 2019 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Lookup how to recover Innodb tables from ibdata1. I'll just say, in general it's difficult and the process is different in every instance.

    You can try percona's tool: https://launchpad.net/percona-data-recovery-tool-for-innodb

    Sometimes all it takes is putting the server in a forced recovery mode and starting it.
     
    jestep, Jan 2, 2019 IP
  3. RoseHosting

    RoseHosting Well-Known Member

    Messages:
    230
    Likes Received:
    11
    Best Answers:
    11
    Trophy Points:
    138
    #3
    You can also try to install the same MySQL server version on your machine and replace the default `data` directory with the one from your backup. Then you can back up the database using the standard mysqldump tool.
     
    RoseHosting, Jan 8, 2019 IP