Title: Separated multisite backups
Last modified: August 20, 2016

---

# Separated multisite backups

 *  [narcisgarcia](https://wordpress.org/support/users/narcisgarcia/)
 * (@narcisgarcia)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/)
 * Does anybody know a solution to make a backup only for a single blog in a multisite
   installation?
 * I have a subdirectories-based network installation, and wish to give a way for
   each blog administrator to make a backup (DB & files) only for its own blog.

Viewing 15 replies - 16 through 30 (of 35 total)

[←](https://wordpress.org/support/topic/separated-multisite-backups/?output_format=md)
[1](https://wordpress.org/support/topic/separated-multisite-backups/?output_format=md)
2 [3](https://wordpress.org/support/topic/separated-multisite-backups/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/separated-multisite-backups/page/3/?output_format=md)

 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139535)
 * so you could tell the user to go to yourdomain.com/username/backup.php and run
   a script that would do all that. or place a link in the users admin menu. that
   would go to like themes/yourtheme/backup.php
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139536)
 * so by utilizing the export.php you could just auto some of its functions to grab
   posts, pages, comments, custom fields, terms, navigation menus and custom posts
   customize the function to drop it in the uploads dir and then zip the entire 
   thing?
 *  Thread Starter [narcisgarcia](https://wordpress.org/support/users/narcisgarcia/)
 * (@narcisgarcia)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139549)
 * I’ve discovered with this SQL command:
    `SELECT * FROM wp_blogs;` That the field“
   blog_id” can be used to distinct all the tables related to a sub-site.
 * For example:
 *     ```
       SELECT blog_id, path FROM wp_blogs;
       +---------+----------------------+
       | blog_id | path                 |
       +---------+----------------------+
       |       1 | /                    |
       |       3 | /myfriend/           |
       +---------+----------------------+
       ```
   
 * Then I can list site’s tables:
 *     ```
       SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = "multisitedatabase" AND TABLE_NAME LIKE "wp_3_%";
       +-------------------------+
       | TABLE_NAME              |
       +-------------------------+
       | wp_3_commentmeta        |
       | wp_3_comments           |
       | wp_3_ec3_schedule       |
       | wp_3_links              |
       | wp_3_options            |
       | wp_3_postmeta           |
       | wp_3_posts              |
       | wp_3_socialslider       |
       | wp_3_term_relationships |
       | wp_3_term_taxonomy      |
       | wp_3_terms              |
       +-------------------------+
       ```
   
 * I suppose these are all the tables to be exported for a complete backup (database
   part).
 *  Thread Starter [narcisgarcia](https://wordpress.org/support/users/narcisgarcia/)
 * (@narcisgarcia)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139550)
 * With this last information and exploring filesystem content, I deduce that all
   attached/accessory files for blog nr.3 are stored together in this directory:
   `/
   wp-content/blogs.dir/3/`
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139560)
 * the directory structure is (for uploads) ;
 * `wp-content/blogs.dir/USER##/files/YYYY/MM/`
 * example:
 * `wp-content/blogs.dir/5/files/2011/06/`
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139561)
 * whats confusing me is that the image i used to test the path was automatically
   duplicated into 4 images;
 * img.png (original upload)
    img-150×70.png img-300×67.png img-32×32.png
 * so when compiling the backup you may want to have a selector that only grabs 
   the original file, for images at least.
 * Plus the size increase on the server for 1 image is absurd. The original image
   was 7119k , the generated 3 images that was not requested by the user = 18073k
 * i don’t understand the logic in turning one small image (7119k) into 25192k
 * hrmm…
 *  [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * (@andrea_r)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139562)
 * WordPress builds different thumbnails for every image you upload.
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139564)
 * apparently builds larger versions if the image is smaller.
 * this should be an option to be able to turn off.
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139565)
 *     ```
       $createZip->get_files_from_folder('/wp-content/blogs.dir/" . the_id . "/', '" . the_id . "/');
       ```
   
 * something like this could work using the method above, you just need a function
   to assign the_id to the proper user
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139567)
 * I do know it goes in order by users who have signed up, so if you have users 
   that don’t have sites, they are also counted, and in the directory they will 
   be skipped. (unless they have the ability to upload something)
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139569)
 * mdevaney – Please don’t post multiple times in a row within minutes of each other.
   You’re tripping the spam filter. Make one, longer, post please 🙂
 * > WordPress builds different thumbnails for every image you upload.
 * Also your theme may create more images as needed.
 *  Thread Starter [narcisgarcia](https://wordpress.org/support/users/narcisgarcia/)
 * (@narcisgarcia)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139570)
 * Is necessary to talk about sites (blogs) not users.
 * A site can have multiple users, and viceversa.
 *  [mdevaney](https://wordpress.org/support/users/mdevaney/)
 * (@mdevaney)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139575)
 * [@ipstenu](https://wordpress.org/support/users/ipstenu/), it wasn’t my posts 
   it was my edits that were causing the spam filter.
 * [@narcisgarcia](https://wordpress.org/support/users/narcisgarcia/) not really.
   i don’t imagine you want your user to be able to backup their profile.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139582)
 * Well you COULD want multiple users to be able to backup their site, but I’d be
   pretty gun-shy about letting non super-admins have access to anything that made
   massive SQL queries.
 * Also given that the export would need to extract info from the _shared_ wp_users
   and wp_usermeta table, I think I’d just tell them they can’t.
 * > apparently builds larger versions if the image is smaller.
   > this should be an option to be able to turn off.
 * Read this: [http://electrokami.com/coding/wordpress-disable-automatic-image-thumbnail-resizing/](http://electrokami.com/coding/wordpress-disable-automatic-image-thumbnail-resizing/)
 *  Thread Starter [narcisgarcia](https://wordpress.org/support/users/narcisgarcia/)
 * (@narcisgarcia)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/2/#post-2139591)
 * If 1 site has more that one administrator, it’s normal that any of those administrators
   can make a backup of the entire site or blog.
 * This is necessary both in simple-site installation and in multi-site blogs. The
   only restrictions needed is that the administrators in 1 multisite blog cannot
   backup data from other blogs in the same multisite installation, and may not 
   also backup the users accounts that have access to multiple blogs.
 * But the current situation is: no files, no preferences, no plugin options,..

Viewing 15 replies - 16 through 30 (of 35 total)

[←](https://wordpress.org/support/topic/separated-multisite-backups/?output_format=md)
[1](https://wordpress.org/support/topic/separated-multisite-backups/?output_format=md)
2 [3](https://wordpress.org/support/topic/separated-multisite-backups/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/separated-multisite-backups/page/3/?output_format=md)

The topic ‘Separated multisite backups’ is closed to new replies.

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 35 replies
 * 5 participants
 * Last reply from: [Andrea Rennick](https://wordpress.org/support/users/andrea_r/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/separated-multisite-backups/page/3/#post-2139599)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
