WordPress Backup and Migrate Plugin – Backup Guard - Version 1.3.0

Version Description

  • Fixed the closing issue with the "Execution timeout" banner
  • Bug fixed related to Windows server
Download this release

Release Info

Developer BackupGuard
Plugin Icon 128x128 WordPress Backup and Migrate Plugin – Backup Guard
Version 1.3.0
Comparing to
See all releases

Code changes from version 1.2.9 to 1.3.0

README.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://backup-guard.com/products/backup-wordpress
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.4
9
- Stable tag: 1.2.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -157,6 +157,10 @@ When you are facing an issue of any kind with any of our products, the first thi
157
  6. Site backup customization
158
 
159
  == Changelog ==
 
 
 
 
160
  = 1.2.9 =
161
  * The bug related to inprogress backup and restore was fixed.
162
 
6
  Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
7
  Requires at least: 3.8
8
  Tested up to: 5.4
9
+ Stable tag: 1.3.0
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
157
  6. Site backup customization
158
 
159
  == Changelog ==
160
+ = 1.3.0 =
161
+ * Fixed the closing issue with the "Execution timeout" banner
162
+ * Bug fixed related to Windows server
163
+
164
  = 1.2.9 =
165
  * The bug related to inprogress backup and restore was fixed.
166
 
backup.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Backup
5
  * Plugin URI: https://backup-guard.com/products/backup-wordpress
6
  * Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
7
- * Version: 1.2.9
8
  * Author: BackupGuard
9
  * Author URI: https://backup-guard.com/products/backup-wordpress
10
  * License: GPL-2.0+
@@ -16,7 +16,7 @@ if (function_exists('activate_backup_guard')) {
16
  }
17
 
18
  if (!defined('SG_BACKUP_GUARD_VERSION')) {
19
- define('SG_BACKUP_GUARD_VERSION', '1.2.9');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
@@ -33,4 +33,4 @@ if (!defined('WPINC')) {
33
  }
34
 
35
  require_once(plugin_dir_path(__FILE__).'public/boot.php');
36
- require_once(plugin_dir_path(__FILE__).'BackupGuard.php');
4
  * Plugin Name: Backup
5
  * Plugin URI: https://backup-guard.com/products/backup-wordpress
6
  * Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
7
+ * Version: 1.3.0
8
  * Author: BackupGuard
9
  * Author URI: https://backup-guard.com/products/backup-wordpress
10
  * License: GPL-2.0+
16
  }
17
 
18
  if (!defined('SG_BACKUP_GUARD_VERSION')) {
19
+ define('SG_BACKUP_GUARD_VERSION', '1.3.0');
20
  }
21
 
22
  if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
33
  }
34
 
35
  require_once(plugin_dir_path(__FILE__).'public/boot.php');
36
+ require_once(plugin_dir_path(__FILE__).'BackupGuard.php');
com/core/backup/SGBackup.php CHANGED
@@ -712,7 +712,9 @@ class SGBackup implements SGIBackupDelegate
712
 
713
  SGBackupLog::write('Total duration: '.backupGuardFormattedDuration($this->actionStartTs, time()));
714
  SGBackupLog::write('Memory pick usage: '.(memory_get_peak_usage(true)/1024/1024).'MB');
715
- SGBackupLog::write('CPU usage: '.implode(' / ', sys_getloadavg()));
 
 
716
 
717
  $archiveSizeInBytes = backupGuardRealFilesize($this->filesBackupPath);
718
  $archiveSize = convertToReadableSize($archiveSizeInBytes);
@@ -874,7 +876,9 @@ class SGBackup implements SGIBackupDelegate
874
  }
875
 
876
  SGBackupLog::write('Memory pick usage: '.(memory_get_peak_usage(true)/1024/1024).'MB');
877
- SGBackupLog::write('CPU usage: '.implode(' / ', sys_getloadavg()));
 
 
878
  SGBackupLog::write('Total duration: '.backupGuardFormattedDuration($this->actionStartTs, time()));
879
 
880
  $this->cleanUp();
712
 
713
  SGBackupLog::write('Total duration: '.backupGuardFormattedDuration($this->actionStartTs, time()));
714
  SGBackupLog::write('Memory pick usage: '.(memory_get_peak_usage(true)/1024/1024).'MB');
715
+ if (function_exists('sys_getloadavg')) {
716
+ SGBackupLog::write('CPU usage: '.implode(' / ', sys_getloadavg()));
717
+ }
718
 
719
  $archiveSizeInBytes = backupGuardRealFilesize($this->filesBackupPath);
720
  $archiveSize = convertToReadableSize($archiveSizeInBytes);
876
  }
877
 
878
  SGBackupLog::write('Memory pick usage: '.(memory_get_peak_usage(true)/1024/1024).'MB');
879
+ if (function_exists('sys_getloadavg')) {
880
+ SGBackupLog::write('CPU usage: '.implode(' / ', sys_getloadavg()));
881
+ }
882
  SGBackupLog::write('Total duration: '.backupGuardFormattedDuration($this->actionStartTs, time()));
883
 
884
  $this->cleanUp();
com/lib/SGArchiveToZip.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
-
3
- class SGArchiveToZip
4
- {
5
- public function __construct()
6
- {
7
- $this->backupFiles = new SGBackupFiles();
8
- }
9
-
10
- private $filePath;
11
- private $fileName;
12
-
13
- public function setFilePath($filePath)
14
- {
15
- $this->filePath = $filePath;
16
- }
17
-
18
- public function getFilePath()
19
- {
20
- return $this->filePath;
21
- }
22
-
23
- public function setFileName($fileName)
24
- {
25
- $this->fileName = $fileName;
26
- }
27
-
28
- public function getFileName()
29
- {
30
- return $this->fileName;
31
- }
32
-
33
- public function convert()
34
- {
35
- $this->extract();
36
- }
37
-
38
- private function extract()
39
- {
40
- $backupName = $this->getFileName();
41
- $backupName = backupGuardRemoveSlashes($backupName);
42
- $backupPath = SG_BACKUP_DIRECTORY.$backupName;
43
- $filePath = $backupPath.'/'.$backupName.'.sgbp';
44
-
45
- $files = new SGBackup();
46
- $files->extractForZip($filePath, $backupPath, $backupName);
47
- //$files->extractBackupByPath($backupPath.'/'.$backupName.'.sgbp', $backupName);
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
com/lib/test.txt DELETED
@@ -1,26 +0,0 @@
1
- Array
2
- (
3
- [siteUrl] => http://localhost:8888/wordpress
4
- [home] => http://localhost:8888/wordpress
5
- [dbPrefix] => wp_
6
- [tables] => ["wp_options","wp_commentmeta","wp_comments","wp_custom","wp_links","wp_postmeta","wp_posts","wp_term_relationships","wp_term_taxonomy","wp_termmeta","wp_terms","wp_usermeta","wp_users","wp_wfblockediplog"]
7
- [method] => 2
8
- [multisitePath] =>
9
- [multisiteDomain] =>
10
- [selectivRestoreable] => 1
11
- [phpVersion] => 7.0.31
12
- [version] => 5
13
- )
14
- Array
15
- (
16
- [siteUrl] => http://localhost:8888/wordpress
17
- [home] => http://localhost:8888/wordpress
18
- [dbPrefix] => wp_
19
- [tables] => ["wp_options","wp_commentmeta","wp_comments","wp_custom","wp_links","wp_postmeta","wp_posts","wp_term_relationships","wp_term_taxonomy","wp_termmeta","wp_terms","wp_usermeta","wp_users","wp_wfblockediplog"]
20
- [method] => 2
21
- [multisitePath] =>
22
- [multisiteDomain] =>
23
- [selectivRestoreable] => 1
24
- [phpVersion] => 7.0.31
25
- [version] => 5
26
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/main.js CHANGED
@@ -2,6 +2,7 @@ sgBackup = {};
2
  sgBackup.isModalOpen = false;
3
  SG_CURRENT_ACTIVE_AJAX = '';
4
  SG_NOTICE_EXECUTION_TIMEOUT = 'timeout_error';
 
5
  SG_NOTICE_MIGRATION_ERROR = 'migration_error';
6
  SG_NOTICE_NOT_WRITABLE_ERROR = 'restore_notwritable_error';
7
 
@@ -43,6 +44,9 @@ jQuery(document).ready( function() {
43
  if (jQuery(this).parent().attr('data-notice-id') == SG_NOTICE_EXECUTION_TIMEOUT) {
44
  notice = SG_NOTICE_EXECUTION_TIMEOUT;
45
  }
 
 
 
46
  else if (jQuery(this).parent().attr('data-notice-id') == SG_NOTICE_MIGRATION_ERROR) {
47
  notice = SG_NOTICE_MIGRATION_ERROR;
48
  }
2
  sgBackup.isModalOpen = false;
3
  SG_CURRENT_ACTIVE_AJAX = '';
4
  SG_NOTICE_EXECUTION_TIMEOUT = 'timeout_error';
5
+ SG_NOTICE_EXECUTION_FREE_TIMEOUT = 'timeout_free_error';
6
  SG_NOTICE_MIGRATION_ERROR = 'migration_error';
7
  SG_NOTICE_NOT_WRITABLE_ERROR = 'restore_notwritable_error';
8
 
44
  if (jQuery(this).parent().attr('data-notice-id') == SG_NOTICE_EXECUTION_TIMEOUT) {
45
  notice = SG_NOTICE_EXECUTION_TIMEOUT;
46
  }
47
+ else if (jQuery(this).parent().attr('data-notice-id') == SG_NOTICE_EXECUTION_FREE_TIMEOUT) {
48
+ notice = SG_NOTICE_EXECUTION_TIMEOUT;
49
+ }
50
  else if (jQuery(this).parent().attr('data-notice-id') == SG_NOTICE_MIGRATION_ERROR) {
51
  notice = SG_NOTICE_MIGRATION_ERROR;
52
  }