• Moderator Bet Hannon

    (@bethannon1)


    I’m running a multisite installation and I’m interested in a way to create backups that would be able to restore an individual site in the network should it go down. I understand that this is complex, and I would still be making backups of the whole network in case that needed to be restored.

    I’m looking at WordPress Database Backup plugin by Austin Matzko, which I have network activated. It offers the capacity to email backups, and includes some core tables in every backup, but also offers options to include tables that seem to be related only to individual sites, like “wp_3_comments” and “wp_4_links”.

    Could I set the backups to copy (in addition to the core files which are not optional) only the tables related to that site (say all the tables with a “wp_3” prefix), and be able to restore only site id#3?

    What would happen if I tried to restore from this backup, and core files that were not corrupted got written over? Assuming the backup was good, would the network be ok?

    And, there are other files in the optional list for backing up that may be needed, but I’m not sure what they would be. Should I include, for example, “wp_contact_form_7” which is network activated? I’m thinking that one site wouldn’t take down a network plugin, but in this example, the customization of the contact form might be lost. Maybe?

    Any insights here would be appreciated!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Bet Hannon

    (@bethannon1)

    I’m not worried so much about the themes or plugins– I have multiple copies of those elsewhere… Mostly, pages/posts & media– essentially, if I could just automate and “export” file, I’d be set. Any way to do that?

    I’m interested in a way to create backups that would be able to restore an individual site in the network should it go down.

    With a backup of the entire Multisite database, then you can restore individual sites. The key to it, as you’ve realised, is that the tables for each site are prefixed with wp_<site ID>. If you’ve got them, you’ve got all the content and settings for the site.

    Any plugin which has been activated for a site, either individually or network-wide, will store data for that site in its own database tables which will again be prefixed with wp_<site ID>. The table names usually make it obvious which plugin they belong to.

    I’ve done this manually by editing the database MySQL dump file to leave only the tables for the site to be restored. There are a few “header” lines at the top of the dump file you need to keep, but otherwise it’s fairly straightforward.

    There are probably more elegant ways to do this, but this approach works. The only real headache I encounter is with very large dump files, which may need split into smaller parts for editing.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Neither a DB backup nor an XML export will backup the IMAGES though. Those need a fileserver backup.

    Moderator Bet Hannon

    (@bethannon1)

    Thanks for the input so far.

    Ipstenu, the images for each site stored in a separate folder in blogs.dir. If I have a back up of the whole network, I could restore the single site with a db backup or XML export, and then copy those over.

    I’m trying to figure out if I can avoid the possibility that a non-afffected site in the network might lose some changes when a disabled site needs to be restored.

    Or am I worrying about nothing– when there is a problem in multisite does it generally take down the whole network?

    The XML export, if you’ve made one, will restore the standard content of a site (posts, comments, links etc). It won’t, though, restore any tables created by plugins, or data stored in them such as plugin settings or other data.

    As long as you restore only the damaged site, together with its upload directories, then other sites won’t lose any changes.

    You’re right to get these things clear in your head now. FWIW, any restores I’ve had to do, in 5 years or so of using Multisite, have almost always been of individual blogs, and as a result of user error. The software itself is very reliable.

    Moderator Bet Hannon

    (@bethannon1)

    any restores I’ve had to do, in 5 years or so of using Multisite, have almost always been of individual blogs, and as a result of user error.

    That’s interesting to me, especially as I’m trying to anticipate potential problems. My users will be mostly extreme-newbies to WP, but will not have admin level access. What sorts of “user errors” have you seen that took down individual sites?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multisite backup for indiv sites?’ is closed to new replies.