Support » Plugins » [Plugin: WP S3 Backups] Doesn’t backup uploaded images etc?

  • This is a great plugin — much better than the ones that email you backups daily, for example. It’s a very elegant solution. However, as far as I can see, there is no way to make it upload the wp-content/uploads folder itself. That is to say, in the backups, that folder name is present, but its only contents is an SQL dump of the database, rather than the actual contents of the wp-content/uploads directory.

    In my view this is a major problem with the plugin, as the wp-content folder is where all your uploaded pictures etc go. If it was necessary to restore a backup of the blog, it wouldn’t be much of a restoration if all pictures were missing!

    Am I missing something, or is this indeed a problem with the plugin?

    I did try emailing the author a while back, but didn’t get a response.

    Does anyone know of any similar plugin that can upload to S3 and also handles the contents of the wp-content/uploads directory?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    This is indeed a problem with the plugin.

    However the functionality can be enabled without problems.

    Here is a small patch:

    --- wp-s3-backups.php.old	2009-12-06 06:45:39.000000000 +0100
    +++ wp-s3-backups.php	2009-12-06 06:45:48.000000000 +0100
    @@ -168,12 +168,10 @@
     								<input <?php if ( in_array('plugins', $sections) ) echo 'checked="checked"' ?> type="checkbox" name="s3b-section[]" value="plugins" id="s3b-section-plugins" />
     								<?php _e('Plugins folder', 'wp-s3-backups') ?>
     							</label><br />
    -							<!--
     							<label for="s3b-section-uploads">
     								<input <?php if ( in_array('uploads', $sections) ) echo 'checked="checked"' ?> type="checkbox" name="s3b-section[]" value="uploads" id="s3b-section-uploads" />
     								<?php _e('Uploaded content', 'wp-s3-backups') ?>
     							</label><br />
    -							-->
     					<?php endif; ?>
     					<p class="submit">
    @@ -246,8 +244,11 @@
     		if ( in_array('themes', $sections) ) $backups = array_merge($backups, WPS3B::rscandir(ABSPATH . 'wp-content/plugins'));
     		if ( in_array('plugins', $sections) ) $backups = array_merge($backups, WPS3B::rscandir(ABSPATH . 'wp-content/themes'));
    -		//if ( in_array('uploads', $sections) ) $backups = array_merge($backups, WPS3B::rscandir(ABSPATH . 'wp-content/uploads'));
    +		if ( in_array('uploads', $sections) ) $backups = array_merge($backups, WPS3B::rscandir(ABSPATH . 'wp-content/uploads'));
    +		// Remove zip file from backed up data
    +		$backups=array_diff($backups, array($file));
     		$zip->create($backups, '', ABSPATH);
     		$s3 = new S3(get_option('s3b-access-key'), get_option('s3b-secret-key'));

    Apply on the command line via:

    patch -p0 < wp-s3-backups.php

    Best Wishes,


    [moderated] no signatures here, see forum rules.

    This looks very promising, Can you please explain how to patch without Subversion?


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP S3 Backups] Doesn’t backup uploaded images etc?’ is closed to new replies.