• Resolved rwhillrunner

    (@rwhillrunner)


    Short story:

    The server my site is hosted on crashed. I wasn’t running backups because my host told me they were running daily backups of my files and database. As it turns out, when they restored my site from backup, my wp_postmeta table wasn’t there. I’m trying to get them to go through backups and find this table but they have been jerking me around.

    In short, if they can’t find my wp_postmeta data, how much trouble am I in? Is there any way to recreate it?

    Lesson learned from this:

    Trust nobody. Run your own backups, even if you’ve been assured that backups are being run for you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    “Trust nobody. Run your own backups”

    Ain’t that the truth! Sorry to hear of your troubles.

    How much trouble you are in depends on what was stored in that table. If you can determine through other sources what the post meta values were, you could reassign values. For example, all attached images have image meta data stored in post meta. You could determine the required meta and reconstruct the array of data that includes height and width of all the registered sizes with their related filenames, mime type, and in some cases camera meta like exposure, aperture, ISO, focal length, orientation, etc.

    That’s just for images. Every post can have its own unique set of meta data. Some of that may not be required, but still, you can imagine the difficulty in compiling the varied data for a large number of posts. If you cannot locate at least some version of the table, that metaphor about watercraft in a creek of excrement without means of propulsion would apply.

    Thread Starter rwhillrunner

    (@rwhillrunner)

    Thank you. That’s just what I was fearing. Fortunately, I did find a two week old backup file from before my host told me I don’t need to back up. Of course, now I can’t get it uploaded because they tell me the server is being rebuilt and “even we can’t FTP a file that large right now”.

    Needless to say, I have my backup and will reapply it before recreating my more recent blog posts but I will also be ditching this host ASAP.

    Moderator bcworkz

    (@bcworkz)

    You probably realize this, but just in case, make a fresh backup before restoring the one you have. The new one will have data useful for recreating the recent posts.

    Also, if your backup is plain text SQL, you could extract out the post meta portion and only restore that part, then you are only missing the recent post meta instead of all recent data. You could have trouble with your text editor being able to work with really large files. Editors that load everything into memory will choke on that much data, but editors that swap in portions from disc should be able to handle it.

    A file with only the post meta SQL will also be much smaller. If you’ve not looked at these SQL backup files before, they are merely a long series of regular SQL queries that recreate the DB from the ground up. It’s not that difficult (tedious yes) to identify the applicable portions you need.

    Thread Starter rwhillrunner

    (@rwhillrunner)

    That’s a good idea! I do have a large text file viewer. As I recall, my postmeta table was very large but, given the fact that my hosting company seems to be better at dragging their feet than at getting sites they break back up and running, it might be worth a shot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Any way to rebuild wp_postmeta?’ is closed to new replies.