Can we use snapshot to move sites?

I have to move a few sub sites to the live multisite instance from a dev instance. Can I use snapshot to do that? i.e., restoring the backup to a new server/install so a new sub site is added in the new new network?

If this is not supported, I would really appreciate some suggestions on that.

  • Paul

    @chodhry,

    Yes, you can. You can go to the destination site then to Snapshots > Import. There you can fill in the URL of the remote snapshot archive. Or manually upload the archive to the destination server and save the file to the snapshot archive folder (/wp-content/uploads/snapshots/) then simply submit the import form. This loads the archive into the snapshot archive listing.

    Once you have the archive showing on Snapshots > All Snapshots you can select the restore option and follow the the last (3rd screen). You will have options to select which files to restores as well as database tables.

    This is still considered beta as there are some legacy issues with supporting pre-WP 3.5 installs and converting the URLs. But it should be stable enough to work.

  • chodhry

    Hey Paul, thanks for prompt reply. Just want to make sure it will let me change the url of the install?

    The accurate scenario would be

    Multisite-A/sub-site-10 (Exported to sub-site-10 archive file).

    Multisite-B/sub-site-3 (Imported sub-site-10 archive file to have theme files copied, plugins copied, Database tables copied including theme options and custom taxonomies, meta data). I also assume it will copy data tables with site id 10 to data tables with site id 3.

    Would appreciate your help.

  • Paul

    @chodhry,

    Multisite-A/sub-site-10 (Exported to sub-site-10 archive file).

    Yes, exactly.

    Multisite-B/sub-site-3 (Imported sub-site-10 archive file to have theme files copied, plugins copied, Database tables copied including theme options and custom taxonomies, meta data). I also assume it will copy data tables with site id 10 to data tables with site id 3.

    Yes and no. With the sub site backup you can't include plugins and themes. Those can only be included in the network-level archive.

    As fr the database tables the sub site archive will only include the table for the sub-site. As this will include the sub sites option table it will include the theme settings, active plugins, etc.

    Where things get strange is when you try to transfer sub site which uses a plugin where the plugin creates global tables. Like BuddyPress. There is not a clean way to do this.

  • chodhry

    I just tried importing a site and getting this error.

    Error: Manifest data not found in archive.

    On the later part of my question. the tables are created with its own table name and site id. Assuming we have same prefix for the table how the site ids would be handled?

    Like what if I export a site having tables like wp_10_tablename

    and on the import site there is already a site with id 10 having tables wp_10_tables.

    Would it replace the tables data?

  • Paul

    @chodhry,

    just figured that out after reading this post.

    Ok. Great. Glad you were able to go to the next step.

    and on the import site there is already a site with id 10 having tables wp_10_tables.

    Well Snapshot handles this during the restore. So assume on the source site the sub site ID is 10. All the tables will have names like wp_10_options, wp_10_posts, wp_10_postmeta.

    When you go to the restore on the last screen just before the restore process starts you will see a section/metabox showing the source information from the archive and you will need to select which sub site for the detonation. If you chose a sub site which happens to have the same ID 10. Then yes snapshot will replace the database table completely. If you chose a different destination sub site then snapshot will properly convert the SQL statements used as part from the back from _10_ to _3_

  • Paul

    @chodhry,

    Oh and one other tricky area is users. As you know WordPress users are global. When you do the sub site backup you can chose the users and usermeta tables. But tis will not include all the users. But only users who have the sub site as their primary site.

    When snapshot does the restore it does not replace the users and usermeta table like it would for the sub site specify tables. Instead it attempts to merge the sub site users into the existing destination site users.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.