UpdraftPlus WordPress Backup Plugin - Version 1.3.9

Version Description

  • 01/25/2013 =
  • 1.3.0 onwards had a fatal flaw for people with large backups. Fixed now.
Download this release

Release Info

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

Code changes from version 1.3.8 to 1.3.9

Files changed (2) hide show
  1. readme.txt +5 -2
  2. updraftplus.php +8 -7
readme.txt CHANGED
@@ -3,12 +3,12 @@ Contributors: David Anderson
3
  Tags: backup, restore, database, cloud, amazon, s3, dropbox, google drive, ftp, cloud, back up, multisite
4
  Requires at least: 3.2
5
  Tested up to: 3.5.1
6
- Stable tag: 1.3.8
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
10
  == Upgrade Notice ==
11
- Internal reorganisation, opening way for UpdraftPlus Premium
12
 
13
  == Description ==
14
 
@@ -141,6 +141,9 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
141
 
142
  == Changelog ==
143
 
 
 
 
144
  = 1.3.8 - 01/24/2013 =
145
  * Fixed faulty assumptions in 'resume' code, now leading to more reliable resuming
146
  * Removed some duplicate code; first attempt and resumptions now uses same code
3
  Tags: backup, restore, database, cloud, amazon, s3, dropbox, google drive, ftp, cloud, back up, multisite
4
  Requires at least: 3.2
5
  Tested up to: 3.5.1
6
+ Stable tag: 1.3.9
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
10
  == Upgrade Notice ==
11
+ Essential bugfix release for all earlier releases
12
 
13
  == Description ==
14
 
141
 
142
  == Changelog ==
143
 
144
+ = 1.3.9 - 01/25/2013 =
145
+ * 1.3.0 onwards had a fatal flaw for people with large backups. Fixed now.
146
+
147
  = 1.3.8 - 01/24/2013 =
148
  * Fixed faulty assumptions in 'resume' code, now leading to more reliable resuming
149
  * Removed some duplicate code; first attempt and resumptions now uses same code
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.3.8
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
@@ -12,6 +12,7 @@ Author URI: http://wordshell.net
12
 
13
  /*
14
  TODO
 
15
  //Add SFTP, Box.Net, SugarSync and Microsoft Skydrive support??
16
  //The restorer has a hard-coded wp-content - fix
17
  //Read safe-mode only once, remembering it will be totally removed from PHP
@@ -78,7 +79,7 @@ if (!class_exists('UpdraftPlus_Options')) require_once(UPDRAFTPLUS_DIR.'/options
78
 
79
  class UpdraftPlus {
80
 
81
- var $version = '1.3.8';
82
  var $plugin_title = 'UpdraftPlus Backup/Restore';
83
 
84
  // Choices will be shown in the admin menu in the order used here
@@ -172,6 +173,7 @@ class UpdraftPlus {
172
  $this->logfile_handle = fopen($this->logfile_name, 'a');
173
  $this->opened_log_time = microtime(true);
174
  $this->log("Opened log file at time: ".date('r'));
 
175
  $this->log("UpdraftPlus: ".$this->version." WordPress: ".$wp_version." PHP: ".phpversion()." (".@php_uname().") PHP Max Execution Time: ".@ini_get("max_execution_time"));
176
  }
177
 
@@ -354,7 +356,6 @@ class UpdraftPlus {
354
  $this->logfile_open($this->nonce);
355
 
356
  // Log some information that may be helpful
357
- global $wp_version;
358
  $this->log("Tasks: Backup files: $backup_files (schedule: ".UpdraftPlus_Options::get_updraft_option('updraft_interval', 'unset').") Backup DB: $backup_database (schedule: ".UpdraftPlus_Options::get_updraft_option('updraft_interval_database', 'unset').")");
359
 
360
  # If the files and database schedules are the same, and if this the file one, then we rope in database too.
@@ -661,11 +662,11 @@ class UpdraftPlus {
661
 
662
  // Firstly, make sure that the temporary file is not already being written to - which can happen if a resumption takes place whilst an old run is still active
663
  $zip_name = $full_path.'.tmp';
664
- $time_mod = (int)filemtime($zip_name);
665
  $time_now = time();
666
- $file_size = filesize($zip_name);
667
- if (file_exists($zip_name) && $time_mod>100 && ($time_mod-$time_now)<20) {
668
- $this->log("Terminate: the temporary file $zip_name already exists, and was modified within the last 20 seconds (time_mod=$time_mod, time_now=$time_now, diff=".($time_mod-$time_now).", size=$file_size). This likely means that another UpdraftPlus run is still at work; so we will exit.");
 
669
  die;
670
  }
671
 
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.3.9
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
12
 
13
  /*
14
  TODO
15
+ //Put in old-WP-version warning, and point them to where they can get help
16
  //Add SFTP, Box.Net, SugarSync and Microsoft Skydrive support??
17
  //The restorer has a hard-coded wp-content - fix
18
  //Read safe-mode only once, remembering it will be totally removed from PHP
79
 
80
  class UpdraftPlus {
81
 
82
+ var $version = '1.3.9';
83
  var $plugin_title = 'UpdraftPlus Backup/Restore';
84
 
85
  // Choices will be shown in the admin menu in the order used here
173
  $this->logfile_handle = fopen($this->logfile_name, 'a');
174
  $this->opened_log_time = microtime(true);
175
  $this->log("Opened log file at time: ".date('r'));
176
+ global $wp_version;
177
  $this->log("UpdraftPlus: ".$this->version." WordPress: ".$wp_version." PHP: ".phpversion()." (".@php_uname().") PHP Max Execution Time: ".@ini_get("max_execution_time"));
178
  }
179
 
356
  $this->logfile_open($this->nonce);
357
 
358
  // Log some information that may be helpful
 
359
  $this->log("Tasks: Backup files: $backup_files (schedule: ".UpdraftPlus_Options::get_updraft_option('updraft_interval', 'unset').") Backup DB: $backup_database (schedule: ".UpdraftPlus_Options::get_updraft_option('updraft_interval_database', 'unset').")");
360
 
361
  # If the files and database schedules are the same, and if this the file one, then we rope in database too.
662
 
663
  // Firstly, make sure that the temporary file is not already being written to - which can happen if a resumption takes place whilst an old run is still active
664
  $zip_name = $full_path.'.tmp';
 
665
  $time_now = time();
666
+ $time_mod = (int)@filemtime($zip_name);
667
+ if (file_exists($zip_name) && $time_mod>100 && ($time_now-$time_mod)<20) {
668
+ $file_size = filesize($zip_name);
669
+ $this->log("Terminate: the temporary file $zip_name already exists, and was modified within the last 20 seconds (time_mod=$time_mod, time_now=$time_now, diff=".($time_now-$time_mod).", size=$file_size). This likely means that another UpdraftPlus run is still at work; so we will exit.");
670
  die;
671
  }
672