Changeset 2346866
- Timestamp:
- 07/26/2020 10:03:44 PM (6 years ago)
- Location:
- backup-restore-manager
- Files:
-
- 228 added
- 10 edited
-
assets/screenshot-4.png (modified) (previous)
-
assets/screenshot-5.png (modified) (previous)
-
tags/1.0.2 (added)
-
tags/1.0.2/admin (added)
-
tags/1.0.2/admin/actions.php (added)
-
tags/1.0.2/admin/backups-table.php (added)
-
tags/1.0.2/admin/backups.php (added)
-
tags/1.0.2/admin/constants.php (added)
-
tags/1.0.2/admin/extensions.php (added)
-
tags/1.0.2/admin/faq.php (added)
-
tags/1.0.2/admin/filesystem-credentials.php (added)
-
tags/1.0.2/admin/hmbkp_functions.php (added)
-
tags/1.0.2/admin/menu.php (added)
-
tags/1.0.2/admin/page.php (added)
-
tags/1.0.2/admin/schedule-form-excludes.php (added)
-
tags/1.0.2/admin/schedule-form.php (added)
-
tags/1.0.2/admin/schedule-sentence.php (added)
-
tags/1.0.2/admin/schedule-settings.php (added)
-
tags/1.0.2/admin/schedule-upload_backup.php (added)
-
tags/1.0.2/admin/server-info.php (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/hmbkp.css (added)
-
tags/1.0.2/assets/hmbkp.js (added)
-
tags/1.0.2/assets/hmbkp.min.css (added)
-
tags/1.0.2/assets/hmbkp.min.js (added)
-
tags/1.0.2/assets/spinner-2x.gif (added)
-
tags/1.0.2/assets/spinner.gif (added)
-
tags/1.0.2/backdrop (added)
-
tags/1.0.2/backdrop/hm-backdrop.php (added)
-
tags/1.0.2/backdrop/license.txt (added)
-
tags/1.0.2/backdrop/namespace.php (added)
-
tags/1.0.2/backdrop/server.php (added)
-
tags/1.0.2/backdrop/task.php (added)
-
tags/1.0.2/backup-restore-manager.php (added)
-
tags/1.0.2/classes (added)
-
tags/1.0.2/classes/backup (added)
-
tags/1.0.2/classes/backup/class-backup-engine-database-imysqldump.php (added)
-
tags/1.0.2/classes/backup/class-backup-engine-database-mysqldump.php (added)
-
tags/1.0.2/classes/backup/class-backup-engine-database.php (added)
-
tags/1.0.2/classes/backup/class-backup-engine-file-zip-archive.php (added)
-
tags/1.0.2/classes/backup/class-backup-engine-file-zip.php (added)
-
tags/1.0.2/classes/backup/class-backup-engine-file.php (added)
-
tags/1.0.2/classes/backup/class-backup-engine.php (added)
-
tags/1.0.2/classes/backup/class-backup-status.php (added)
-
tags/1.0.2/classes/backup/class-backup-utilities.php (added)
-
tags/1.0.2/classes/backup/class-backup.php (added)
-
tags/1.0.2/classes/class-backupwordpress-wp-cli-command.php (added)
-
tags/1.0.2/classes/class-email-service.php (added)
-
tags/1.0.2/classes/class-excludes.php (added)
-
tags/1.0.2/classes/class-extensions.php (added)
-
tags/1.0.2/classes/class-notices.php (added)
-
tags/1.0.2/classes/class-path.php (added)
-
tags/1.0.2/classes/class-plugin.php (added)
-
tags/1.0.2/classes/class-requirement.php (added)
-
tags/1.0.2/classes/class-requirements.php (added)
-
tags/1.0.2/classes/class-scheduled-backup.php (added)
-
tags/1.0.2/classes/class-schedules.php (added)
-
tags/1.0.2/classes/class-service.php (added)
-
tags/1.0.2/classes/class-services.php (added)
-
tags/1.0.2/classes/class-setup.php (added)
-
tags/1.0.2/classes/class-site-size.php (added)
-
tags/1.0.2/classes/class-webhook-service.php (added)
-
tags/1.0.2/classes/class-wpremote-webhook-service.php (added)
-
tags/1.0.2/classes/deprecated.php (added)
-
tags/1.0.2/functions (added)
-
tags/1.0.2/functions/core.php (added)
-
tags/1.0.2/functions/interface.php (added)
-
tags/1.0.2/languages (added)
-
tags/1.0.2/languages/prefork (added)
-
tags/1.0.2/languages/prefork/backupwordpress-ca_ES.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-ca_ES.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-cs_CZ.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-cs_CZ.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-da_DK.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-da_DK.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-de_DE.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-de_DE.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-el_GR.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-el_GR.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-en_AU.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-en_AU.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-en_GB.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-en_GB.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-es_ES.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-es_ES.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-eu.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-eu.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-fr_FR.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-fr_FR.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-he_IL.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-he_IL.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-it_IT.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-it_IT.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-lt_LT.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-lt_LT.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-lv_LV.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-lv_LV.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-nl_NL.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-nl_NL.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-pl_PL.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-pl_PL.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-pt_BR.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-pt_BR.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-ro_RO.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-ro_RO.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-ru_RU.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-ru_RU.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-sk_SK.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-sk_SK.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-sr_RS.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-sr_RS.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress-zh-cn.mo (added)
-
tags/1.0.2/languages/prefork/backupwordpress-zh-cn.po (added)
-
tags/1.0.2/languages/prefork/backupwordpress.pot (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/restore.sh (added)
-
tags/1.0.2/sar (added)
-
tags/1.0.2/sar/.htaccess (added)
-
tags/1.0.2/sar/index.html (added)
-
tags/1.0.2/sar/srdb.class.php (added)
-
tags/1.0.2/sar/srdb.cli.php (added)
-
tags/1.0.2/uninstall.php (added)
-
tags/1.0.2/vendor (added)
-
tags/1.0.2/vendor/autoload.php (added)
-
tags/1.0.2/vendor/composer (added)
-
tags/1.0.2/vendor/composer/ClassLoader.php (added)
-
tags/1.0.2/vendor/composer/LICENSE (added)
-
tags/1.0.2/vendor/composer/autoload_classmap.php (added)
-
tags/1.0.2/vendor/composer/autoload_namespaces.php (added)
-
tags/1.0.2/vendor/composer/autoload_psr4.php (added)
-
tags/1.0.2/vendor/composer/autoload_real.php (added)
-
tags/1.0.2/vendor/composer/autoload_static.php (added)
-
tags/1.0.2/vendor/composer/installed.json (added)
-
tags/1.0.2/vendor/ifsnop (added)
-
tags/1.0.2/vendor/ifsnop/mysqldump-php (added)
-
tags/1.0.2/vendor/ifsnop/mysqldump-php/composer.json (added)
-
tags/1.0.2/vendor/ifsnop/mysqldump-php/src (added)
-
tags/1.0.2/vendor/ifsnop/mysqldump-php/src/Ifsnop (added)
-
tags/1.0.2/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump (added)
-
tags/1.0.2/vendor/ifsnop/mysqldump-php/src/Ifsnop/Mysqldump/Mysqldump.php (added)
-
tags/1.0.2/vendor/symfony (added)
-
tags/1.0.2/vendor/symfony/finder (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter/AbstractAdapter.php (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter/AbstractFindAdapter.php (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter/AdapterInterface.php (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter/BsdFindAdapter.php (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter/GnuFindAdapter.php (added)
-
tags/1.0.2/vendor/symfony/finder/Adapter/PhpAdapter.php (added)
-
tags/1.0.2/vendor/symfony/finder/CHANGELOG.md (added)
-
tags/1.0.2/vendor/symfony/finder/Comparator (added)
-
tags/1.0.2/vendor/symfony/finder/Comparator/Comparator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Comparator/DateComparator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Comparator/NumberComparator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Exception (added)
-
tags/1.0.2/vendor/symfony/finder/Exception/AccessDeniedException.php (added)
-
tags/1.0.2/vendor/symfony/finder/Exception/AdapterFailureException.php (added)
-
tags/1.0.2/vendor/symfony/finder/Exception/ExceptionInterface.php (added)
-
tags/1.0.2/vendor/symfony/finder/Exception/OperationNotPermitedException.php (added)
-
tags/1.0.2/vendor/symfony/finder/Exception/ShellCommandFailureException.php (added)
-
tags/1.0.2/vendor/symfony/finder/Expression (added)
-
tags/1.0.2/vendor/symfony/finder/Expression/Expression.php (added)
-
tags/1.0.2/vendor/symfony/finder/Expression/Glob.php (added)
-
tags/1.0.2/vendor/symfony/finder/Expression/Regex.php (added)
-
tags/1.0.2/vendor/symfony/finder/Expression/ValueInterface.php (added)
-
tags/1.0.2/vendor/symfony/finder/Finder.php (added)
-
tags/1.0.2/vendor/symfony/finder/Glob.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/CustomFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/FilePathsIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/FilenameFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/FilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/PathFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/Iterator/SortableIterator.php (added)
-
tags/1.0.2/vendor/symfony/finder/LICENSE (added)
-
tags/1.0.2/vendor/symfony/finder/Shell (added)
-
tags/1.0.2/vendor/symfony/finder/Shell/Command.php (added)
-
tags/1.0.2/vendor/symfony/finder/Shell/Shell.php (added)
-
tags/1.0.2/vendor/symfony/finder/SplFileInfo.php (added)
-
tags/1.0.2/vendor/symfony/finder/composer.json (added)
-
tags/1.0.2/vendor/symfony/finder/phpunit.xml.dist (added)
-
tags/1.0.2/vendor/symfony/process (added)
-
tags/1.0.2/vendor/symfony/process/CHANGELOG.md (added)
-
tags/1.0.2/vendor/symfony/process/Exception (added)
-
tags/1.0.2/vendor/symfony/process/Exception/ExceptionInterface.php (added)
-
tags/1.0.2/vendor/symfony/process/Exception/InvalidArgumentException.php (added)
-
tags/1.0.2/vendor/symfony/process/Exception/LogicException.php (added)
-
tags/1.0.2/vendor/symfony/process/Exception/ProcessFailedException.php (added)
-
tags/1.0.2/vendor/symfony/process/Exception/ProcessTimedOutException.php (added)
-
tags/1.0.2/vendor/symfony/process/Exception/RuntimeException.php (added)
-
tags/1.0.2/vendor/symfony/process/ExecutableFinder.php (added)
-
tags/1.0.2/vendor/symfony/process/LICENSE (added)
-
tags/1.0.2/vendor/symfony/process/PhpExecutableFinder.php (added)
-
tags/1.0.2/vendor/symfony/process/PhpProcess.php (added)
-
tags/1.0.2/vendor/symfony/process/Pipes (added)
-
tags/1.0.2/vendor/symfony/process/Pipes/AbstractPipes.php (added)
-
tags/1.0.2/vendor/symfony/process/Pipes/PipesInterface.php (added)
-
tags/1.0.2/vendor/symfony/process/Pipes/UnixPipes.php (added)
-
tags/1.0.2/vendor/symfony/process/Pipes/WindowsPipes.php (added)
-
tags/1.0.2/vendor/symfony/process/Process.php (added)
-
tags/1.0.2/vendor/symfony/process/ProcessBuilder.php (added)
-
tags/1.0.2/vendor/symfony/process/ProcessUtils.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests (added)
-
tags/1.0.2/vendor/symfony/process/Tests/ExecutableFinderTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/NonStopableProcess.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/PhpExecutableFinderTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/PhpProcessTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/PipeStdinInStdoutStdErrStreamSelect.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/ProcessBuilderTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/ProcessTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/ProcessUtilsTest.php (added)
-
tags/1.0.2/vendor/symfony/process/Tests/SignalListener.php (added)
-
tags/1.0.2/vendor/symfony/process/composer.json (added)
-
tags/1.0.2/vendor/symfony/process/phpunit.xml.dist (added)
-
tags/1.0.2/whitelist-html (added)
-
tags/1.0.2/whitelist-html/whitelist-html.php (added)
-
trunk/admin/schedule-sentence.php (modified) (3 diffs)
-
trunk/backup-restore-manager.php (modified) (1 diff)
-
trunk/classes/class-path.php (modified) (1 diff)
-
trunk/classes/class-plugin.php (modified) (2 diffs)
-
trunk/functions/core.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/restore.sh (modified) (12 diffs)
-
trunk/sar (added)
-
trunk/sar/.htaccess (added)
-
trunk/sar/index.html (added)
-
trunk/sar/srdb.class.php (added)
-
trunk/sar/srdb.cli.php (added)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
backup-restore-manager/trunk/admin/schedule-sentence.php
r2310552 r2346866 227 227 $hmbkp_restoreinfo = null; 228 228 if ( strpos( $hmbkp_restore, 'complete' ) ) $hmbkp_restoreinfo = sprintf( esc_html__( '1. Move all files and folders within %s into a temporary subfolder, e.g. %s', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b>', '<b>' . get_home_path() . 'temp/</b>' ) . '<br> 229 ' . sprintf( esc_html__( '2. Extract the backup file into %s', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b> ' ) . '229 ' . sprintf( esc_html__( '2. Extract the backup file into %s', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b> (use unzip with the -X flag to restore permissions and ownership)' ) . ' 230 230 <br> 231 231 ' . sprintf( esc_html__( '3. Open your SQL Manager (usually phpmyadmin), delete + recreate your database (or create a new one) and import the sql-file from the backup (now located in %s). Delete the sql-file afterwards.', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b>' ) . '<br> … … 236 236 ' . sprintf( esc_html__( '3. Update %s if your database name has changed.', 'backup-restore-manager' ), '<b>' . get_home_path() . 'wp-config.php</b>' ) . '<br>'; 237 237 elseif ( strpos( $hmbkp_restore, 'file' ) ) $hmbkp_restoreinfo = sprintf( esc_html__( '1. Move all files and folders within %s into a temporary subfolder, e.g. %s', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b>', '<b>' . get_home_path() . 'temp/</b>' ) . '<br> 238 ' . sprintf( esc_html__( '2. Extract the backup file into %s', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b> ' ) . ' <br>238 ' . sprintf( esc_html__( '2. Extract the backup file into %s', 'backup-restore-manager' ), '<b>' . get_home_path() . '</b> (use unzip with the -X flag to restore permissions and ownership)' ) . ' <br> 239 239 ' . sprintf( esc_html__( '3. If your SQL credentials have changed since the backup, update %s accordingly', 'backup-restore-manager' ), '<b>' . get_home_path() . 'wp-config.php</b>' ) . '<br> 240 240 ' . esc_html__( '4. Delete the temporary subfolder from step 1 if the restore was successful', 'backup-restore-manager' ); … … 288 288 <b>' . esc_html__( 'Restoring Backup..', 'backup-restore-manager' ) . '</b><br><br> 289 289 ' . $hmbkp_restore_file . '<br><br> 290 <p style="margin: 10px;">' . esc_html__( 'Enter the following commands in the shell/console to restore this backup (Linux only):', 'backup-restore-manager' ) . '</p> 291 <input type="text" style="width: 700px; padding: 3px; text-align: center; border: 1px solid #1d1d1d; background-color: #dcdcdc" value="chmod +x ' . plugin_dir_path(__DIR__) . 'restore.sh"><br> 292 <input type="text" style="width: 700px; margin: 15px; padding: 3px; text-align: center; border: 1px solid #1d1d1d; background-color: #dcdcdc" value=". ' . plugin_dir_path(__DIR__) . 'restore.sh"><br> 290 <p style="margin: 10px;">' . esc_html__( 'Enter the following command into the terminal to restore this backup:', 'backup-restore-manager' ) . '</p> 291 <input type="text" style="width: 700px; margin-bottom: 15px; padding: 3px; text-align: center; border: 1px solid #1d1d1d; background-color: #dcdcdc" value="sudo bash ' . plugin_dir_path(__DIR__) . 'restore.sh"><br> 293 292 <form method="post" name="hmbkp_restore_confirm" action="' . $hmbkp_phpself . '?page=backup-restore-manager' . $hmbkp_schedule_id_str . '"> 294 293 <input type="hidden" name="hmbkp_restore" value="' . $hmbkp_restore_file . '"> -
backup-restore-manager/trunk/backup-restore-manager.php
r2310552 r2346866 4 4 Plugin URI: https://wordpress.org/plugins/backup-restore-manager/ 5 5 Description: Simple automated Backup and Restore of your WordPress Website. 6 Version: 1.0. 16 Version: 1.0.2 7 7 Author: OnionBazaar 8 8 Author URI: https://onionbazaar.org -
backup-restore-manager/trunk/classes/class-path.php
r2293954 r2346866 472 472 } 473 473 474 /* OBZMOD */ 475 // Don't remove the cron settings file 476 if ( 'backup-restore-manager-cron' === $this->current()->getBasename() ) { 477 return false; 478 } 479 /* OBZMOD */ 480 474 481 // Don't cleanup the backup running file 475 482 return ! preg_match( '/(.*-running)/', $this->current() ); -
backup-restore-manager/trunk/classes/class-plugin.php
r2310552 r2346866 10 10 const PLUGIN_VERSION = '3.6.4'; 11 11 */ 12 const PLUGIN_VERSION = '1.0. 1';12 const PLUGIN_VERSION = '1.0.2'; 13 13 /* OBZMOD */ 14 14 /** … … 287 287 288 288 // Fire the update action 289 if ( self::PLUGIN_VERSION != get_option( ' hmbkp_plugin_version' ) ) {289 if ( self::PLUGIN_VERSION != get_option( 'obzbrm_plugin_version' ) ) { 290 290 update(); 291 291 } -
backup-restore-manager/trunk/functions/core.php
r2293954 r2346866 9 9 function update() { 10 10 11 // Update from backUpWordPress 0.4.5 12 if ( get_option( 'bkpwp_max_backups' ) ) { 13 14 // Carry over the custom path 15 if ( $legacy_path = get_option( 'bkpwppath' ) ) { 16 update_option( 'hmbkp_path', $legacy_path ); 17 } 18 19 // Options to remove 20 $legacy_options = array( 21 'bkpwp_archive_types', 22 'bkpwp_automail_from', 23 'bkpwp_domain', 24 'bkpwp_domain_path', 25 'bkpwp_easy_mode', 26 'bkpwp_excludelists', 27 'bkpwp_install_user', 28 'bkpwp_listmax_backups', 29 'bkpwp_max_backups', 30 'bkpwp_presets', 31 'bkpwp_reccurrences', 32 'bkpwp_schedules', 33 'bkpwp_calculation', 34 'bkpwppath', 35 'bkpwp_status_config', 36 'bkpwp_status', 37 ); 38 39 foreach ( $legacy_options as $option ) { 40 delete_option( $option ); 41 } 42 43 global $wp_roles; 44 45 $wp_roles->remove_cap( 'administrator', 'manage_backups' ); 46 $wp_roles->remove_cap( 'administrator', 'download_backups' ); 47 48 wp_clear_scheduled_hook( 'bkpwp_schedule_bkpwp_hook' ); 49 50 } 51 52 // Version 1 to 2 53 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '2.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 54 55 /** 56 * Setup a backwards compatible schedule 57 */ 58 $legacy_schedule = new Scheduled_Backup( 'backup' ); 59 60 // Backup type 61 if ( ( defined( 'HMBKP_FILES_ONLY' ) && HMBKP_FILES_ONLY ) || get_option( 'hmbkp_files_only' ) ) { 62 $legacy_schedule->set_type( 'file' ); 63 } elseif ( ( defined( 'HMBKP_DATABASE_ONLY' ) && HMBKP_DATABASE_ONLY ) || get_option( 'hmbkp_database_only' ) ) { 64 $legacy_schedule->set_type( 'database' ); 65 } else { 66 $legacy_schedule->set_type( 'complete' ); 67 } 68 69 // Daily schedule time 70 if ( defined( 'HMBKP_DAILY_SCHEDULE_TIME' ) && HMBKP_DAILY_SCHEDULE_TIME ) { 71 $legacy_schedule->set_schedule_start_time( strtotime( HMBKP_DAILY_SCHEDULE_TIME ) ); 72 } 73 74 // Backup schedule 75 $legacy_schedule->set_reoccurrence( get_option( 'hmbkp_schedule_frequency', 'daily' ) ); 76 77 // Automatic backups disabled? 78 if ( ( defined( 'HMBKP_DISABLE_AUTOMATIC_BACKUP' ) && HMBKP_DISABLE_AUTOMATIC_BACKUP ) || get_option( 'hmbkp_disable_automatic_backup' ) ) { 79 $legacy_schedule->set_reoccurrence( 'manually' ); 80 } 81 82 // Max backups 83 if ( defined( 'HMBKP_MAX_BACKUPS' ) && is_numeric( HMBKP_MAX_BACKUPS ) ) { 84 $legacy_schedule->set_max_backups( (int) HMBKP_MAX_BACKUPS ); 85 } else { 86 $legacy_schedule->set_max_backups( (int) get_option( 'hmbkp_max_backups', 10 ) ); 87 } 88 89 // Excludes 90 if ( get_option( 'hmbkp_excludes' ) ) { 91 $legacy_schedule->set_excludes( get_option( 'hmbkp_excludes' ) ); 92 } 93 94 // Backup email 95 if ( defined( 'HMBKP_EMAIL' ) && is_email( HMBKP_EMAIL ) ) { 96 $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => HMBKP_EMAIL ) ); 97 } elseif ( is_email( get_option( 'hmbkp_email_address' ) ) ) { 98 $legacy_schedule->set_service_options( 'HMBKP_Email_Service', array( 'email' => get_option( 'hmbkp_email_address' ) ) ); 99 } 100 101 // Set the archive filename to what it used to be 102 $legacy_schedule->backup_filename = implode( '-', array( get_bloginfo( 'name' ), 'backup', current_time( 'Y-m-d-H-i-s' ) ) ) . '.zip'; 103 104 $legacy_schedule->save(); 105 106 $legacy_path = get_option( 'hmbkp_path' ); 107 108 if ( $legacy_path ) { 109 110 // Prepend 'backup-' to the beginning of any legacy backups so they are picked up by the legacy schedule 111 if ( $handle = opendir( $legacy_path ) ) { 112 while ( false !== ( $file = readdir( $handle ) ) ) { 113 if ( 'zip' === pathinfo( $file, PATHINFO_EXTENSION ) ) { 114 rename( trailingslashit( $legacy_path ) . $file, trailingslashit( $legacy_path ) . 'backup-' . $file ); 115 } 116 } 117 closedir( $handle ); 118 } 119 120 PATH::get_instance()->move_old_backups( $legacy_path ); 121 122 } 123 124 // Remove the legacy options 125 foreach ( array( 'hmbkp_database_only', 'hmbkp_files_only', 'hmbkp_max_backups', 'hmbkp_email_address', 'hmbkp_email', 'hmbkp_schedule_frequency', 'hmbkp_disable_automatic_backup' ) as $option_name ) { 126 delete_option( $option_name ); 127 } 128 } 129 130 // Update from 2.x to 3.0 131 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '2.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 132 133 // Remove the plugin data cache 134 delete_transient( 'hmbkp_plugin_data' ); 135 136 } 137 138 // Update to 3.1 139 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 140 141 // Remove the plugin data cache 142 delete_option( 'hmbkp_path' ); 143 delete_option( 'hmbkp_default_path' ); 144 145 } 146 147 // update to 3.1.4 148 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.1.4', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 149 150 $old_option_names = array( 151 'HM\BackUpWordPressDropbox\Dropbox_Service' => 'dropbox', 152 'HMBKP_DX_Backup_Service' => 'dropbox', 153 'HM\BackUpWordPressFTP\FTP_Backup_Service' => 'ftp', 154 'HMBKP_FTP_Backup_Service' => 'ftp', 155 'HM\BackUpWordPressGDrive\Google_Drive_BackUp' => 'google-drive', 156 'HMBKP_GDV_Backup_Service' => 'google-drive', 157 'HM\BackUpWordPressRackspace\RackSpace_BackUp' => 'rackspace-cloud', 158 'HMBKP_RSC_Backup_Service' => 'rackspace-cloud', 159 'HM\BackUpWordPressS3\S3_Backup' => 's3', 160 'HMBKP_S3_Backup_Service' => 's3', 161 'HM\BackUpWordPressWinAzure\WinAzure_Backup' => 'azure', 162 'HMBKP_WAZ_Backup_Service' => 'azure', 163 'HM\BackUpWordPress\Email_Service' => 'email', 164 ); 165 166 global $wpdb; 167 168 // Get all schedule options with a SELECT query and delete them. 169 $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) ); 170 171 if ( 0 < count( $schedules ) ) { 172 173 // Access each schedules settings to see if the addon settings names need to be be updated to the new naming convention which uses the service slug generated from the $name property. 174 foreach ( $schedules as $schedule_id ) { 175 176 // Load the settings for this schedule into an array 177 // so we can loop through the different service settings 178 $schedule_settings = get_option( $schedule_id ); 179 180 // Iterate over each schedule setting for this schedule and check its name against our array. 181 foreach ( $schedule_settings as $key => $val ) { 182 // Find the current element key in our control array and get its value. Set a new element in the settings array with the found value as its key. Aka rename the element key 183 if ( array_key_exists( $key, $old_option_names ) ) { 184 185 // move the value to our new key 186 $schedule_settings[ $old_option_names[ $key ] ] = $schedule_settings[ $key ]; 187 188 unset( $schedule_settings[ $key ] ); 189 190 } 191 } 192 193 // Save back to the DB 194 update_option( $schedule_id, $schedule_settings ); 195 } 196 } 197 } 198 199 // Update to 3.1.5 200 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.1.5', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 201 202 // Delete all transients 203 $transients = array( 204 'hmbkp_plugin_data', 205 'hmbkp_directory_filesizes', 206 'hmbkp_directory_filesizes_running', 207 'hmbkp_wp_cron_test_beacon', 208 'hm_backdrop', 209 ); 210 211 array_map( 'delete_transient', $transients ); 212 213 // Clear duplicate schedules on multisite 214 if ( is_multisite() ) { 215 216 // get current blogs from DB 217 $blogs = wp_get_sites(); 218 219 foreach ( $blogs as $blog ) { 220 221 switch_to_blog( get_current_blog_id() ); 222 223 if ( is_main_site( get_current_blog_id() ) ) { 224 continue; 225 } 226 227 global $wpdb; 228 229 // Get the schedule options 230 $schedules = $wpdb->get_col( $wpdb->prepare( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE %s", 'hmbkp_schedule_%' ) ); 231 232 // clear schedules 233 foreach ( array_map( function ( $item ) { 234 return ltrim( $item, 'hmbkp_schedule_' ); 235 }, $schedules ) as $item ) { 236 wp_clear_scheduled_hook( 'hmbkp_schedule_hook', array( 'id' => $item ) ); 237 } 238 239 // delete options 240 array_map( 'delete_option', $schedules ); 241 242 array_map( 'delete_option', array( 'hmbkp_enable_support', 'hmbkp_plugin_version', 'hmbkp_path', 'hmbkp_default_path', 'hmbkp_upsell' ) ); 243 244 // Delete all transients 245 array_map( 'delete_transient', array( 'hmbkp_plugin_data', 'hmbkp_directory_filesizes', 'hmbkp_directory_filesize_running', 'timeout_hmbkp_wp_cron_test_beacon', 'hmbkp_wp_cron_test_beacon' ) ); 246 247 } 248 249 restore_current_blog(); 250 } 251 } 252 253 // Update from 3.3.0 254 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.3.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 255 256 $schedules = Schedules::get_instance(); 257 258 // Loop through all schedules and re-set the reccurrence to include hmbkp_ 259 foreach ( $schedules->get_schedules() as $schedule ) { 260 261 $reoccurrence = $schedule->get_reoccurrence(); 262 263 if ( 'manually' !== $reoccurrence && strpos( $reoccurrence, 'hmbkp_' ) === 0 ) { 264 $schedule->set_reoccurrence( substr( $reoccurrence, 6 ) ); 265 } 266 267 $schedule->save(); 268 269 } 270 } 271 272 // Update from 3.3.4 273 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '3.4.0', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 274 delete_transient( 'hmbkp_directory_filesizes' ); 11 // Remove old plugin version variable 12 if ( get_option( 'hmbkp_plugin_version' ) && version_compare( '1.0.2', get_option( 'hmbkp_plugin_version' ), '>' ) ) { 13 delete_option( 'hmbkp_plugin_version' ); 275 14 } 276 15 277 16 // Every update 278 if ( get_option( ' hmbkp_plugin_version' ) && version_compare( Plugin::PLUGIN_VERSION, get_option( 'hmbkp_plugin_version' ), '>' ) ) {17 if ( get_option( 'obzbrm_plugin_version' ) && version_compare( Plugin::PLUGIN_VERSION, get_option( 'obzbrm_plugin_version' ), '>' ) ) { 279 18 280 19 require_once( HMBKP_PLUGIN_PATH . 'classes/class-setup.php' ); … … 287 26 288 27 // Update the stored version 289 if ( get_option( ' hmbkp_plugin_version' ) !== Plugin::PLUGIN_VERSION ) {290 update_option( ' hmbkp_plugin_version', Plugin::PLUGIN_VERSION );28 if ( get_option( 'obzbrm_plugin_version' ) !== Plugin::PLUGIN_VERSION ) { 29 update_option( 'obzbrm_plugin_version', Plugin::PLUGIN_VERSION ); 291 30 } 292 31 -
backup-restore-manager/trunk/readme.txt
r2310552 r2346866 5 5 Requires at least: 3.9 6 6 Tested up to: 5.4.1 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GNU General Public License v3.0 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 15 15 Backup & Restore Manager will back up your entire WordPress website including your database and all your files, manually or on a custom schedule. 16 16 17 Thisis a fork of the popular backup software [BackUpWordPress](https://wordpress.org/plugins/backupwordpress) by HumanMade, which seems to be discontinued unfortunately. We continue maintenance and have extended the plugin with the ability to upload backup files and an automated restore feature.17 Backup & Restore Manager is a fork of the popular backup software [BackUpWordPress](https://wordpress.org/plugins/backupwordpress) by HumanMade, which seems to be discontinued unfortunately. We continue maintenance and have extended the plugin with the ability to upload backup files and an automated restore feature. 18 18 19 19 If you are already using BackUpWordPress, switching to Backup & Restore Manager will retain all your settings, schedules and backups (and vice versa). … … 42 42 The plugin will try to use the `mysqldump` and `zip` commands via shell if they are available, using these will greatly improve the time it takes to back up your site. 43 43 44 Protip: To enable fully automated restores, edit the file `backup-restore-manager-cron` in your backup directory from `no` to `yes` and set up a cronjob to call the script restore.sh every minute (located in the plugin directory). 44 Protip: To enable fully automated restores, edit the file `backup-restore-manager-cron` in your backup directory from `no` to `yes` and set up a cronjob to call the script `restore.sh` (located in the plugin directory) every minute (as root), e.g: 45 sudo crontab -e 46 * * * * * bash /var/www/html/wp-content/plugins/backup-restore-manager/restore.sh 45 47 46 48 == Frequently Asked Questions == … … 103 105 == Changelog == 104 106 107 = 1.0.2 - 2020-07-26 = 108 * Improved restore script, Bugfixes 109 105 110 = 1.0.1 - 2020-05-23 = 106 111 * Minor changes restore script cronmode -
backup-restore-manager/trunk/restore.sh
r2310552 r2346866 12 12 else 13 13 echo "# ERROR: Wordpress directory not found. Edit this script if you are using a non-default directory structure." 14 return14 exit 15 15 fi 16 16 … … 27 27 28 28 if (( $hits == 0)); then 29 30 29 for BACKUPDIRPATH in $WPDIR/wp-content/uploads/*; do 31 30 [ -e "$BACKUPDIRPATH" ] || continue … … 37 36 fi 38 37 done 39 40 38 if (( $hits == 0)); then 41 39 echo "# ERROR: Backup directory not found. edit this script if you are using a non-default directory structure." 42 return40 exit 43 41 fi 44 42 fi … … 66 64 else 67 65 echo "# ERROR: Backuptype not detected. Make sure backup files are not renamed." 68 return66 exit 69 67 fi 70 68 else 71 69 echo "# No Restore Job found." 72 return70 exit 73 71 fi 74 72 … … 92 90 SQLPASS=${SQLPASSR#"'"} 93 91 SQLPASS=${SQLPASS%"'"} 94 echo "# Current SQL Password: [hidden]"92 echo "# Current SQL Password: $SQLPASS" 95 93 96 94 if (($BACKUPTYPE < 3)); then … … 104 102 if [ ! -t 1 ] ; then 105 103 echo "# Could not retrieve SQL credentials from wp-config.php. Exiting." 106 return104 exit 107 105 else 108 106 if [ -f "$WPDIR/wp-config.php" ]; then … … 122 120 if [ -z "$WPSITEURL" ]; then 123 121 echo "# ERROR: Could not get Website URL from Database, probably incorrect credentials. Try again." 124 return122 exit 125 123 else 126 124 echo "# Current Site URL: $WPSITEURL" … … 163 161 BACKUPDIROLD="$WPDIR/backup-restore-manager-old/wp-content$BACKUPPRE/$(basename $BACKUPDIR)" 164 162 echo "# extracting $BACKUPFILE to $WPDIR ..." 165 unzip-o -q "$BACKUPDIROLD/$BACKUPFILE" -d "$WPDIR"163 sudo unzip -X -o -q "$BACKUPDIROLD/$BACKUPFILE" -d "$WPDIR" 166 164 167 165 #move backup directory … … 217 215 echo "# Site/Home URL unchanged" 218 216 else 219 echo "# Site/Home URL changed, write them to database ..." 217 if [ "$WPSITEURL" == "$WPHOME" ]; then 218 echo "# Site/Home URL changed, replacing all occurences of $WPSITEURLBCK with $WPSITEURL in the database ..." 219 else 220 echo "# Site/Home URL changed, replacing all occurences of $WPSITEURLBCK with $WPSITEURL and $WPHOMEBCK with $WPHOME in the database ..." 221 fi 220 222 mysql -h "$SQLHOST" -u "$SQLUSER" -p"$SQLPASS" -e "UPDATE $SQLDB.wp_options SET option_value = '$WPSITEURL' WHERE option_name ='siteurl'" 221 223 mysql -h "$SQLHOST" -u "$SQLUSER" -p"$SQLPASS" -e "UPDATE $SQLDB.wp_options SET option_value = '$WPHOME' WHERE option_name ='home'" 224 if [ -f "$PLUGINDIR/sar/srdb.cli.php" ]; then 225 php $PLUGINDIR/sar/srdb.cli.php -h "$SQLHOST" -u "$SQLUSER" -p "$SQLPASS" -n "$SQLDB" -s "$WPSITEURLBCK" -r "$WPSITEURL" -v false 226 php $PLUGINDIR/sar/srdb.cli.php -h "$SQLHOST" -u "$SQLUSER" -p "$SQLPASS" -n "$SQLDB" -s "$WPHOMEBCK" -r "$WPHOME" -v false 227 else 228 echo "$PLUGINDIR/sar/srdb.cli.php not found (introduced in version 1.0.2). The restore was successful, but there are most likely still occurences of the old URL in the database." 229 fi 222 230 fi 223 231 echo "# Database and File Restore Complete!" … … 229 237 #extract backupfile 230 238 echo "# extracting $BACKUPFILE to $WPDIR ..." 231 unzip-o -q "$BACKUPDIR/$BACKUPFILE" -d "$WPDIR"239 sudo unzip -X -o -q "$BACKUPDIR/$BACKUPFILE" -d "$WPDIR" 232 240 233 241 for SQLFILENAMEPATH in $WPDIR/database-$SITENAME*.sql; do … … 251 259 echo "# Site/Home URL unchanged" 252 260 else 253 echo "# Site/Home URL changed, write them to database ..." 261 if [ "$WPSITEURL" == "$WPHOME" ]; then 262 echo "# Site/Home URL changed, replacing all occurences of $WPSITEURLBCK with $WPSITEURL in the database ..." 263 else 264 echo "# Site/Home URL changed, replacing all occurences of $WPSITEURLBCK with $WPSITEURL and $WPHOMEBCK with $WPHOME in the database ..." 265 fi 254 266 mysql -h "$SQLHOST" -u "$SQLUSER" -p"$SQLPASS" -e "UPDATE $SQLDB.wp_options SET option_value = '$WPSITEURL' WHERE option_name ='siteurl'" 255 267 mysql -h "$SQLHOST" -u "$SQLUSER" -p"$SQLPASS" -e "UPDATE $SQLDB.wp_options SET option_value = '$WPHOME' WHERE option_name ='home'" 268 if [ -f "$PLUGINDIR/sar/srdb.cli.php" ]; then 269 php $PLUGINDIR/sar/srdb.cli.php -h "$SQLHOST" -u "$SQLUSER" -p "$SQLPASS" -n "$SQLDB" -s "$WPSITEURLBCK" -r "$WPSITEURL" -v false 270 php $PLUGINDIR/sar/srdb.cli.php -h "$SQLHOST" -u "$SQLUSER" -p "$SQLPASS" -n "$SQLDB" -s "$WPHOMEBCK" -r "$WPHOME" -v false 271 else 272 echo "$PLUGINDIR/sar/srdb.cli.php not found (introduced in version 1.0.2). The restore was successful, but there are most likely still occurences of the old URL in the database." 273 fi 256 274 fi 257 275 echo "# Database Restore Complete!" … … 273 291 BACKUPDIROLD="$WPDIR/backup-restore-manager-old/wp-content$BACKUPPRE/$(basename $BACKUPDIR)" 274 292 echo "# extracting $BACKUPFILE to $WPDIR ..." 275 unzip-o -q "$BACKUPDIROLD/$BACKUPFILE" -d "$WPDIR"293 sudo unzip -X -o -q "$BACKUPDIROLD/$BACKUPFILE" -d "$WPDIR" 276 294 277 295 #get sql credentials from backup -
backup-restore-manager/trunk/uninstall.php
r2293954 r2346866 36 36 37 37 // Remove all the options 38 /* OBZMOD 38 39 array_map( 'delete_option', array( 'hmbkp_enable_support', 'hmbkp_plugin_version', 'hmbkp_path', 'hmbkp_default_path', 'hmbkp_upsell', 'hmbkp_notices' ) ); 40 */ 41 array_map( 'delete_option', array( 'hmbkp_enable_support', 'obzbrm_plugin_version', 'hmbkp_path', 'hmbkp_default_path', 'hmbkp_upsell', 'hmbkp_notices' ) ); 42 /* OBZMOD */ 39 43 40 44 // Delete all transients
Note: See TracChangeset
for help on using the changeset viewer.