UpdraftPlus WordPress Backup Plugin - Version 1.1.12

Version Description

  • 05/01/2013 =
  • Requested feature: more frequent scheduling options requested
Download this release

Release Info

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

Code changes from version 1.1.11 to 1.1.12

Files changed (2) hide show
  1. readme.txt +6 -3
  2. updraftplus.php +26 -22
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: David Anderson
3
  Tags: backup, restore, database, cloud, amazon, s3, Amazon S3, google drive, google, gdrive, ftp, cloud, updraft, back up
4
  Requires at least: 3.2
5
  Tested up to: 3.5
6
- Stable tag: 1.1.11
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
@@ -51,9 +51,9 @@ If you can send a patch, that's even better.
51
 
52
  Finally, if you post in the WordPress support forum, then make sure you include the word UpdraftPlus in your post; otherwise I will not be automatically notified that you posted.
53
 
54
- = My enormous website is hosted by a dirt-cheap provider who gives me no resources, and UpdraftPlus runs out of time! Help! Please make UpdraftPlus deal with this situation so that I can save two dollars! =
55
 
56
- UpdraftPlus supports resuming backup runs, so that it does not need to do everything in a single go; but this has limits. If your website is enormous and your web hosting company gives your tiny resources on an over-loaded server, then your solution is to purchase better web hosting, or to hire me professionally. Otherwise, this is not considered a bug. UpdraftPlus is known to successfully back up websites that run into the gigabytes on web servers that are not resource-starved.
57
 
58
  = Some of my files have uploaded into my cloud storage, but not others. =
59
 
@@ -111,6 +111,9 @@ Thanks for asking - yes, I have. Check out my profile page - http://profiles.wor
111
 
112
  == Changelog ==
113
 
 
 
 
114
  = 1.1.11 - 04/01/2013 =
115
  * Bug fix: some backup runs were erroneously being identified as superfluous and cancelled
116
 
3
  Tags: backup, restore, database, cloud, amazon, s3, Amazon S3, google drive, google, gdrive, ftp, cloud, updraft, back up
4
  Requires at least: 3.2
5
  Tested up to: 3.5
6
+ Stable tag: 1.1.12
7
  Donate link: http://david.dw-perspective.org.uk/donate
8
  License: GPLv3 or later
9
 
51
 
52
  Finally, if you post in the WordPress support forum, then make sure you include the word UpdraftPlus in your post; otherwise I will not be automatically notified that you posted.
53
 
54
+ = My enormous website is hosted by a dirt-cheap provider who starve my account of resources, and UpdraftPlus runs out of time! Help! Please make UpdraftPlus deal with this situation so that I can save two dollars! =
55
 
56
+ UpdraftPlus supports resuming backup runs, so that it does not need to do everything in a single go; but this has limits. If your website is huge and your web hosting company gives your tiny resources on an over-loaded server, then your solution is to purchase better web hosting, or to hire me professionally. Otherwise, this is not considered a bug. UpdraftPlus is known to successfully back up websites that run into the gigabytes on web servers that are not resource-starved.
57
 
58
  = Some of my files have uploaded into my cloud storage, but not others. =
59
 
111
 
112
  == Changelog ==
113
 
114
+ = 1.1.12 - 05/01/2013 =
115
+ * Requested feature: more frequent scheduling options requested
116
+
117
  = 1.1.11 - 04/01/2013 =
118
  * Bug fix: some backup runs were erroneously being identified as superfluous and cancelled
119
 
updraftplus.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: UpdraftPlus - Backup/Restore
4
  Plugin URI: http://wordpress.org/extend/plugins/updraftplus
5
  Description: Uploads, themes, plugins, and your DB can be automatically backed up to Amazon S3, Google Drive, FTP, or emailed, on separate schedules.
6
  Author: David Anderson.
7
- Version: 1.1.11
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
@@ -56,7 +56,7 @@ define('UPDRAFT_DEFAULT_OTHERS_EXCLUDE','upgrade,cache,updraft,index.php');
56
 
57
  class UpdraftPlus {
58
 
59
- var $version = '1.1.11';
60
 
61
  // Choices will be shown in the admin menu in the order used here
62
  var $backup_methods = array (
@@ -269,7 +269,7 @@ class UpdraftPlus {
269
 
270
  // Log some information that may be helpful
271
  global $wp_version;
272
- $this->log("PHP version: ".phpversion()." WordPress version: ".$wp_version." Updraft version: ".$this->version." Backup files: $backup_files (schedule: ".get_option('updraft_interval','unset').") Backup DB: $backup_database (schedule: ".get_option('updraft_interval_database','unset').")");
273
 
274
  # If the files and database schedules are the same, and if this the file one, then we rope in database too.
275
  # On the other hand, if the schedules were the same and this was the database run, then there is nothing to do.
@@ -1018,8 +1018,12 @@ class UpdraftPlus {
1018
  //clear schedule and add new so we don't stack up scheduled backups
1019
  wp_clear_scheduled_hook('updraft_backup');
1020
  switch($interval) {
 
 
 
1021
  case 'daily':
1022
  case 'weekly':
 
1023
  case 'monthly':
1024
  wp_schedule_event(time()+30, $interval, 'updraft_backup');
1025
  break;
@@ -1031,8 +1035,12 @@ class UpdraftPlus {
1031
  //clear schedule and add new so we don't stack up scheduled backups
1032
  wp_clear_scheduled_hook('updraft_backup_database');
1033
  switch($interval) {
 
 
 
1034
  case 'daily':
1035
  case 'weekly':
 
1036
  case 'monthly':
1037
  wp_schedule_event(time()+30, $interval, 'updraft_backup_database');
1038
  break;
@@ -1040,16 +1048,13 @@ class UpdraftPlus {
1040
  return wp_filter_nohtml_kses($interval);
1041
  }
1042
 
1043
- //wp-cron only has hourly, daily and twicedaily, so we need to add weekly and monthly.
1044
  function modify_cron_schedules($schedules) {
1045
- $schedules['weekly'] = array(
1046
- 'interval' => 604800,
1047
- 'display' => 'Once Weekly'
1048
- );
1049
- $schedules['monthly'] = array(
1050
- 'interval' => 2592000,
1051
- 'display' => 'Once Monthly'
1052
- );
1053
  return $schedules;
1054
  }
1055
 
@@ -1639,11 +1644,11 @@ ENDHERE;
1639
  <th>File Backup Intervals:</th>
1640
  <td><select name="updraft_interval">
1641
  <?php
1642
- $intervals = array ("manual", "daily", "weekly", "monthly");
1643
- foreach ($intervals as $ival) {
1644
- echo "<option value=\"$ival\" ";
1645
- if ($ival == get_option('updraft_interval','manual')) { echo 'selected="selected"';}
1646
- echo ">".ucfirst($ival)."</option>\n";
1647
  }
1648
  ?>
1649
  </select></td>
@@ -1652,11 +1657,10 @@ ENDHERE;
1652
  <th>Database Backup Intervals:</th>
1653
  <td><select name="updraft_interval_database">
1654
  <?php
1655
- $intervals = array ("manual", "daily", "weekly", "monthly");
1656
- foreach ($intervals as $ival) {
1657
- echo "<option value=\"$ival\" ";
1658
- if ($ival == get_option('updraft_interval_database',get_option('updraft_interval'))) { echo 'selected="selected"';}
1659
- echo ">".ucfirst($ival)."</option>\n";
1660
  }
1661
  ?>
1662
  </select></td>
4
  Plugin URI: http://wordpress.org/extend/plugins/updraftplus
5
  Description: Uploads, themes, plugins, and your DB can be automatically backed up to Amazon S3, Google Drive, FTP, or emailed, on separate schedules.
6
  Author: David Anderson.
7
+ Version: 1.1.12
8
  Donate link: http://david.dw-perspective.org.uk/donate
9
  License: GPLv3 or later
10
  Author URI: http://wordshell.net
56
 
57
  class UpdraftPlus {
58
 
59
+ var $version = '1.1.12';
60
 
61
  // Choices will be shown in the admin menu in the order used here
62
  var $backup_methods = array (
269
 
270
  // Log some information that may be helpful
271
  global $wp_version;
272
+ $this->log("PHP version: ".phpversion()." WordPress version: ".$wp_version." Updraft version: ".$this->version." PHP Max Execution Time: ".ini_get("max_execution_time")." Backup files: $backup_files (schedule: ".get_option('updraft_interval','unset').") Backup DB: $backup_database (schedule: ".get_option('updraft_interval_database','unset').")");
273
 
274
  # If the files and database schedules are the same, and if this the file one, then we rope in database too.
275
  # On the other hand, if the schedules were the same and this was the database run, then there is nothing to do.
1018
  //clear schedule and add new so we don't stack up scheduled backups
1019
  wp_clear_scheduled_hook('updraft_backup');
1020
  switch($interval) {
1021
+ case 'every4hours':
1022
+ case 'every8hours':
1023
+ case 'twicedaily':
1024
  case 'daily':
1025
  case 'weekly':
1026
+ case 'fortnightly':
1027
  case 'monthly':
1028
  wp_schedule_event(time()+30, $interval, 'updraft_backup');
1029
  break;
1035
  //clear schedule and add new so we don't stack up scheduled backups
1036
  wp_clear_scheduled_hook('updraft_backup_database');
1037
  switch($interval) {
1038
+ case 'every4hours':
1039
+ case 'every8hours':
1040
+ case 'twicedaily':
1041
  case 'daily':
1042
  case 'weekly':
1043
+ case 'fortnightly':
1044
  case 'monthly':
1045
  wp_schedule_event(time()+30, $interval, 'updraft_backup_database');
1046
  break;
1048
  return wp_filter_nohtml_kses($interval);
1049
  }
1050
 
1051
+ //wp-cron only has hourly, daily and twicedaily, so we need to add some of our own
1052
  function modify_cron_schedules($schedules) {
1053
+ $schedules['weekly'] = array( 'interval' => 604800, 'display' => 'Once Weekly' );
1054
+ $schedules['fortnightly'] = array( 'interval' => 1209600, 'display' => 'Once Each Fortnight' );
1055
+ $schedules['monthly'] = array( 'interval' => 2592000, 'display' => 'Once Monthly' );
1056
+ $schedules['every4hours'] = array( 'interval' => 14400, 'display' => 'Every 4 hours' );
1057
+ $schedules['every8hours'] = array( 'interval' => 28800, 'display' => 'Every 8 hours' );
 
 
 
1058
  return $schedules;
1059
  }
1060
 
1644
  <th>File Backup Intervals:</th>
1645
  <td><select name="updraft_interval">
1646
  <?php
1647
+ $intervals = array ("manual" => "Manual", 'every4hours' => "Every 4 hours", 'every8hours' => "Every 8 hours", 'twicedaily' => "Every 12 hours", 'daily' => "Daily", 'weekly' => "Weekly", 'fortnightly' => "Fortnightly", 'monthly' => "Monthly");
1648
+ foreach ($intervals as $cronsched => $descrip) {
1649
+ echo "<option value=\"$cronsched\" ";
1650
+ if ($cronsched == get_option('updraft_interval','manual')) echo 'selected="selected"';
1651
+ echo ">$descrip</option>\n";
1652
  }
1653
  ?>
1654
  </select></td>
1657
  <th>Database Backup Intervals:</th>
1658
  <td><select name="updraft_interval_database">
1659
  <?php
1660
+ foreach ($intervals as $cronsched => $descrip) {
1661
+ echo "<option value=\"$cronsched\" ";
1662
+ if ($cronsched == get_option('updraft_interval_database',get_option('updraft_interval'))) echo 'selected="selected"';
1663
+ echo ">$descrip</option>\n";
 
1664
  }
1665
  ?>
1666
  </select></td>