UpdraftPlus WordPress Backup Plugin - Version 1.2.45

Version Description

  • 01/22/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
  • Possibly fixed settings saving bug in RTL installations
  • Fix erroneous display of max_execution_time warning
  • Better logging when running a DB debug session
Download this release

Release Info

Developer DavidAnderson
Plugin Icon 128x128 UpdraftPlus WordPress Backup Plugin
Version 1.2.45
Comparing to
See all releases

Code changes from version 1.2.44 to 1.2.45

Files changed (2) hide show
  1. readme.txt +5 -4
  2. updraftplus.php +7 -7
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.44
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
@@ -20,8 +20,8 @@ UpdraftPlus simplifies backups (and restoration). Backup into the cloud (Amazon
20
  * Files and databases can have separate schedules
21
  * Failed uploads are automatically resumed/retried
22
  * Select which files to backup (plugins, themes, content, other)
23
- * Databases can be encrypted for security
24
- * Debug mode that gives full logging
25
  * Thousands of users: widely tested and reliable
26
 
27
  = Best New WordPress Plugin =
@@ -132,7 +132,7 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
132
 
133
  == Changelog ==
134
 
135
- = 1.2.44 - 01/22/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
@@ -142,6 +142,7 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
142
  * Fixed bug in automated restoration processes
143
  * Possibly fixed settings saving bug in RTL installations
144
  * Fix erroneous display of max_execution_time warning
 
145
 
146
  = 1.2.31 - 01/15/2013 =
147
  * 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.45
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
20
  * Files and databases can have separate schedules
21
  * Failed uploads are automatically resumed/retried
22
  * Select which files to backup (plugins, themes, content, other)
23
+ * Database backups can be encrypted for security
24
+ * Debug mode that gives full logging of the backup
25
  * Thousands of users: widely tested and reliable
26
 
27
  = Best New WordPress Plugin =
132
 
133
  == Changelog ==
134
 
135
+ = 1.2.45 - 01/22/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
142
  * Fixed bug in automated restoration processes
143
  * Possibly fixed settings saving bug in RTL installations
144
  * Fix erroneous display of max_execution_time warning
145
+ * Better logging when running a DB debug session
146
 
147
  = 1.2.31 - 01/15/2013 =
148
  * 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.44
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
@@ -68,7 +68,7 @@ define('UPDRAFT_DEFAULT_OTHERS_EXCLUDE','upgrade,cache,updraft,index.php');
68
 
69
  class UpdraftPlus {
70
 
71
- var $version = '1.2.44';
72
 
73
  // Choices will be shown in the admin menu in the order used here
74
  var $backup_methods = array (
@@ -162,6 +162,7 @@ class UpdraftPlus {
162
  $this->logfile_handle = fopen($this->logfile_name, 'a');
163
  $this->opened_log_time = microtime(true);
164
  $this->log("Opened log file at time: ".date('r'));
 
165
  }
166
 
167
  # Logs the given line, adding (relative) time stamp and newline
@@ -346,7 +347,6 @@ class UpdraftPlus {
346
 
347
  // Log some information that may be helpful
348
  global $wp_version;
349
- $this->log("UpdraftPlus: ".$this->version." WordPress: ".$wp_version." PHP: ".phpversion()." (".@php_uname().") PHP Max Execution Time: ".@ini_get("max_execution_time"));
350
  $this->log("Tasks: Backup files: $backup_files (schedule: ".get_option('updraft_interval','unset').") Backup DB: $backup_database (schedule: ".get_option('updraft_interval_database','unset').")");
351
 
352
  # If the files and database schedules are the same, and if this the file one, then we rope in database too.
@@ -911,6 +911,9 @@ class UpdraftPlus {
911
  // Get the file prefix
912
  $updraft_dir = $this->backups_dir_location();
913
 
 
 
 
914
  // Get the blog name and rip out all non-alphanumeric chars other than _
915
  $blog_name = preg_replace('/[^A-Za-z0-9_]/','', str_replace(' ','_', get_bloginfo()));
916
  if (!$blog_name) $blog_name = 'non_alpha_name';
@@ -922,13 +925,10 @@ class UpdraftPlus {
922
  $total_tables = 0;
923
 
924
  global $table_prefix, $wpdb;
925
- if(!$this->backup_time) $this->backup_time_nonce();
926
 
927
  $all_tables = $wpdb->get_results("SHOW TABLES", ARRAY_N);
928
  $all_tables = array_map(create_function('$a', 'return $a[0];'), $all_tables);
929
 
930
-
931
-
932
  if (!is_writable($updraft_dir)) {
933
  $this->log('The backup directory is not writable.');
934
  $this->error('The backup directory is not writable.');
@@ -978,7 +978,7 @@ class UpdraftPlus {
978
  $this->log("Error: Failed to open database file for reading: ${table_file}.gz");
979
  $this->error(" Failed to open database file for reading: ${table_file}.gz");
980
  } else {
981
- while (!gzeof($handle)) { $this->stow(gzread($handle, 65536)); }
982
  gzclose($handle);
983
  @unlink($updraft_dir.'/'.$table_file.'.gz');
984
  }
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.45
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
68
 
69
  class UpdraftPlus {
70
 
71
+ var $version = '1.2.45';
72
 
73
  // Choices will be shown in the admin menu in the order used here
74
  var $backup_methods = array (
162
  $this->logfile_handle = fopen($this->logfile_name, 'a');
163
  $this->opened_log_time = microtime(true);
164
  $this->log("Opened log file at time: ".date('r'));
165
+ $this->log("UpdraftPlus: ".$this->version." WordPress: ".$wp_version." PHP: ".phpversion()." (".@php_uname().") PHP Max Execution Time: ".@ini_get("max_execution_time"));
166
  }
167
 
168
  # Logs the given line, adding (relative) time stamp and newline
347
 
348
  // Log some information that may be helpful
349
  global $wp_version;
 
350
  $this->log("Tasks: Backup files: $backup_files (schedule: ".get_option('updraft_interval','unset').") Backup DB: $backup_database (schedule: ".get_option('updraft_interval_database','unset').")");
351
 
352
  # If the files and database schedules are the same, and if this the file one, then we rope in database too.
911
  // Get the file prefix
912
  $updraft_dir = $this->backups_dir_location();
913
 
914
+ if(!$this->backup_time) $this->backup_time_nonce();
915
+ if (!$this->opened_log_time) $this->logfile_open($this->nonce);
916
+
917
  // Get the blog name and rip out all non-alphanumeric chars other than _
918
  $blog_name = preg_replace('/[^A-Za-z0-9_]/','', str_replace(' ','_', get_bloginfo()));
919
  if (!$blog_name) $blog_name = 'non_alpha_name';
925
  $total_tables = 0;
926
 
927
  global $table_prefix, $wpdb;
 
928
 
929
  $all_tables = $wpdb->get_results("SHOW TABLES", ARRAY_N);
930
  $all_tables = array_map(create_function('$a', 'return $a[0];'), $all_tables);
931
 
 
 
932
  if (!is_writable($updraft_dir)) {
933
  $this->log('The backup directory is not writable.');
934
  $this->error('The backup directory is not writable.');
978
  $this->log("Error: Failed to open database file for reading: ${table_file}.gz");
979
  $this->error(" Failed to open database file for reading: ${table_file}.gz");
980
  } else {
981
+ while ($line = gzgets($handle, 2048)) { $this->stow($line); }
982
  gzclose($handle);
983
  @unlink($updraft_dir.'/'.$table_file.'.gz');
984
  }