Version Description
- 01/19/2013 =
- Easier Dropbox setup (we are now an official production app)
- New button to delete all existing settings
- Admin console now displays rolling status updates
- Feature: choose how many files and databases to retain separately
- Fixed bug with checking access token on Google Drive restore
- Fixed bug producing copious warnings in PHP log
- Fixed bug in automated restoration processes
Download this release
Release Info
Developer | DavidAnderson |
Plugin | UpdraftPlus WordPress Backup Plugin |
Version | 1.2.42 |
Comparing to | |
See all releases |
Code changes from version 1.2.41 to 1.2.42
- includes/updraft-restorer.php +8 -8
- readme.txt +3 -2
- updraftplus.php +8 -10
includes/updraft-restorer.php
CHANGED
@@ -12,15 +12,16 @@ class Updraft_Restorer extends WP_Upgrader {
|
|
12 |
$this->strings['delete_failed'] = __('Failed to delete working directory after restoring.');
|
13 |
}
|
14 |
|
15 |
-
function restore_backup($backup_file
|
|
|
|
|
|
|
16 |
global $wp_filesystem;
|
17 |
$this->init();
|
18 |
$this->backup_strings();
|
19 |
|
20 |
$res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) );
|
21 |
-
if(!$res)
|
22 |
-
exit;
|
23 |
-
}
|
24 |
|
25 |
$wp_dir = trailingslashit($wp_filesystem->abspath());
|
26 |
|
@@ -28,11 +29,10 @@ class Updraft_Restorer extends WP_Upgrader {
|
|
28 |
if ( is_wp_error($download) )
|
29 |
return $download;
|
30 |
|
31 |
-
$delete = (get_option('updraft_delete_local'))?true:false;
|
32 |
|
33 |
-
$working_dir = $this->unpack_package(
|
34 |
-
if (
|
35 |
-
return $working_dir;
|
36 |
|
37 |
if ($type == "others" ) {
|
38 |
|
12 |
$this->strings['delete_failed'] = __('Failed to delete working directory after restoring.');
|
13 |
}
|
14 |
|
15 |
+
function restore_backup($backup_file, $type) {
|
16 |
+
|
17 |
+
if ($type == 'nonce') return;
|
18 |
+
|
19 |
global $wp_filesystem;
|
20 |
$this->init();
|
21 |
$this->backup_strings();
|
22 |
|
23 |
$res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) );
|
24 |
+
if(!$res) exit;
|
|
|
|
|
25 |
|
26 |
$wp_dir = trailingslashit($wp_filesystem->abspath());
|
27 |
|
29 |
if ( is_wp_error($download) )
|
30 |
return $download;
|
31 |
|
32 |
+
$delete = (get_option('updraft_delete_local')) ? true : false;
|
33 |
|
34 |
+
$working_dir = $this->unpack_package($download , $delete);
|
35 |
+
if (is_wp_error($working_dir)) return $working_dir;
|
|
|
36 |
|
37 |
if ($type == "others" ) {
|
38 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: David Anderson
|
|
3 |
Tags: backup, restore, database, cloud, amazon, s3, dropbox, google drive, gdrive, ftp, cloud, updraft, back up
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.5
|
6 |
-
Stable tag: 1.2.
|
7 |
Donate link: http://david.dw-perspective.org.uk/donate
|
8 |
License: GPLv3 or later
|
9 |
|
@@ -132,13 +132,14 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
-
= 1.2.
|
136 |
* Easier Dropbox setup (we are now an official production app)
|
137 |
* New button to delete all existing settings
|
138 |
* Admin console now displays rolling status updates
|
139 |
* Feature: choose how many files and databases to retain separately
|
140 |
* Fixed bug with checking access token on Google Drive restore
|
141 |
* Fixed bug producing copious warnings in PHP log
|
|
|
142 |
|
143 |
= 1.2.31 - 01/15/2013 =
|
144 |
* Fixed bug with Dropbox deletions
|
3 |
Tags: backup, restore, database, cloud, amazon, s3, dropbox, google drive, gdrive, ftp, cloud, updraft, back up
|
4 |
Requires at least: 3.2
|
5 |
Tested up to: 3.5
|
6 |
+
Stable tag: 1.2.42
|
7 |
Donate link: http://david.dw-perspective.org.uk/donate
|
8 |
License: GPLv3 or later
|
9 |
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 1.2.42 - 01/19/2013 =
|
136 |
* Easier Dropbox setup (we are now an official production app)
|
137 |
* New button to delete all existing settings
|
138 |
* Admin console now displays rolling status updates
|
139 |
* Feature: choose how many files and databases to retain separately
|
140 |
* Fixed bug with checking access token on Google Drive restore
|
141 |
* Fixed bug producing copious warnings in PHP log
|
142 |
+
* Fixed bug in automated restoration processes
|
143 |
|
144 |
= 1.2.31 - 01/15/2013 =
|
145 |
* Fixed bug with Dropbox deletions
|
updraftplus.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
|
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/updraftplus
|
5 |
Description: Backup and restore: your content and database can be automatically backed up to Amazon S3, Dropbox, Google Drive, FTP or email, on separate schedules.
|
6 |
Author: David Anderson.
|
7 |
-
Version: 1.2.
|
8 |
Donate link: http://david.dw-perspective.org.uk/donate
|
9 |
License: GPLv3 or later
|
10 |
Author URI: http://wordshell.net
|
@@ -17,9 +17,8 @@ TODO
|
|
17 |
//?? On 'backup now', open up a Lightbox, count down 5 seconds, then start examining the log file (if it can be found)
|
18 |
//Should make clear in dashboard what is a non-fatal error (i.e. can be retried) - leads to unnecessary bug reports
|
19 |
//Eventually, when everything can be resumed, we will no longer need the backup() routine; it can be replaced with the resume() routine
|
20 |
-
// Should we resume if the only errors were upon deletion (i.e. the backup itself was fine?) Presently we do, but it displays errors for the user to confuse them.
|
21 |
// Make jobs *individually* resumable (i.e. all the state info must be keyed on the nonce; then call the resume event *specifying the nonce*)
|
22 |
-
// Separate 'retain' settings for db + files (since they are on separate schedules)
|
23 |
// Warn the user if their zip-file creation is slooowww...
|
24 |
// Create a "Want Support?" button/console, that leads them through what is needed, and performs some basic tests...
|
25 |
// Resuming partial FTP uploads
|
@@ -66,7 +65,7 @@ define('UPDRAFT_DEFAULT_OTHERS_EXCLUDE','upgrade,cache,updraft,index.php');
|
|
66 |
|
67 |
class UpdraftPlus {
|
68 |
|
69 |
-
var $version = '1.2.
|
70 |
|
71 |
// Choices will be shown in the admin menu in the order used here
|
72 |
var $backup_methods = array (
|
@@ -1346,22 +1345,21 @@ class UpdraftPlus {
|
|
1346 |
}
|
1347 |
|
1348 |
//if we make it this far then WP_Filesystem has been instantiated and is functional (tested with ftpext, what about suPHP and other situations where direct may work?)
|
1349 |
-
echo '<span style="font-weight:bold">Restoration Progress
|
1350 |
|
1351 |
$updraft_dir = trailingslashit(get_option('updraft_dir'));
|
1352 |
-
foreach($backup_history[$timestamp] as $type
|
|
|
1353 |
$fullpath = $updraft_dir.$file;
|
1354 |
if(!is_readable($fullpath) && $type != 'db') {
|
1355 |
$this->download_backup($file);
|
1356 |
}
|
1357 |
# Types: uploads, themes, plugins, others, db
|
1358 |
if(is_readable($fullpath) && $type != 'db') {
|
1359 |
-
if(!class_exists('WP_Upgrader'))
|
1360 |
-
require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
|
1361 |
-
}
|
1362 |
require_once(UPDRAFTPLUS_DIR.'/includes/updraft-restorer.php');
|
1363 |
$restorer = new Updraft_Restorer();
|
1364 |
-
$val = $restorer->restore_backup($fullpath
|
1365 |
if(is_wp_error($val)) {
|
1366 |
print_r($val);
|
1367 |
echo '</div>'; //close the updraft_restore_progress div even if we error
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/updraftplus
|
5 |
Description: Backup and restore: your content and database can be automatically backed up to Amazon S3, Dropbox, Google Drive, FTP or email, on separate schedules.
|
6 |
Author: David Anderson.
|
7 |
+
Version: 1.2.42
|
8 |
Donate link: http://david.dw-perspective.org.uk/donate
|
9 |
License: GPLv3 or later
|
10 |
Author URI: http://wordshell.net
|
17 |
//?? On 'backup now', open up a Lightbox, count down 5 seconds, then start examining the log file (if it can be found)
|
18 |
//Should make clear in dashboard what is a non-fatal error (i.e. can be retried) - leads to unnecessary bug reports
|
19 |
//Eventually, when everything can be resumed, we will no longer need the backup() routine; it can be replaced with the resume() routine
|
20 |
+
// Should we resume if the only errors were upon deletion (i.e. the backup itself was fine?) Presently we do, but it displays errors for the user to confuse them. Perhaps better to make pruning a separate scheuled task??
|
21 |
// Make jobs *individually* resumable (i.e. all the state info must be keyed on the nonce; then call the resume event *specifying the nonce*)
|
|
|
22 |
// Warn the user if their zip-file creation is slooowww...
|
23 |
// Create a "Want Support?" button/console, that leads them through what is needed, and performs some basic tests...
|
24 |
// Resuming partial FTP uploads
|
65 |
|
66 |
class UpdraftPlus {
|
67 |
|
68 |
+
var $version = '1.2.42';
|
69 |
|
70 |
// Choices will be shown in the admin menu in the order used here
|
71 |
var $backup_methods = array (
|
1345 |
}
|
1346 |
|
1347 |
//if we make it this far then WP_Filesystem has been instantiated and is functional (tested with ftpext, what about suPHP and other situations where direct may work?)
|
1348 |
+
echo '<span style="font-weight:bold">Restoration Progress</span><div id="updraft-restore-progress">';
|
1349 |
|
1350 |
$updraft_dir = trailingslashit(get_option('updraft_dir'));
|
1351 |
+
foreach($backup_history[$timestamp] as $type => $file) {
|
1352 |
+
if ($type == 'nonce') continue;
|
1353 |
$fullpath = $updraft_dir.$file;
|
1354 |
if(!is_readable($fullpath) && $type != 'db') {
|
1355 |
$this->download_backup($file);
|
1356 |
}
|
1357 |
# Types: uploads, themes, plugins, others, db
|
1358 |
if(is_readable($fullpath) && $type != 'db') {
|
1359 |
+
if(!class_exists('WP_Upgrader')) require_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
|
|
|
|
|
1360 |
require_once(UPDRAFTPLUS_DIR.'/includes/updraft-restorer.php');
|
1361 |
$restorer = new Updraft_Restorer();
|
1362 |
+
$val = $restorer->restore_backup($fullpath, $type);
|
1363 |
if(is_wp_error($val)) {
|
1364 |
print_r($val);
|
1365 |
echo '</div>'; //close the updraft_restore_progress div even if we error
|