Version Description
Please, keep your Dropbox Backup and Restore plugin up-to-date.
Download this release
Release Info
Developer | backup-dropbox |
Plugin | Backup & Restore Dropbox |
Version | 1.5.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.5.1.1 to 1.5.1.2
- dropbox-backup.php +1 -1
- methods/class-wpadm-method-send-to-dropbox.php +6 -3
- modules/archive.php +9 -9
- modules/pclzip.lib.php +9 -0
- modules/restore-class.php +23 -9
- readme.txt +3 -2
- template/wpadm_show_backup.php +27 -1
dropbox-backup.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Dropbox Backup & Restore
|
4 |
Description: Dropbox Backup & Restore Plugin to create Dropbox Full Backup (Files + Database) of your Web Page
|
5 |
-
Version: 1.5.1.
|
6 |
Text Domain: dropbox-backup
|
7 |
Domain Path: /languages/
|
8 |
*/
|
2 |
/*
|
3 |
Plugin Name: Dropbox Backup & Restore
|
4 |
Description: Dropbox Backup & Restore Plugin to create Dropbox Full Backup (Files + Database) of your Web Page
|
5 |
+
Version: 1.5.1.2
|
6 |
Text Domain: dropbox-backup
|
7 |
Domain Path: /languages/
|
8 |
*/
|
methods/class-wpadm-method-send-to-dropbox.php
CHANGED
@@ -201,11 +201,14 @@ if (!class_exists('WPadm_Method_Send_To_Dropbox')) {
|
|
201 |
if ( WPAdm_Running::is_stop() ) {
|
202 |
$delete_file = $dropbox->deleteFile($folder_project . $dir . '/' . $file_name);
|
203 |
if (isset($delete_file['error'])) {
|
204 |
-
|
205 |
-
return false;
|
|
|
|
|
|
|
206 |
}
|
207 |
$data_error_command = WPAdm_Running::getCommandResultData('errors_sending');
|
208 |
-
if (isset($
|
209 |
$data_error_command[$fromFile]['count'] += 1;
|
210 |
} else {
|
211 |
$data_error_command[$fromFile] = array();
|
201 |
if ( WPAdm_Running::is_stop() ) {
|
202 |
$delete_file = $dropbox->deleteFile($folder_project . $dir . '/' . $file_name);
|
203 |
if (isset($delete_file['error'])) {
|
204 |
+
//$this->setError( __('Dropbox returned an error during file sending: ' ,'dropbox-backup') . '"' . $delete_file['text'] . '"(d)');
|
205 |
+
//return false;
|
206 |
+
WPAdm_Core::log( __('File in Dropbox Cloud: ' ,'dropbox-backup') . '"' . $delete_file['text'] . '"' );
|
207 |
+
|
208 |
+
WPAdm_Core::log( __('Try send file again' ,'dropbox-backup') . '(' . $file_name . ')' );
|
209 |
}
|
210 |
$data_error_command = WPAdm_Running::getCommandResultData('errors_sending');
|
211 |
+
if (isset($data_error_command[$fromFile])) {
|
212 |
$data_error_command[$fromFile]['count'] += 1;
|
213 |
} else {
|
214 |
$data_error_command[$fromFile] = array();
|
modules/archive.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
|
15 |
class wpadm_archive_class
|
16 |
{
|
17 |
-
function
|
18 |
{
|
19 |
$this->options = array (
|
20 |
'basedir' => ".",
|
@@ -365,9 +365,9 @@
|
|
365 |
|
366 |
class wpadm_tar_file extends wpadm_archive_class
|
367 |
{
|
368 |
-
function
|
369 |
{
|
370 |
-
|
371 |
$this->options['type'] = "tar";
|
372 |
}
|
373 |
|
@@ -559,9 +559,9 @@
|
|
559 |
|
560 |
class wpadm_gzip_file extends wpadm_tar_file
|
561 |
{
|
562 |
-
function
|
563 |
{
|
564 |
-
|
565 |
$this->options['type'] = "gzip";
|
566 |
}
|
567 |
|
@@ -636,9 +636,9 @@
|
|
636 |
|
637 |
class wpadm_bzip_file extends wpadm_tar_file
|
638 |
{
|
639 |
-
function
|
640 |
{
|
641 |
-
|
642 |
$this->options['type'] = "bzip";
|
643 |
}
|
644 |
|
@@ -677,9 +677,9 @@
|
|
677 |
|
678 |
class wpadm_zip_file extends wpadm_archive_class
|
679 |
{
|
680 |
-
function
|
681 |
{
|
682 |
-
|
683 |
$this->options['type'] = "zip";
|
684 |
}
|
685 |
|
14 |
|
15 |
class wpadm_archive_class
|
16 |
{
|
17 |
+
function __construct($name = '')
|
18 |
{
|
19 |
$this->options = array (
|
20 |
'basedir' => ".",
|
365 |
|
366 |
class wpadm_tar_file extends wpadm_archive_class
|
367 |
{
|
368 |
+
function __construct($name)
|
369 |
{
|
370 |
+
parent::__construct($name);
|
371 |
$this->options['type'] = "tar";
|
372 |
}
|
373 |
|
559 |
|
560 |
class wpadm_gzip_file extends wpadm_tar_file
|
561 |
{
|
562 |
+
function __construct($name)
|
563 |
{
|
564 |
+
parent::__construct($name);
|
565 |
$this->options['type'] = "gzip";
|
566 |
}
|
567 |
|
636 |
|
637 |
class wpadm_bzip_file extends wpadm_tar_file
|
638 |
{
|
639 |
+
function __construct($name)
|
640 |
{
|
641 |
+
parent::__construct($name);
|
642 |
$this->options['type'] = "bzip";
|
643 |
}
|
644 |
|
677 |
|
678 |
class wpadm_zip_file extends wpadm_archive_class
|
679 |
{
|
680 |
+
function __construct($name)
|
681 |
{
|
682 |
+
parent::__construct($name);
|
683 |
$this->options['type'] = "zip";
|
684 |
}
|
685 |
|
modules/pclzip.lib.php
CHANGED
@@ -2824,6 +2824,10 @@
|
|
2824 |
|| (!function_exists("set_magic_quotes_runtime"))) {
|
2825 |
return $v_result;
|
2826 |
}
|
|
|
|
|
|
|
|
|
2827 |
if ($this->magic_quotes_status != -1) {
|
2828 |
return $v_result;
|
2829 |
}
|
@@ -2842,6 +2846,11 @@
|
|
2842 |
|| (!function_exists("set_magic_quotes_runtime"))) {
|
2843 |
return $v_result;
|
2844 |
}
|
|
|
|
|
|
|
|
|
|
|
2845 |
if ($this->magic_quotes_status != -1) {
|
2846 |
return $v_result;
|
2847 |
}
|
2824 |
|| (!function_exists("set_magic_quotes_runtime"))) {
|
2825 |
return $v_result;
|
2826 |
}
|
2827 |
+
|
2828 |
+
if (version_compare(phpversion(), '7.0', '>=')) {
|
2829 |
+
return $v_result;
|
2830 |
+
}
|
2831 |
if ($this->magic_quotes_status != -1) {
|
2832 |
return $v_result;
|
2833 |
}
|
2846 |
|| (!function_exists("set_magic_quotes_runtime"))) {
|
2847 |
return $v_result;
|
2848 |
}
|
2849 |
+
|
2850 |
+
if (version_compare(phpversion(), '7.0', '>=')) {
|
2851 |
+
return $v_result;
|
2852 |
+
}
|
2853 |
+
|
2854 |
if ($this->magic_quotes_status != -1) {
|
2855 |
return $v_result;
|
2856 |
}
|
modules/restore-class.php
CHANGED
@@ -385,7 +385,7 @@ if ( !class_exists('dbr_helper') ) {
|
|
385 |
{
|
386 |
dbr_log::log('Testing of TarGz under shell');
|
387 |
$res_tar = self::TarGz( DBP_PATH_TMP . '/test.tar.gz', array(DBP_PATH_TMP .'/index.php', DBP_PATH_TMP .'/.htaccess'), ABSPATH );
|
388 |
-
|
389 |
if ($res_tar === true) {
|
390 |
dbr_log::log('Testing of TarGz under shell was finished successfully');
|
391 |
dbr_helper::setCommand('test_targz_c', true);
|
@@ -902,6 +902,11 @@ if ( !class_exists('dbr_methods') ) {
|
|
902 |
$json['data'] = dbr_helper::getCommand('result-restore');
|
903 |
}
|
904 |
}
|
|
|
|
|
|
|
|
|
|
|
905 |
echo json_encode ( $json );
|
906 |
exit;
|
907 |
}
|
@@ -989,17 +994,24 @@ if ( !class_exists('dbr_methods') ) {
|
|
989 |
if (isset($table_insert[1]) && !empty($table_insert[1])) {
|
990 |
dbr_log::log('Restore table `' . $table_insert[1] . '`');
|
991 |
}
|
992 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
993 |
$arr_sql[md5($sql)] = 1;
|
994 |
dbr_helper::setCommand('sql-restore', $arr_sql);
|
995 |
}
|
996 |
}
|
997 |
if (isset($ress) && ( $ress === false || !empty( dbr_database::$error ) ) ) {
|
998 |
if (stripos(dbr_database::$error, 'duplicate entry') === false) {
|
999 |
-
dbr_helper::setError('MySQL Error: ' . dbr_database::$error );
|
1000 |
break;
|
1001 |
}
|
1002 |
-
}
|
1003 |
$sql = "";
|
1004 |
}
|
1005 |
}
|
@@ -1102,7 +1114,7 @@ if ( !class_exists('dbr_methods') ) {
|
|
1102 |
|
1103 |
$config = preg_replace($patterns, $replacements, $config);
|
1104 |
|
1105 |
-
|
1106 |
|
1107 |
$write = @file_put_contents(ABSPATH . "wp-config.php", $config);
|
1108 |
|
@@ -1306,9 +1318,9 @@ if ( !class_exists('dbr_methods') ) {
|
|
1306 |
if ($file_list === false) {
|
1307 |
dbr_log::log('Getting list of files from Dropbox');
|
1308 |
$files = $dropbox->listing("$folder_project/$name_backup");
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
dbr_helper::setCommand('download-with-dropbox-restore', $files, 'file-list');
|
1313 |
dbr_helper::is_work(time(), 'start');
|
1314 |
} else {
|
@@ -1508,7 +1520,9 @@ if (!class_exists('dbr_route')) {
|
|
1508 |
|
1509 |
if (stripos($res_api['res'], 'mod_security') !== false || dbr_helper::modSecureInstalled() ) {
|
1510 |
dbr_helper::is_work(time(), 'start');
|
1511 |
-
dbr_helper::setError('Apache module \'mod_security\' is active and affected on your website. For successfully restoring of website please switch it temporary off.');
|
|
|
|
|
1512 |
}
|
1513 |
}
|
1514 |
} else {
|
385 |
{
|
386 |
dbr_log::log('Testing of TarGz under shell');
|
387 |
$res_tar = self::TarGz( DBP_PATH_TMP . '/test.tar.gz', array(DBP_PATH_TMP .'/index.php', DBP_PATH_TMP .'/.htaccess'), ABSPATH );
|
388 |
+
|
389 |
if ($res_tar === true) {
|
390 |
dbr_log::log('Testing of TarGz under shell was finished successfully');
|
391 |
dbr_helper::setCommand('test_targz_c', true);
|
902 |
$json['data'] = dbr_helper::getCommand('result-restore');
|
903 |
}
|
904 |
}
|
905 |
+
|
906 |
+
$mod_security = dbr_helper::getCommand('mod_security');
|
907 |
+
if ($mod_security) {
|
908 |
+
$json['mod_secur'] = true;
|
909 |
+
}
|
910 |
echo json_encode ( $json );
|
911 |
exit;
|
912 |
}
|
994 |
if (isset($table_insert[1]) && !empty($table_insert[1])) {
|
995 |
dbr_log::log('Restore table `' . $table_insert[1] . '`');
|
996 |
}
|
997 |
+
}
|
998 |
+
|
999 |
+
if (isset($ress) && ( $ress === false || !empty( dbr_database::$error ) ) ) {
|
1000 |
+
if (stripos(dbr_database::$error, 'duplicate entry') === false) {
|
1001 |
+
dbr_helper::setError('MySQL Error: ' . dbr_database::$error . ' sql: ' . $sql );
|
1002 |
+
break;
|
1003 |
+
}
|
1004 |
+
}
|
1005 |
$arr_sql[md5($sql)] = 1;
|
1006 |
dbr_helper::setCommand('sql-restore', $arr_sql);
|
1007 |
}
|
1008 |
}
|
1009 |
if (isset($ress) && ( $ress === false || !empty( dbr_database::$error ) ) ) {
|
1010 |
if (stripos(dbr_database::$error, 'duplicate entry') === false) {
|
1011 |
+
dbr_helper::setError('MySQL Error: ' . dbr_database::$error . ' sql: ' . $sql );
|
1012 |
break;
|
1013 |
}
|
1014 |
+
}
|
1015 |
$sql = "";
|
1016 |
}
|
1017 |
}
|
1114 |
|
1115 |
$config = preg_replace($patterns, $replacements, $config);
|
1116 |
|
1117 |
+
//$config = preg_replace("/table_prefix[\s]{0,}=[\s]{0,}[\"']{1}(.*)[\"']{1}/U", "table_prefix = '" . dbr_database::$db_prefix . "'", $config);
|
1118 |
|
1119 |
$write = @file_put_contents(ABSPATH . "wp-config.php", $config);
|
1120 |
|
1318 |
if ($file_list === false) {
|
1319 |
dbr_log::log('Getting list of files from Dropbox');
|
1320 |
$files = $dropbox->listing("$folder_project/$name_backup");
|
1321 |
+
if (isset($files['error']) ) {
|
1322 |
+
dbr_helper::setError('Dropbox answered: ' . $files['text']);
|
1323 |
+
}
|
1324 |
dbr_helper::setCommand('download-with-dropbox-restore', $files, 'file-list');
|
1325 |
dbr_helper::is_work(time(), 'start');
|
1326 |
} else {
|
1520 |
|
1521 |
if (stripos($res_api['res'], 'mod_security') !== false || dbr_helper::modSecureInstalled() ) {
|
1522 |
dbr_helper::is_work(time(), 'start');
|
1523 |
+
//dbr_helper::setError('Apache module \'mod_security\' is active and affected on your website. For successfully restoring of website please switch it temporary off.');
|
1524 |
+
|
1525 |
+
dbr_helper::setCommand('mod_security', true);
|
1526 |
}
|
1527 |
}
|
1528 |
} else {
|
readme.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
=== Backup & Restore Dropbox ===
|
2 |
Plugin Name: Backup & Restore Dropbox
|
3 |
-
Version: 1.5.1.
|
4 |
Donate link: http://www.wpadm.com/donate
|
5 |
URI: http://www.wpadm.com/dropbox-backup
|
6 |
Tags: dropbox, backup, dropbox backup, database, file, full backup, manage, sicherung, database backup, file backup, page backup, page, web, web backup, web page, synchronize, clone, duplicate, move, web page backup, site, site backup, back up, cloud, Cloud Files, cloud backup, db backup, dump, german, migrate, multisite, German, schedule, storage, time, upload, data bank, zip, archive, backups, restore, db, recover, recovery, restoration, wp backup, wordpress backup, wordpress backup to dropbox, plugin wordpress backup, wpadm, wpadm.com, website, website backup, website back up, wp backup, wordpress backup, scheduled backup, backup scheduler, tool, backup tool
|
@@ -486,7 +486,8 @@ Please, keep your Dropbox Backup and Restore plugin up-to-date.
|
|
486 |
|
487 |
**Rev.** / **Description** <br />
|
488 |
|
489 |
-
|
|
|
490 |
To restore connect to the database will be also used mysqli or mysql. The database connection type will be selected automatically.<br />
|
491 |
During restoring process: the config file of WordPress wp-config.php will use config of new website configuration to connect to the database.<br />
|
492 |
@1448769 "Dropbox backup & restore" - added tmp folder for library pclzip, deleted files tmp for pclzip<br />
|
1 |
=== Backup & Restore Dropbox ===
|
2 |
Plugin Name: Backup & Restore Dropbox
|
3 |
+
Version: 1.5.1.2
|
4 |
Donate link: http://www.wpadm.com/donate
|
5 |
URI: http://www.wpadm.com/dropbox-backup
|
6 |
Tags: dropbox, backup, dropbox backup, database, file, full backup, manage, sicherung, database backup, file backup, page backup, page, web, web backup, web page, synchronize, clone, duplicate, move, web page backup, site, site backup, back up, cloud, Cloud Files, cloud backup, db backup, dump, german, migrate, multisite, German, schedule, storage, time, upload, data bank, zip, archive, backups, restore, db, recover, recovery, restoration, wp backup, wordpress backup, wordpress backup to dropbox, plugin wordpress backup, wpadm, wpadm.com, website, website backup, website back up, wp backup, wordpress backup, scheduled backup, backup scheduler, tool, backup tool
|
486 |
|
487 |
**Rev.** / **Description** <br />
|
488 |
|
489 |
+
@1506575 New version 1.4.7.3 with full update of Dropbox backup and restore plugin.
|
490 |
+
@1506495 WordPress backup plugin Dropbox backup & restore, added "exclude/include" files and folder window. Bug fixes.<br />
|
491 |
To restore connect to the database will be also used mysqli or mysql. The database connection type will be selected automatically.<br />
|
492 |
During restoring process: the config file of WordPress wp-config.php will use config of new website configuration to connect to the database.<br />
|
493 |
@1448769 "Dropbox backup & restore" - added tmp folder for library pclzip, deleted files tmp for pclzip<br />
|
template/wpadm_show_backup.php
CHANGED
@@ -397,6 +397,26 @@
|
|
397 |
}
|
398 |
}
|
399 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
400 |
var logs = [];
|
401 |
function processBar(method)
|
402 |
{
|
@@ -438,6 +458,8 @@
|
|
438 |
showProcessesData(data.processes);
|
439 |
}
|
440 |
|
|
|
|
|
441 |
if (process_flag == 1) {
|
442 |
if (data.data) {
|
443 |
if (method == 'restore') {
|
@@ -455,6 +477,10 @@
|
|
455 |
setTimeout('processBar("' + method + '")', 10000);
|
456 |
}
|
457 |
}
|
|
|
|
|
|
|
|
|
458 |
} else {
|
459 |
setTimeout('processBar("' + method + '")', 10000);
|
460 |
}
|
@@ -1316,7 +1342,7 @@
|
|
1316 |
<input autocomplete="off" type="checkbox" <?php echo ( isset($dropbox_options['type_archive']['zip_archive']) && $dropbox_options['type_archive']['zip_archive'] == 1 ) ? 'checked="checked"' : ''; ?> value="1" id="zip_archive" onclick="saveSetting('zip_archive')" />
|
1317 |
<label for="zip_archive" style="font-size: 13px;"><?php _e('Zip shell','dropbox-backup'); ?></label>
|
1318 |
</div>
|
1319 |
-
|
1320 |
<input autocomplete="off" type="checkbox" <?php echo ( isset($dropbox_options['type_archive']['targz_archive']) && $dropbox_options['type_archive']['targz_archive'] == 1 ) ? 'checked="checked"' : ''; ?> value="1" id="targz_archive" onclick="saveSetting('targz_archive')" />
|
1321 |
<label for="targz_archive" style="font-size: 13px;"><?php _e('TarGz archive','dropbox-backup'); ?></label>
|
1322 |
</div>
|
397 |
}
|
398 |
}
|
399 |
}
|
400 |
+
|
401 |
+
function initial_restore(method)
|
402 |
+
{
|
403 |
+
url_ajax = '<?php echo plugins_url('/modules/restore-class.php', dirname(__FILE__) ); ?>';
|
404 |
+
data_send = {};
|
405 |
+
data_send['key'] = '<?php echo esc_attr( $key ); ?>';
|
406 |
+
data_send['method'] = 'restore';
|
407 |
+
jQuery.ajax({
|
408 |
+
type: "POST",
|
409 |
+
url: url_ajax,
|
410 |
+
data: data_send,
|
411 |
+
error: function(jqXHR, textStatus, errorThrown){
|
412 |
+
//setTimeout('processBar("' + method + '")', 10000);
|
413 |
+
if (jqXHR.status != 0) {
|
414 |
+
//processStop();
|
415 |
+
//AjaxAlert(jqXHR, textStatus, errorThrown);
|
416 |
+
}
|
417 |
+
},
|
418 |
+
});
|
419 |
+
}
|
420 |
var logs = [];
|
421 |
function processBar(method)
|
422 |
{
|
458 |
showProcessesData(data.processes);
|
459 |
}
|
460 |
|
461 |
+
|
462 |
+
|
463 |
if (process_flag == 1) {
|
464 |
if (data.data) {
|
465 |
if (method == 'restore') {
|
477 |
setTimeout('processBar("' + method + '")', 10000);
|
478 |
}
|
479 |
}
|
480 |
+
|
481 |
+
if (data.mod_secur) { // initial restore ajax
|
482 |
+
initial_restore(method);
|
483 |
+
}
|
484 |
} else {
|
485 |
setTimeout('processBar("' + method + '")', 10000);
|
486 |
}
|
1342 |
<input autocomplete="off" type="checkbox" <?php echo ( isset($dropbox_options['type_archive']['zip_archive']) && $dropbox_options['type_archive']['zip_archive'] == 1 ) ? 'checked="checked"' : ''; ?> value="1" id="zip_archive" onclick="saveSetting('zip_archive')" />
|
1343 |
<label for="zip_archive" style="font-size: 13px;"><?php _e('Zip shell','dropbox-backup'); ?></label>
|
1344 |
</div>
|
1345 |
+
<div class="setting-checkbox">
|
1346 |
<input autocomplete="off" type="checkbox" <?php echo ( isset($dropbox_options['type_archive']['targz_archive']) && $dropbox_options['type_archive']['targz_archive'] == 1 ) ? 'checked="checked"' : ''; ?> value="1" id="targz_archive" onclick="saveSetting('targz_archive')" />
|
1347 |
<label for="targz_archive" style="font-size: 13px;"><?php _e('TarGz archive','dropbox-backup'); ?></label>
|
1348 |
</div>
|