Changeset 3815997
- Timestamp:
- 11/22/2026 12:58:09 AM (less than one hour ago)
- Location:
- accessnow-site-replica
- Files:
-
- 6 added
- 33 edited
- 1 copied
-
assets/screenshot-1.png (modified) ( previous)
-
assets/screenshot-3.png (modified) ( previous)
-
assets/screenshot-6.png (modified) ( previous)
-
tags/1.2.0 (copied) (copied from accessnow-site-replica/trunk )
-
tags/1.2.0/accessnow-site-replica.php (modified) (2 diffs)
-
tags/1.2.0/assets/js/admin.js (modified) (1 diff)
-
tags/1.2.0/includes/admin/class-admin.php (modified) (6 diffs)
-
tags/1.2.0/includes/class-settings.php (modified) (2 diffs)
-
tags/1.2.0/includes/client/class-remote-site.php (modified) (1 diff)
-
tags/1.2.0/includes/files/class-exclusions.php (modified) (5 diffs)
-
tags/1.2.0/includes/jobs/class-ajax-driver.php (modified) (1 diff)
-
tags/1.2.0/includes/jobs/class-job-runner.php (modified) (1 diff)
-
tags/1.2.0/includes/jobs/class-job-store.php (modified) (1 diff)
-
tags/1.2.0/includes/jobs/steps/class-check.php (added)
-
tags/1.2.0/includes/jobs/steps/class-restore.php (modified) (3 diffs)
-
tags/1.2.0/includes/restore/class-files.php (modified) (5 diffs)
-
tags/1.2.0/includes/sets/class-damaged-file.php (added)
-
tags/1.2.0/includes/sets/class-set-files.php (modified) (1 diff)
-
tags/1.2.0/includes/source/class-api.php (modified) (1 diff)
-
tags/1.2.0/includes/source/class-resend-error.php (added)
-
tags/1.2.0/languages/accessnow-site-replica.pot (modified) (42 diffs)
-
tags/1.2.0/readme.txt (modified) (2 diffs)
-
trunk/accessnow-site-replica.php (modified) (2 diffs)
-
trunk/assets/js/admin.js (modified) (1 diff)
-
trunk/includes/admin/class-admin.php (modified) (6 diffs)
-
trunk/includes/class-settings.php (modified) (2 diffs)
-
trunk/includes/client/class-remote-site.php (modified) (1 diff)
-
trunk/includes/files/class-exclusions.php (modified) (5 diffs)
-
trunk/includes/jobs/class-ajax-driver.php (modified) (1 diff)
-
trunk/includes/jobs/class-job-runner.php (modified) (1 diff)
-
trunk/includes/jobs/class-job-store.php (modified) (1 diff)
-
trunk/includes/jobs/steps/class-check.php (added)
-
trunk/includes/jobs/steps/class-restore.php (modified) (3 diffs)
-
trunk/includes/restore/class-files.php (modified) (5 diffs)
-
trunk/includes/sets/class-damaged-file.php (added)
-
trunk/includes/sets/class-set-files.php (modified) (1 diff)
-
trunk/includes/source/class-api.php (modified) (1 diff)
-
trunk/includes/source/class-resend-error.php (added)
-
trunk/languages/accessnow-site-replica.pot (modified) (42 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
accessnow-site-replica/tags/1.2.0/accessnow-site-replica.php
r3736115 r3815997 4 4 * Plugin URI: https://accessnow.com.au/projects/site-replica/ 5 5 * Description: Back up, clone and restore large WordPress sites in small, resumable steps, even on shared hosting with little free disk. Pull a live site to another install, clone it with rollback, and schedule backups to Google Drive or S3-compatible storage. 6 * Version: 1. 1.06 * Version: 1.2.0 7 7 * Requires at least: 6.4 8 8 * Requires PHP: 7.4 … … 29 29 } 30 30 31 define( 'ACCESSNOW_REPLICA_VERSION', '1. 1.0' );31 define( 'ACCESSNOW_REPLICA_VERSION', '1.2.0' ); 32 32 define( 'ACCESSNOW_REPLICA_PROTOCOL', 1 ); 33 33 define( 'ACCESSNOW_REPLICA_FILE', __FILE__ ); -
accessnow-site-replica/tags/1.2.0/assets/js/admin.js
r3726810 r3815997 262 262 if (a.removed && a.removed.length) { 263 263 box.appendChild(el('p', {}, i18n.planRemoved + ' ' + a.removed.join(', '))); 264 } 265 if (a.replaced && a.replaced.count) { 266 var replacedBox = box.appendChild(el('div', { 'class': 'srp-replaced' })); 267 replacedBox.appendChild(el('p', {}, i18n.planReplaced)); 268 var replacedList = replacedBox.appendChild(el('ul', { 'class': 'srp-pairs' })); 269 a.replaced.list.forEach(function (f) { replacedList.appendChild(el('li', { 'data-part': f.part }, f.path)); }); 270 if (a.replaced.count > a.replaced.list.length) { 271 replacedBox.appendChild(el('p', { 'class': 'srp-muted' }, i18n.planMore.replace('%s', Number(a.replaced.count - a.replaced.list.length).toLocaleString()))); 272 } 264 273 } 265 274 box.appendChild(el('p', { 'class': 'description' }, i18n.planKept)); -
accessnow-site-replica/tags/1.2.0/includes/admin/class-admin.php
r3726810 r3815997 119 119 'planMoved' => __( 'Tables that exist only on this site and will be removed (kept until you choose Keep):', 'accessnow-site-replica' ), 120 120 'planRemoved' => __( 'Plugins that exist only on this site and will be removed (Roll back returns them):', 'accessnow-site-replica' ), 121 'planReplaced' => __( 'Files in plugin, theme and must-use plugin folders that the backup also has, which only this site has. Each of those folders is replaced whole, the way an update replaces it, so these will be removed (Roll back returns them):', 'accessnow-site-replica' ), 122 /* translators: %s: number of files not listed. */ 123 'planMore' => __( '…and %s more.', 'accessnow-site-replica' ), 121 124 'planKept' => __( 'Media and must-use plugins that exist only on this site are kept.', 'accessnow-site-replica' ), 122 125 'optKeepLogin' => __( 'Keep me logged in (carry my account over)', 'accessnow-site-replica' ), … … 172 175 'clone' => __( 'Clone into this site', 'accessnow-site-replica' ), 173 176 'restore' => __( 'Restore', 'accessnow-site-replica' ), 177 'check' => __( 'Check backup', 'accessnow-site-replica' ), 174 178 'backup' => __( 'Back up this site', 'accessnow-site-replica' ), 175 179 'cloud' => __( 'Cloud backup', 'accessnow-site-replica' ), … … 444 448 <?php if ( $complete ) : ?> 445 449 <span class="srp-pill is-on"><?php esc_html_e( 'Complete', 'accessnow-site-replica' ); ?></span> 450 <?php $checked = \AccessNow\Replica\Jobs\Steps\Check::result( (string) $m['set_id'] ); ?> 451 <?php if ( $checked && 0 === (int) $checked['bad'] ) : ?> 452 <br><span class="srp-muted"> 453 <?php 454 /* translators: %s: date. */ 455 echo esc_html( sprintf( __( 'Checked %s: intact', 'accessnow-site-replica' ), wp_date( get_option( 'date_format' ), (int) $checked['time'] ) ) ); 456 ?> 457 </span> 458 <?php elseif ( $checked ) : ?> 459 <br><span class="srp-pill is-warn"> 460 <?php 461 /* translators: %s: date. */ 462 echo esc_html( sprintf( __( 'Damaged (checked %s)', 'accessnow-site-replica' ), wp_date( get_option( 'date_format' ), (int) $checked['time'] ) ) ); 463 ?> 464 </span> 465 <?php endif; ?> 446 466 <?php if ( ! empty( $m['warnings'] ) ) : ?> 447 467 <br><span class="srp-muted"> … … 459 479 <?php if ( $complete ) : ?> 460 480 <button type="button" class="button" data-srp-start="restore" data-set="<?php echo esc_attr( $m['set_id'] ); ?>" <?php disabled( (bool) $active ); ?>><?php esc_html_e( 'Restore to this site', 'accessnow-site-replica' ); ?></button> 481 <button type="button" class="button" data-srp-start="check" data-set="<?php echo esc_attr( $m['set_id'] ); ?>" <?php disabled( (bool) $active ); ?> title="<?php esc_attr_e( 'Read the whole backup back and compare every part with what was backed up, to find damage before you need it.', 'accessnow-site-replica' ); ?>"><?php esc_html_e( 'Check', 'accessnow-site-replica' ); ?></button> 461 482 <?php endif; ?> 462 483 <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="srp-inline" onsubmit="return confirm('<?php echo esc_js( __( 'Delete this backup permanently?', 'accessnow-site-replica' ) ); ?>');"> … … 657 678 <tr><th scope="row"><label for="srp-excl"><?php esc_html_e( 'Also exclude (on this site as a source)', 'accessnow-site-replica' ); ?></label></th> 658 679 <td><textarea id="srp-excl" name="extra_excludes" rows="4" class="large-text code" placeholder="uploads/big-archive uploads/*.zip"><?php echo esc_textarea( (string) $s['extra_excludes'] ); ?></textarea> 659 <p class="description"><?php esc_html_e( 'One pattern per line, relative to wp-content. Caches, other backup plugins’ folders, .git and node_modules are always excluded.', 'accessnow-site-replica' ); ?></p></td></tr> 680 <p class="description"><?php esc_html_e( 'One pattern per line, relative to wp-content. Start a line with **/ to leave out a name wherever it is, for example **/*.log. Caches, other backup plugins’ folders, .git and node_modules are always excluded.', 'accessnow-site-replica' ); ?></p></td></tr> 681 <tr><th scope="row"><?php esc_html_e( 'Developer files', 'accessnow-site-replica' ); ?></th> 682 <td><label><input type="checkbox" name="leave_dev_files" value="1" <?php checked( ! empty( $s['leave_dev_files'] ) ); ?>> <?php esc_html_e( 'Leave developer files out of themes and plugins developed on this site', 'accessnow-site-replica' ); ?></label> 683 <p class="description"><?php esc_html_e( 'For a theme or plugin that is a git working copy (it has a .git folder): its docs, tests, bin, scripts, composer and package files, notes (*.md, CLAUDE.md) and, when composer.json asks only for development packages, vendor. Themes and plugins installed from a ZIP are never touched. Files already sent to another site stay there until you remove them.', 'accessnow-site-replica' ); ?></p></td></tr> 660 684 <tr><th scope="row"><?php esc_html_e( 'Transients', 'accessnow-site-replica' ); ?></th> 661 685 <td><label><input type="checkbox" name="include_transients" value="1" <?php checked( ! empty( $s['include_transients'] ) ); ?>> <?php esc_html_e( 'Include cached transients in the database export (usually not needed)', 'accessnow-site-replica' ); ?></label></td></tr> … … 681 705 'clone' => __( 'Clone into this site', 'accessnow-site-replica' ), 682 706 'restore' => __( 'Restore', 'accessnow-site-replica' ), 707 'check' => __( 'Check backup', 'accessnow-site-replica' ), 683 708 'backup' => __( 'Back up this site', 'accessnow-site-replica' ), 684 709 'cloud' => __( 'Cloud backup', 'accessnow-site-replica' ), -
accessnow-site-replica/tags/1.2.0/includes/class-settings.php
r3726758 r3815997 32 32 'extra_excludes' => '', // One pattern per line, relative to wp-content. 33 33 'include_transients' => false, 34 'leave_dev_files' => false, // Leave notes, scripts and tests out of themes and plugins developed in place (a .git folder). 34 35 'keep_sets' => 5, // Pull sets kept per source (0 = keep all). 35 36 ); … … 73 74 'extra_excludes' => isset( $input['extra_excludes'] ) ? sanitize_textarea_field( (string) $input['extra_excludes'] ) : $current['extra_excludes'], 74 75 'include_transients' => ! empty( $input['include_transients'] ), 76 'leave_dev_files' => ! empty( $input['leave_dev_files'] ), 75 77 'keep_sets' => isset( $input['keep_sets'] ) ? max( 0, min( 100, (int) $input['keep_sets'] ) ) : $current['keep_sets'], 76 78 ); -
accessnow-site-replica/tags/1.2.0/includes/client/class-remote-site.php
r3726758 r3815997 392 392 if ( 'X' === $frame[0] ) { 393 393 $error = json_decode( $frame[1], true ); 394 $code = is_array( $error ) ? (string) ( $error['code'] ?? '' ) : ''; 395 if ( in_array( $code, array( 'resend_piece', 'resend_file' ), true ) ) { 396 // Data that failed a checksum on the other site: a temporary failure, sent again. 397 throw new Remote_Exception( $code, sprintf( /* translators: %s: error. */ __( 'Part of the backup arrived damaged on the other site and will be sent again: %s', 'accessnow-site-replica' ), (string) $error['error'] ), true, 3 ); 398 } 394 399 throw new Remote_Exception( 'remote_error', sprintf( /* translators: %s: error. */ __( 'The source site reported an error: %s', 'accessnow-site-replica' ), is_array( $error ) ? (string) $error['error'] : 'unknown' ) ); 395 400 } -
accessnow-site-replica/tags/1.2.0/includes/files/class-exclusions.php
r3736115 r3815997 71 71 72 72 /** 73 * Developer files at the top of a theme or plugin folder (fnmatch on the name): notes, scripts, 74 * tests and tooling that a live site never needs and that would be readable there. 75 */ 76 const DEV_TOP = array( 'docs', 'tests', 'test', 'bin', '.github', '*.md', 'composer.json', 'composer.lock', 'package.json', 'package-lock.json', 'phpcs.xml*', 'phpunit.xml*', '.phpcs.xml*', '.editorconfig', '.gitignore', '.distignore' ); 77 78 /** 79 * Names that show a theme or plugin folder is being developed (not just installed), used to warn. 80 */ 81 const DEV_MARKERS = array( 'CLAUDE.md', '.github', 'phpcs.xml', 'phpcs.xml.dist', 'phpunit.xml', 'phpunit.xml.dist', 'tests' ); 82 83 /** 84 * Whether to leave developer files out of theme and plugin folders that are git working copies. 85 * 86 * @var bool 87 */ 88 private $dev_files = false; 89 90 /** 91 * Per theme/plugin folder: array( has .git, leave vendor out ). 92 * 93 * @var array<string, array{0: bool, 1: bool}> 94 */ 95 private $units = array(); 96 97 /** 98 * Name patterns excluded at any depth (extra exclusion lines that start with **\/). 99 * 100 * @var string[] 101 */ 102 private $name_patterns = array(); 103 104 /** 73 105 * Patterns for one root. 74 106 * … … 101 133 if ( 'content' === $root_key ) { 102 134 $this->patterns = self::CONTENT_PATTERNS; 135 $this->dev_files = (bool) Settings::get( 'leave_dev_files' ); 103 136 foreach ( preg_split( '/\R/', (string) Settings::get( 'extra_excludes' ) ) as $line ) { 104 $line = trim( trim( $line ), '/' ); 137 $line = trim( $line ); 138 if ( 0 === strpos( $line, '**/' ) && strlen( $line ) > 3 && false === strpos( substr( $line, 3 ), '/' ) ) { 139 $this->name_patterns[] = substr( $line, 3 ); // A name, wherever it is. 140 continue; 141 } 142 $line = trim( $line, '/' ); 105 143 if ( '' !== $line && false === strpos( $line, '..' ) ) { 106 144 $this->patterns[] = $line; … … 130 168 } 131 169 } 170 foreach ( $this->name_patterns as $pattern ) { 171 if ( fnmatch( $pattern, $name ) ) { 172 return true; 173 } 174 } 132 175 foreach ( $this->patterns as $pattern ) { 133 176 if ( fnmatch( $pattern, $rel, FNM_PATHNAME ) ) { … … 135 178 } 136 179 } 180 if ( $this->dev_files && $this->developer_file( $rel, $name ) ) { 181 return true; 182 } 137 183 if ( '' !== $this->storage && $this->root . $rel === $this->storage ) { 138 184 return true; … … 140 186 return false; 141 187 } 188 189 /** 190 * Whether a path is a developer file of a theme or plugin folder that is a git working copy. 191 * 192 * Only inside themes and plugins, and only in folders with a .git (developed in place): a theme 193 * or plugin installed from a ZIP keeps everything it came with. CLAUDE.md goes at any depth; 194 * the rest at the top of the folder. vendor/ goes only when composer.json asks for nothing but 195 * development packages (its production code, if any, would be in require). 196 * 197 * @param string $rel Path relative to wp-content. 198 * @param string $name Base name. 199 */ 200 private function developer_file( $rel, $name ) { 201 if ( ! preg_match( '#^(themes|plugins)/([^/]+)/(.+)$#', $rel, $m ) ) { 202 return false; 203 } 204 $unit = $m[1] . '/' . $m[2]; 205 if ( ! isset( $this->units[ $unit ] ) ) { 206 $dir = $this->root . $unit; 207 $this->units[ $unit ] = array( file_exists( $dir . '/.git' ), self::composer_dev_only( $dir . '/composer.json' ) ); 208 } 209 if ( ! $this->units[ $unit ][0] ) { 210 return false; 211 } 212 if ( 'CLAUDE.md' === $name ) { 213 return true; 214 } 215 $inner = $m[3]; 216 $top = false === strpos( $inner, '/' ) ? $inner : strstr( $inner, '/', true ); 217 if ( 'vendor' === $top && $this->units[ $unit ][1] ) { 218 return true; 219 } 220 foreach ( self::DEV_TOP as $pattern ) { 221 if ( fnmatch( $pattern, $top ) ) { 222 return true; 223 } 224 } 225 return false; 226 } 227 228 /** 229 * Whether a composer.json has packages only under require-dev (nothing the site runs on). 230 * 231 * @param string $file Path. 232 */ 233 private static function composer_dev_only( $file ) { 234 if ( ! is_file( $file ) ) { 235 return false; 236 } 237 $json = json_decode( (string) file_get_contents( $file ), true ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents 238 if ( ! is_array( $json ) || empty( $json['require-dev'] ) ) { 239 return false; 240 } 241 foreach ( array_keys( (array) ( $json['require'] ?? array() ) ) as $package ) { 242 if ( 'php' !== $package && 0 !== strpos( (string) $package, 'ext-' ) ) { 243 return false; 244 } 245 } 246 return true; 247 } 248 249 /** 250 * Theme and plugin folders in a list of index paths that look developed in place, with their 251 * developer files, to warn before they are sent. Names only: a backup does not hold .git. 252 * 253 * @param string[] $paths Paths relative to wp-content. 254 * @return array<string, string[]> Folder => developer files (a few). 255 */ 256 public static function developer_files_in( array $paths ) { 257 $units = array(); 258 $marked = array(); 259 foreach ( $paths as $rel ) { 260 if ( ! preg_match( '#^(themes|plugins)/([^/]+)/([^/]+)(/|$)#', $rel, $m ) ) { 261 continue; 262 } 263 $unit = $m[1] . '/' . $m[2]; 264 $top = $m[3]; 265 if ( in_array( $top, self::DEV_MARKERS, true ) ) { 266 $marked[ $unit ] = true; 267 } 268 foreach ( self::DEV_TOP as $pattern ) { 269 if ( fnmatch( $pattern, $top ) ) { 270 $units[ $unit ][ $top ] = true; 271 break; 272 } 273 } 274 } 275 $out = array(); 276 foreach ( $units as $unit => $names ) { 277 if ( isset( $marked[ $unit ] ) ) { 278 $out[ $unit ] = array_slice( array_keys( $names ), 0, 6 ); 279 } 280 } 281 return $out; 282 } 142 283 } -
accessnow-site-replica/tags/1.2.0/includes/jobs/class-ajax-driver.php
r3726758 r3815997 99 99 list( $job, $token ) = Job_Store::create( 'restore', array(), array( 'set_id' => $set_id ) ); 100 100 Logger::activity( 'restore', 'Restore prepared from backup ' . $set_id, array( 'job' => $job->id() ) ); 101 } elseif ( 'check' === $type ) { 102 $set_id = isset( $_POST['set'] ) ? sanitize_text_field( wp_unslash( $_POST['set'] ) ) : ''; 103 $m = Set_Store::manifest( $set_id ); 104 if ( ! $m || 'complete' !== ( $m['status'] ?? '' ) ) { 105 wp_send_json_error( array( 'message' => __( 'That backup is missing or incomplete.', 'accessnow-site-replica' ) ), 400 ); 106 } 107 list( $job, $token ) = Job_Store::create( 'check', array(), array( 'set_id' => $set_id ) ); 108 Logger::activity( 'pull', 'Check of backup ' . $set_id . ' started', array( 'job' => $job->id() ) ); 101 109 } elseif ( 'cloud' === $type ) { 102 110 if ( ! \AccessNow\Replica\Destinations\Destination::current()->ready() ) { -
accessnow-site-replica/tags/1.2.0/includes/jobs/class-job-runner.php
r3726810 r3815997 186 186 } elseif ( 0 === strpos( $step, 'cl_' ) || 0 === strpos( $step, 'ci_' ) ) { 187 187 $class = Steps\Cloud::class; 188 } elseif ( 0 === strpos( $step, 'ck_' ) ) { 189 $class = Steps\Check::class; 188 190 } else { 189 191 $class = Steps\Pull::class; -
accessnow-site-replica/tags/1.2.0/includes/jobs/class-job-store.php
r3726758 r3815997 37 37 'import' => self::IMPORT, 38 38 'restore' => self::RESTORE, 39 'check' => array( 'ck_backup' ), 39 40 'clone' => array( 'preflight', 'db_schema', 'db_data', 'fs_scan', 'fs_transfer', 'verify', 'finalize', 'rs_preflight', 'rs_plan', 'rs_db_create', 'rs_db_import', 'rs_db_bigs', 'rs_db_verify', 'rs_db_fix', 'rs_files_stage', 'rs_swap', 'rs_post', 'rs_confirm', 'rs_cleanup' ), 40 41 ); -
accessnow-site-replica/tags/1.2.0/includes/jobs/steps/class-restore.php
r3726758 r3815997 312 312 'moved' => $live, 313 313 'removed' => Files::plugins_only_here( Set_Store::dir( (string) $job->get( 'set_id' ) ) ), 314 // Files this site has inside plugin, theme and must-use plugin folders the backup 315 // also has: each folder is replaced whole, as an update replaces it, so they go. 316 'replaced' => Files::removed_in_folders( Set_Store::dir( (string) $job->get( 'set_id' ) ) ), 314 317 'local' => $local, 315 318 'opts' => $job->get( 'restore_opts' ), … … 561 564 $db->query( 'DELETE FROM %i WHERE ' . $own_cond, $options, ...$own ); 562 565 $db->query( 'INSERT INTO %i (option_name, option_value, autoload) SELECT option_name, option_value, autoload FROM %i WHERE ' . $own_cond, $options, $wpdb->options, ...$own ); 566 if ( self::keep_freemius_records( $db, $options, $wpdb->options ) ) { 567 $job->log( 'Kept this site\'s licence records for plugins sold through Freemius, so they stay activated here instead of asking whether this site is a copy.' ); 568 } 563 569 // Caches that must be rebuilt here. 564 570 $db->query( "DELETE FROM %i WHERE option_name IN ('rewrite_rules') OR option_name LIKE %s OR option_name LIKE %s", $options, $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_site_transient_' ) . '%' ); … … 591 597 self::keep_login( $db, $users, $usermeta, $dst_px, (int) $job->s['user'], $job ); 592 598 } 599 return true; 600 } 601 602 /** 603 * Keeps this site's Freemius records (licences, installs, clone state) in place of the backup's. 604 * 605 * Plugins sold through Freemius keep their licence and install records in the options table. 606 * Restored from another site, those records name the other site's address, so the SDK treats 607 * this site as a copy and asks whether to duplicate, migrate or activate again (its "safe mode"), 608 * which a routine staging-to-live send should never do. Only when this site already has records 609 * of its own: a fresh site keeps the backup's, so the SDK can offer to duplicate the licence. 610 * 611 * @param Connection $db Connection. 612 * @param string $temp Restored options table, before the swap. 613 * @param string $live This site's options table. 614 * @return bool Whether this site's records were kept. 615 */ 616 public static function keep_freemius_records( Connection $db, $temp, $live ) { 617 global $wpdb; 618 // The SDK's own option names (config.php, WP_FS___OPTION_PREFIX), in production and development mode. 619 $exact = array(); 620 $like = array(); 621 foreach ( array( 'fs_', 'fs_dbg_' ) as $p ) { 622 foreach ( array( 'accounts', 'api_cache', 'gdpr', 'options', 'clone_management' ) as $name ) { 623 $exact[] = $p . $name; 624 } 625 $like[] = $wpdb->esc_like( $p . 'cache_' ) . '%'; 626 } 627 $exact[] = 'fs_active_plugins'; 628 $here = (int) $db->value( "SELECT COUNT(*) FROM %i WHERE option_name IN ('fs_accounts', 'fs_dbg_accounts')", $live ); 629 if ( 0 === $here ) { 630 return false; 631 } 632 $cond = 'option_name IN (' . implode( ',', array_fill( 0, count( $exact ), '%s' ) ) . ') OR option_name LIKE %s OR option_name LIKE %s'; 633 $args = array_merge( $exact, $like ); 634 $db->query( 'DELETE FROM %i WHERE ' . $cond, $temp, ...$args ); 635 $db->query( 'INSERT INTO %i (option_name, option_value, autoload) SELECT option_name, option_value, autoload FROM %i WHERE ' . $cond, $temp, $live, ...$args ); 593 636 return true; 594 637 } -
accessnow-site-replica/tags/1.2.0/includes/restore/class-files.php
r3726758 r3815997 17 17 namespace AccessNow\Replica\Restore; 18 18 19 use AccessNow\Replica\Sets\Damaged_File; 19 20 use AccessNow\Replica\Sets\Set_Files; 20 21 use AccessNow\Replica\Storage; … … 47 48 */ 48 49 const LEGACY_DIRS = array( 'site-replica' ); 50 51 /** 52 * Live files up to this size (and every script) are hashed before an unchanged one is reused. 53 */ 54 const LINK_CHECK_BYTES = 1048576; 49 55 50 56 /** … … 169 175 @unlink( $target ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink -- Our own earlier attempt. 170 176 } 171 // Unchanged live file: hardlink it instead of copying. 177 // Unchanged live file: hardlink it instead of copying. Size and time alone can be kept by an 178 // edit (malware often resets the time), so a script or a small file must also have the bytes 179 // the backup recorded; large media go by size and time, so a restore doesn't read them all. 172 180 $live = self::dest_root( $row['r'] ) . '/' . $rel; 173 181 clearstatcache( true, $live ); 174 if ( is_file( $live ) && ! is_link( $live ) && (int) filesize( $live ) === (int) $row['s'] && (int) filemtime( $live ) === (int) $row['m'] && @link( $live, $target ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 182 if ( is_file( $live ) && ! is_link( $live ) && (int) filesize( $live ) === (int) $row['s'] && (int) filemtime( $live ) === (int) $row['m'] 183 && ( ( (int) $row['s'] > self::LINK_CHECK_BYTES && ! Set_Files::is_script( $row ) ) || Set_Files::matches( $live, $row ) ) 184 && @link( $live, $target ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 175 185 return 'linked'; 176 186 } … … 178 188 try { 179 189 $copied = Set_Files::copy_out( $set_dir, $row, $target ); 190 } catch ( Damaged_File $e ) { 191 // The backup itself is damaged: stop before the swap, with this site untouched. 192 throw new \RuntimeException( sprintf( 'The backup is damaged: %s Nothing on this site has been changed. Restore another backup, or make a new one.', $e->getMessage() ) ); 180 193 } catch ( \RuntimeException $e ) { 181 194 return 'skipped'; // A path or checksum that is not allowed. … … 349 362 350 363 /** 364 * The plugin, theme or must-use plugin folder a path is inside, relative to its root 365 * (plugins/foo for the content root, foo for the plugins root), or null when it is not inside 366 * one: a single-file plugin, a top-level must-use plugin, media, or this plugin itself. 367 * 368 * The restore replaces each such folder whole, the way a plugin update does, so a file this site 369 * has inside a folder the backup also has, and the backup doesn't, is removed. 370 * 371 * @param string $root Root key. 372 * @param string $rel Path relative to the root. 373 * @return string|null 374 */ 375 public static function replaced_folder( $root, $rel ) { 376 $parts = explode( '/', (string) $rel ); 377 if ( 'content' === $root ) { 378 if ( count( $parts ) < 3 || ! in_array( $parts[0], array( 'plugins', 'mu-plugins', 'themes' ), true ) || '' === $parts[1] ) { 379 return null; 380 } 381 $folder = $parts[0] . '/' . $parts[1]; 382 } elseif ( in_array( $root, array( 'plugins', 'mu-plugins', 'themes' ), true ) ) { 383 if ( count( $parts ) < 2 || '' === $parts[0] ) { 384 return null; 385 } 386 $folder = $parts[0]; 387 } else { 388 return null; 389 } 390 return null === self::unit( $root, $folder ) ? null : $folder; 391 } 392 393 /** 394 * Files and folders this site has inside the plugin, theme and must-use plugin folders the backup 395 * also has, which the backup doesn't: the restore replaces those folders whole, so it removes 396 * them (Roll back puts them back). A folder the backup has nothing inside is listed once, with a 397 * trailing slash, instead of file by file. 398 * 399 * @param string $set_dir Set dir. 400 * @param int $limit Most entries to list (the count covers them all). 401 * @param array<string, string>|null $dirs Root key => live directory (tests); null for this site's. 402 * @return array{list: array[], count: int} list: {path (from wp-content's point of view), part (the swap unit, as the restore plan's parts name it)}. 403 */ 404 public static function removed_in_folders( $set_dir, $limit = 200, $dirs = null ) { 405 $out = array( 406 'list' => array(), 407 'count' => 0, 408 ); 409 $fh = @fopen( $set_dir . 'index/files.jsonl', 'rb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 410 if ( ! $fh ) { 411 return $out; 412 } 413 // What the backup has inside those folders: every file and folder, and each file's folders. 414 $folders = array(); 415 $have = array(); 416 while ( false !== ( $line = fgets( $fh ) ) ) { // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition 417 $row = json_decode( $line, true ); 418 if ( ! is_array( $row ) || ! isset( $row['r'] ) || ! in_array( $row['t'] ?? '', array( 'f', 'd' ), true ) ) { 419 continue; // Links are not recreated, so a link here is removed like any other file. 420 } 421 $root = (string) $row['r']; 422 $rel = Set_Files::relative( $row ); 423 $top = null === $rel ? null : self::replaced_folder( $root, $rel ); 424 if ( null === $top ) { 425 continue; 426 } 427 $folders[ $root ][ $top ] = true; 428 for ( $p = $rel; strlen( $p ) > strlen( $top ) && ! isset( $have[ $root . '/' . $p ] ); $p = dirname( $p ) ) { 429 $have[ $root . '/' . $p ] = true; 430 } 431 } 432 fclose( $fh ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 433 ksort( $folders ); 434 foreach ( $folders as $root => $tops ) { 435 $base = null === $dirs ? self::dest_root( $root ) : ( $dirs[ $root ] ?? null ); 436 if ( null === $base ) { 437 continue; 438 } 439 $tops = array_keys( $tops ); 440 sort( $tops ); 441 foreach ( $tops as $top ) { 442 $live = untrailingslashit( wp_normalize_path( $base ) ) . '/' . $top; 443 if ( is_dir( $live ) && ! is_link( $live ) ) { 444 self::walk_extra( $root, $live, $top, $have, $limit, $out ); 445 } 446 } 447 } 448 return $out; 449 } 450 451 /** 452 * One folder's part of removed_in_folders(). 453 * 454 * @param string $root Root key. 455 * @param string $dir Live folder. 456 * @param string $rel Its path relative to the root. 457 * @param array $have What the backup has (root/rel => true). 458 * @param int $limit Most entries to list. 459 * @param array $out Result, added to. 460 */ 461 private static function walk_extra( $root, $dir, $rel, array $have, $limit, array &$out ) { 462 foreach ( self::list_dir( $dir ) as $name ) { 463 $path = $dir . '/' . $name; 464 $sub = $rel . '/' . $name; 465 $folder = is_dir( $path ) && ! is_link( $path ); 466 if ( isset( $have[ $root . '/' . $sub ] ) ) { 467 if ( $folder ) { 468 self::walk_extra( $root, $path, $sub, $have, $limit, $out ); 469 } 470 continue; 471 } 472 ++$out['count']; 473 if ( count( $out['list'] ) < $limit ) { 474 $out['list'][] = array( 475 'path' => ( 'content' === $root ? '' : $root . '/' ) . $sub . ( $folder ? '/' : '' ), 476 'part' => $root . '/' . self::unit( $root, $sub ), 477 ); 478 } 479 } 480 } 481 482 /** 351 483 * Performs the swap, journalling each rename first. Returns the journal path. 352 484 * -
accessnow-site-replica/tags/1.2.0/includes/sets/class-set-files.php
r3726758 r3815997 309 309 310 310 /** 311 * Writes a stored file out to $dest, uncompressed. 311 * Writes a stored file out to $dest, uncompressed, checking it against the checksum the index 312 * recorded when the backup was made (rows without one, from older backups, are copied as they are). 312 313 * 313 314 * @param string $dir Set dir. 314 315 * @param array $row Index row. 315 316 * @param string $dest Destination path. 316 * @return bool 317 * @return bool False when it couldn't be read or written. 318 * @throws Damaged_File When the stored file no longer matches its checksum ($dest is removed). 317 319 */ 318 320 public static function copy_out( $dir, array $row, $dest ) { 319 321 list( $path, $z ) = self::source( $dir, $row ); 320 return @copy( ( $z ? 'compress.zlib://' : '' ) . $path, $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 322 $expect = strtolower( (string) ( $row['h'] ?? '' ) ); 323 $in = @fopen( ( $z ? 'compress.zlib://' : '' ) . $path, 'rb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 324 if ( ! $in ) { 325 return false; 326 } 327 $out = @fopen( $dest, 'wb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 328 if ( ! $out ) { 329 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 330 return false; 331 } 332 $ctx = hash_init( 'sha256' ); 333 $ok = true; 334 while ( ! feof( $in ) ) { 335 $buf = fread( $in, 1048576 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fread 336 if ( false === $buf ) { 337 $ok = false; // A compressed object that is cut off or corrupt fails here. 338 break; 339 } 340 hash_update( $ctx, $buf ); 341 if ( '' !== $buf && fwrite( $out, $buf ) !== strlen( $buf ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fwrite 342 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 343 fclose( $out ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 344 @unlink( $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink 345 return false; // Disk full. 346 } 347 } 348 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 349 fclose( $out ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 350 $sha = hash_final( $ctx ); 351 if ( preg_match( '/^[0-9a-f]{64}$/', $expect ) && ( ! $ok || ! hash_equals( $expect, $sha ) ) ) { 352 @unlink( $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink 353 throw new Damaged_File( sprintf( '%s no longer matches the checksum recorded when the backup was made.', (string) self::relative( $row ) ) ); 354 } 355 if ( ! $ok ) { 356 @unlink( $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink 357 return false; 358 } 359 return true; 360 } 361 362 /** 363 * Whether a stored file still has the bytes the index recorded: true, false (missing, unreadable 364 * or changed), or null when the row has no checksum to compare with (very old backups). 365 * 366 * @param string $dir Set dir. 367 * @param array $row Index row. 368 * @return bool|null 369 */ 370 public static function intact( $dir, array $row ) { 371 $expect = strtolower( (string) ( $row['h'] ?? '' ) ); 372 if ( ! preg_match( '/^[0-9a-f]{64}$/', $expect ) ) { 373 return self::present( $dir, $row ) ? null : false; 374 } 375 try { 376 list( $path, $z ) = self::source( $dir, $row ); 377 } catch ( \RuntimeException $e ) { 378 return false; 379 } 380 $in = @fopen( ( $z ? 'compress.zlib://' : '' ) . $path, 'rb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 381 if ( ! $in ) { 382 return false; 383 } 384 $ctx = hash_init( 'sha256' ); 385 while ( ! feof( $in ) ) { 386 $buf = fread( $in, 1048576 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fread 387 if ( false === $buf ) { 388 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 389 return false; 390 } 391 hash_update( $ctx, $buf ); 392 } 393 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 394 return hash_equals( $expect, hash_final( $ctx ) ); 395 } 396 397 /** 398 * Whether a file on this site has exactly the bytes an index row recorded (rows without a checksum: no). 399 * 400 * @param string $file File. 401 * @param array $row Index row. 402 */ 403 public static function matches( $file, array $row ) { 404 $expect = strtolower( (string) ( $row['h'] ?? '' ) ); 405 if ( ! preg_match( '/^[0-9a-f]{64}$/', $expect ) ) { 406 return false; 407 } 408 $sha = @hash_file( 'sha256', $file ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 409 return is_string( $sha ) && hash_equals( $expect, $sha ); 321 410 } 322 411 -
accessnow-site-replica/tags/1.2.0/includes/source/class-api.php
r3726810 r3815997 141 141 } catch ( \Throwable $e ) { 142 142 $message = $e instanceof Db_Exception ? 'Database error: ' . $e->getMessage() : $e->getMessage(); 143 Frame_Codec::add_json( $this->enc, 'X', array( 'error' => $message ) ); 143 $error = array( 'error' => $message ); 144 if ( $e instanceof Resend_Error ) { 145 $error['code'] = $e->error_code; // Not the sender's fault: it sends the same data again. 146 } 147 Frame_Codec::add_json( $this->enc, 'X', $error ); 144 148 Logger::audit( 'Operation failed.', array( 'op' => $op, 'error' => $message ) ); 145 149 $end = array( 'ok' => false ); -
accessnow-site-replica/tags/1.2.0/languages/accessnow-site-replica.pot
r3736115 r3815997 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AccessNow Site Replica 1. 0.4\n"5 "Project-Id-Version: AccessNow Site Replica 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/accessnow-site-replica\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-1 0-09T04:10:54+00:00\n"12 "POT-Creation-Date: 2026-11-21T16:13:50+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 41 41 42 42 #: includes/admin/class-admin.php:63 43 #: includes/admin/class-admin.php:23 243 #: includes/admin/class-admin.php:236 44 44 msgid "Site Replica" 45 45 msgstr "" … … 50 50 51 51 #: includes/admin/class-admin.php:65 52 #: includes/admin/class-admin.php:24 353 #: includes/admin/class-admin.php:27 552 #: includes/admin/class-admin.php:247 53 #: includes/admin/class-admin.php:279 54 54 msgid "Pull & Clone" 55 55 msgstr "" 56 56 57 57 #: includes/admin/class-admin.php:66 58 #: includes/admin/class-admin.php:26 459 #: includes/admin/class-admin.php:35 458 #: includes/admin/class-admin.php:268 59 #: includes/admin/class-admin.php:358 60 60 msgid "Backups" 61 61 msgstr "" 62 62 63 63 #: includes/admin/class-admin.php:68 64 #: includes/admin/class-admin.php:25 465 #: includes/admin/class-admin.php: 48264 #: includes/admin/class-admin.php:258 65 #: includes/admin/class-admin.php:503 66 66 msgid "This Site as a Source" 67 67 msgstr "" 68 68 69 69 #: includes/admin/class-admin.php:69 70 #: includes/admin/class-admin.php:6 0870 #: includes/admin/class-admin.php:629 71 71 msgid "Logs" 72 72 msgstr "" 73 73 74 74 #: includes/admin/class-admin.php:70 75 #: includes/admin/class-admin.php:6 3775 #: includes/admin/class-admin.php:658 76 76 msgid "Settings" 77 77 msgstr "" … … 163 163 164 164 #: includes/admin/class-admin.php:116 165 #: includes/admin/class-admin.php: 396165 #: includes/admin/class-admin.php:400 166 166 msgid "Database" 167 167 msgstr "" 168 168 169 169 #: includes/admin/class-admin.php:117 170 #: includes/admin/class-admin.php: 397170 #: includes/admin/class-admin.php:401 171 171 msgid "Files" 172 172 msgstr "" … … 185 185 186 186 #: includes/admin/class-admin.php:121 187 msgid "Files in plugin, theme and must-use plugin folders that the backup also has, which only this site has. Each of those folders is replaced whole, the way an update replaces it, so these will be removed (Roll back returns them):" 188 msgstr "" 189 190 #. translators: %s: number of files not listed. 191 #: includes/admin/class-admin.php:123 192 #, php-format 193 msgid "…and %s more." 194 msgstr "" 195 196 #: includes/admin/class-admin.php:124 187 197 msgid "Media and must-use plugins that exist only on this site are kept." 188 198 msgstr "" 189 199 190 #: includes/admin/class-admin.php:12 2200 #: includes/admin/class-admin.php:125 191 201 msgid "Keep me logged in (carry my account over)" 192 202 msgstr "" 193 203 194 #: includes/admin/class-admin.php:12 3204 #: includes/admin/class-admin.php:126 195 205 msgid "Discourage search engines from indexing this copy" 196 206 msgstr "" 197 207 198 #: includes/admin/class-admin.php:12 4208 #: includes/admin/class-admin.php:127 199 209 msgid "Block all outgoing email from this copy" 200 210 msgstr "" 201 211 202 #: includes/admin/class-admin.php:12 5212 #: includes/admin/class-admin.php:128 203 213 msgid "Deactivate SSL-forcing plugins (this site uses http)" 204 214 msgstr "" 205 215 206 #: includes/admin/class-admin.php:12 6216 #: includes/admin/class-admin.php:129 207 217 msgid "Leave post GUIDs unchanged (recommended when moving a live site)" 208 218 msgstr "" 209 219 210 #: includes/admin/class-admin.php:1 27220 #: includes/admin/class-admin.php:130 211 221 msgid "Restore files (uploads, plugins, themes)" 212 222 msgstr "" 213 223 214 224 #. translators: %s: this site's host name. 215 #: includes/admin/class-admin.php:1 29225 #: includes/admin/class-admin.php:132 216 226 #, php-format 217 227 msgid "This replaces a live site. Type %s to confirm:" 218 228 msgstr "" 219 229 220 #: includes/admin/class-admin.php:13 0230 #: includes/admin/class-admin.php:133 221 231 msgid "Replace this site with the backup" 222 232 msgstr "" 223 233 224 #: includes/admin/class-admin.php:13 1234 #: includes/admin/class-admin.php:134 225 235 msgid "Keep the restored site" 226 236 msgstr "" 227 237 228 #: includes/admin/class-admin.php:13 2238 #: includes/admin/class-admin.php:135 229 239 msgid "Roll back" 230 240 msgstr "" 231 241 232 #: includes/admin/class-admin.php:13 3242 #: includes/admin/class-admin.php:136 233 243 msgid "Open the site in a new tab" 234 244 msgstr "" 235 245 236 #: includes/admin/class-admin.php:13 4246 #: includes/admin/class-admin.php:137 237 247 msgid "Keep the restored site and delete the previous version?" 238 248 msgstr "" 239 249 240 #: includes/admin/class-admin.php:13 5250 #: includes/admin/class-admin.php:138 241 251 msgid "Put the previous site back exactly as it was?" 242 252 msgstr "" 243 253 244 #: includes/admin/class-admin.php:13 6254 #: includes/admin/class-admin.php:139 245 255 msgid "rows" 246 256 msgstr "" 247 257 248 #: includes/admin/class-admin.php:1 37258 #: includes/admin/class-admin.php:140 249 259 msgid "tables" 250 260 msgstr "" 251 261 252 262 #. translators: %s: size, e.g. 12 MB. 253 #: includes/admin/class-admin.php:1 39263 #: includes/admin/class-admin.php:142 254 264 #, php-format 255 265 msgid "%s uploaded" … … 257 267 258 268 #. translators: %s: size, e.g. 12 MB. 259 #: includes/admin/class-admin.php:14 1269 #: includes/admin/class-admin.php:144 260 270 #, php-format 261 271 msgid "%s downloaded" … … 263 273 264 274 #. translators: 1: current step, 2: number of steps. 265 #: includes/admin/class-admin.php:14 3275 #: includes/admin/class-admin.php:146 266 276 #, php-format 267 277 msgid "step %1$s of %2$s" … … 269 279 270 280 #. translators: %s: number of files. 271 #: includes/admin/class-admin.php:14 5272 #: includes/admin/class-admin.php:1 47281 #: includes/admin/class-admin.php:148 282 #: includes/admin/class-admin.php:150 273 283 #, php-format 274 284 msgid "%s file" … … 278 288 279 289 #. translators: %s: number of rows. 280 #: includes/admin/class-admin.php:1 49281 #: includes/admin/class-admin.php:15 1290 #: includes/admin/class-admin.php:152 291 #: includes/admin/class-admin.php:154 282 292 #, php-format 283 293 msgid "%s row" … … 287 297 288 298 #. translators: %s: number of warnings. 289 #: includes/admin/class-admin.php:15 3290 #: includes/admin/class-admin.php:15 5299 #: includes/admin/class-admin.php:156 300 #: includes/admin/class-admin.php:158 291 301 #, php-format 292 302 msgid "%s warning" … … 296 306 297 307 #. translators: %s: number of unchanged files. 298 #: includes/admin/class-admin.php:1 57308 #: includes/admin/class-admin.php:160 299 309 #, php-format 300 310 msgid "%s unchanged" … … 302 312 303 313 #. translators: %s: seconds. 304 #: includes/admin/class-admin.php:1 59314 #: includes/admin/class-admin.php:162 305 315 #, php-format 306 316 msgid "retrying in %s s" 307 317 msgstr "" 308 318 309 #: includes/admin/class-admin.php:16 1310 #: includes/admin/class-admin.php:10 42319 #: includes/admin/class-admin.php:164 320 #: includes/admin/class-admin.php:1067 311 321 msgid "Starting" 312 322 msgstr "" 313 323 314 #: includes/admin/class-admin.php:16 2315 #: includes/admin/class-admin.php:10 43324 #: includes/admin/class-admin.php:165 325 #: includes/admin/class-admin.php:1068 316 326 msgid "Running" 317 327 msgstr "" 318 328 319 #: includes/admin/class-admin.php:16 3320 #: includes/admin/class-admin.php:10 44329 #: includes/admin/class-admin.php:166 330 #: includes/admin/class-admin.php:1069 321 331 msgid "Waiting to retry" 322 332 msgstr "" 323 333 324 #: includes/admin/class-admin.php:16 4325 #: includes/admin/class-admin.php:10 45334 #: includes/admin/class-admin.php:167 335 #: includes/admin/class-admin.php:1070 326 336 msgid "Paused" 327 337 msgstr "" 328 338 329 #: includes/admin/class-admin.php:16 5330 #: includes/admin/class-admin.php:10 46339 #: includes/admin/class-admin.php:168 340 #: includes/admin/class-admin.php:1071 331 341 msgid "Stopped with an error" 332 342 msgstr "" 333 343 334 #: includes/admin/class-admin.php:16 6335 #: includes/admin/class-admin.php:10 47344 #: includes/admin/class-admin.php:169 345 #: includes/admin/class-admin.php:1072 336 346 #: includes/admin/class-cloud-page.php:290 337 347 msgid "Cancelled" 338 348 msgstr "" 339 349 340 #: includes/admin/class-admin.php:1 67341 #: includes/admin/class-admin.php:10 48350 #: includes/admin/class-admin.php:170 351 #: includes/admin/class-admin.php:1073 342 352 msgid "Completed" 343 353 msgstr "" 344 354 345 #: includes/admin/class-admin.php:1 68355 #: includes/admin/class-admin.php:171 346 356 msgid "Waiting for you" 347 357 msgstr "" 348 358 349 #: includes/admin/class-admin.php:17 1350 #: includes/admin/class-admin.php: 680359 #: includes/admin/class-admin.php:174 360 #: includes/admin/class-admin.php:704 351 361 msgid "Pull backup" 352 362 msgstr "" 353 363 354 #: includes/admin/class-admin.php:17 2355 #: includes/admin/class-admin.php:31 3356 #: includes/admin/class-admin.php: 681364 #: includes/admin/class-admin.php:175 365 #: includes/admin/class-admin.php:317 366 #: includes/admin/class-admin.php:705 357 367 msgid "Clone into this site" 358 368 msgstr "" 359 369 360 #: includes/admin/class-admin.php:17 3361 #: includes/admin/class-admin.php: 682370 #: includes/admin/class-admin.php:176 371 #: includes/admin/class-admin.php:706 362 372 msgid "Restore" 363 373 msgstr "" 364 374 365 #: includes/admin/class-admin.php:174 366 #: includes/admin/class-admin.php:369 367 #: includes/admin/class-admin.php:683 375 #: includes/admin/class-admin.php:177 376 #: includes/admin/class-admin.php:707 377 msgid "Check backup" 378 msgstr "" 379 380 #: includes/admin/class-admin.php:178 381 #: includes/admin/class-admin.php:373 382 #: includes/admin/class-admin.php:708 368 383 msgid "Back up this site" 369 384 msgstr "" 370 385 371 #: includes/admin/class-admin.php:17 5372 #: includes/admin/class-admin.php: 684386 #: includes/admin/class-admin.php:179 387 #: includes/admin/class-admin.php:709 373 388 msgid "Cloud backup" 374 389 msgstr "" 375 390 376 #: includes/admin/class-admin.php:1 76377 #: includes/admin/class-admin.php: 685391 #: includes/admin/class-admin.php:180 392 #: includes/admin/class-admin.php:710 378 393 msgid "Database backup to the cloud" 379 394 msgstr "" 380 395 381 #: includes/admin/class-admin.php:1 77382 #: includes/admin/class-admin.php: 686396 #: includes/admin/class-admin.php:181 397 #: includes/admin/class-admin.php:711 383 398 msgid "Download from the cloud" 384 399 msgstr "" 385 400 386 #: includes/admin/class-admin.php:1 79401 #: includes/admin/class-admin.php:183 387 402 msgid "This backup runs on the server: you can close this page. You will find the result here and, if you chose so, by e-mail." 388 403 msgstr "" 389 404 390 #: includes/admin/class-admin.php: 199405 #: includes/admin/class-admin.php:203 391 406 msgid "The backup folder can be downloaded from the web on this server (it ignores the folder’s .htaccess protection). Ask your host to stop serving that folder, or set ACCESSNOW_REPLICA_STORAGE_DIR in wp-config.php to a folder the web server does not serve, before making backups here." 392 407 msgstr "" 393 408 394 #: includes/admin/class-admin.php:2 18409 #: includes/admin/class-admin.php:222 395 410 msgid "This copy is not sending email. A restore installed a guard so a copied site cannot email the original site’s people. Delete wp-content/mu-plugins/accessnow-replica-mail-guard.php to allow email again." 396 411 msgstr "" 397 412 398 #: includes/admin/class-admin.php:24 1413 #: includes/admin/class-admin.php:245 399 414 msgid "Back up a live site to this computer" 400 415 msgstr "" 401 416 402 #: includes/admin/class-admin.php:24 2417 #: includes/admin/class-admin.php:246 403 418 msgid "Pull a complete copy (database and wp-content) from another WordPress site running Site Replica. Nothing large is written on that server." 404 419 msgstr "" 405 420 406 #: includes/admin/class-admin.php:2 46421 #: includes/admin/class-admin.php:250 407 422 msgid "Let another site pull this one" 408 423 msgstr "" 409 424 410 #: includes/admin/class-admin.php:25 0411 #: includes/admin/class-admin.php:5 12425 #: includes/admin/class-admin.php:254 426 #: includes/admin/class-admin.php:533 412 427 msgid "Pulling is ON" 413 428 msgstr "" 414 429 415 #: includes/admin/class-admin.php:25 1416 #: includes/admin/class-admin.php:5 15430 #: includes/admin/class-admin.php:255 431 #: includes/admin/class-admin.php:536 417 432 msgid "Pulling is off" 418 433 msgstr "" 419 434 420 #: includes/admin/class-admin.php:2 57435 #: includes/admin/class-admin.php:261 421 436 msgid "Backups on this computer" 422 437 msgstr "" 423 438 424 439 #. translators: %d: number of backup sets. 425 #: includes/admin/class-admin.php:26 1440 #: includes/admin/class-admin.php:265 426 441 #, php-format 427 442 msgid "%d backup set" … … 430 445 msgstr[1] "" 431 446 432 #: includes/admin/class-admin.php:28 3447 #: includes/admin/class-admin.php:287 433 448 msgid "Saved connections can no longer be decrypted (the security keys in wp-config.php changed). Add the connections again." 434 449 msgstr "" 435 450 436 #: includes/admin/class-admin.php:2 86451 #: includes/admin/class-admin.php:290 437 452 msgid "Connected sites" 438 453 msgstr "" 439 454 440 #: includes/admin/class-admin.php:2 88455 #: includes/admin/class-admin.php:292 441 456 msgid "No sites yet. Add one below with a connection key." 442 457 msgstr "" 443 458 444 #: includes/admin/class-admin.php:29 2459 #: includes/admin/class-admin.php:296 445 460 msgid "Site" 446 461 msgstr "" 447 462 448 #: includes/admin/class-admin.php:29 3449 #: includes/admin/class-admin.php:7 35463 #: includes/admin/class-admin.php:297 464 #: includes/admin/class-admin.php:760 450 465 msgid "Details" 451 466 msgstr "" 452 467 453 #: includes/admin/class-admin.php:29 4468 #: includes/admin/class-admin.php:298 454 469 msgid "Last backup" 455 470 msgstr "" 456 471 457 #: includes/admin/class-admin.php:29 5472 #: includes/admin/class-admin.php:299 458 473 msgid "Key expires" 459 474 msgstr "" 460 475 461 #: includes/admin/class-admin.php:31 0462 #: includes/admin/class-admin.php:5 47463 #: includes/admin/class-admin.php: 590476 #: includes/admin/class-admin.php:314 477 #: includes/admin/class-admin.php:568 478 #: includes/admin/class-admin.php:611 464 479 #: includes/admin/class-cloud-page.php:359 465 480 msgid "Never" 466 481 msgstr "" 467 482 468 #: includes/admin/class-admin.php:31 2483 #: includes/admin/class-admin.php:316 469 484 msgid "Pull backup now" 470 485 msgstr "" 471 486 472 #: includes/admin/class-admin.php:31 3487 #: includes/admin/class-admin.php:317 473 488 msgid "Pull a fresh backup, then replace this site with it (you review the plan before anything changes)." 474 489 msgstr "" 475 490 476 #: includes/admin/class-admin.php:31 4491 #: includes/admin/class-admin.php:318 477 492 msgid "Remove this connection? Backups already made are kept." 478 493 msgstr "" 479 494 480 #: includes/admin/class-admin.php:3 18495 #: includes/admin/class-admin.php:322 481 496 msgid "Remove" 482 497 msgstr "" 483 498 484 #: includes/admin/class-admin.php:3 27499 #: includes/admin/class-admin.php:331 485 500 msgid "Add a site" 486 501 msgstr "" 487 502 488 #: includes/admin/class-admin.php:3 29503 #: includes/admin/class-admin.php:333 489 504 msgid "On the site you want to back up, install Site Replica and go to Site Replica → This Site as a Source." 490 505 msgstr "" 491 506 492 #: includes/admin/class-admin.php:33 0507 #: includes/admin/class-admin.php:334 493 508 msgid "Turn pulling on and generate a connection key." 494 509 msgstr "" 495 510 496 #: includes/admin/class-admin.php:33 1511 #: includes/admin/class-admin.php:335 497 512 msgid "Paste the key here." 498 513 msgstr "" 499 514 500 #: includes/admin/class-admin.php:3 36515 #: includes/admin/class-admin.php:340 501 516 msgid "Connection key" 502 517 msgstr "" 503 518 504 #: includes/admin/class-admin.php:3 38519 #: includes/admin/class-admin.php:342 505 520 msgid "Connect and check" 506 521 msgstr "" 507 522 508 523 #. translators: %s: storage path. 509 #: includes/admin/class-admin.php:34 3524 #: includes/admin/class-admin.php:347 510 525 #, php-format 511 526 msgid "Backups are stored in %s" … … 513 528 514 529 #. translators: %s: storage path. 515 #: includes/admin/class-admin.php:36 5530 #: includes/admin/class-admin.php:369 516 531 #, php-format 517 532 msgid "Stored in %s" 518 533 msgstr "" 519 534 520 #: includes/admin/class-admin.php:37 0535 #: includes/admin/class-admin.php:374 521 536 msgid "Makes a backup of this site, stored on this server. If something goes wrong later, restore it from the list below." 522 537 msgstr "" 523 538 524 #: includes/admin/class-admin.php:37 3539 #: includes/admin/class-admin.php:377 525 540 msgid "No backups yet." 526 541 msgstr "" 527 542 528 #: includes/admin/class-admin.php:3 88543 #: includes/admin/class-admin.php:392 529 544 msgid "Delete selected" 530 545 msgstr "" 531 546 532 #: includes/admin/class-admin.php:39 3547 #: includes/admin/class-admin.php:397 533 548 msgid "Select all backups" 534 549 msgstr "" 535 550 536 #: includes/admin/class-admin.php:39 4551 #: includes/admin/class-admin.php:398 537 552 #: includes/admin/class-cloud-page.php:433 538 553 msgid "Backup" 539 554 msgstr "" 540 555 541 #: includes/admin/class-admin.php:39 5556 #: includes/admin/class-admin.php:399 542 557 msgid "Source" 543 558 msgstr "" 544 559 545 #: includes/admin/class-admin.php: 398560 #: includes/admin/class-admin.php:402 546 561 #: includes/admin/class-cloud-page.php:435 547 562 msgid "Status" … … 549 564 550 565 #. translators: %s: backup date. 551 #: includes/admin/class-admin.php:41 4566 #: includes/admin/class-admin.php:418 552 567 #, php-format 553 568 msgid "Select backup of %s" … … 555 570 556 571 #. translators: 1: tables, 2: rows. 557 #: includes/admin/class-admin.php:42 3572 #: includes/admin/class-admin.php:427 558 573 #, php-format 559 574 msgid "%1$d tables, %2$s rows" … … 561 576 562 577 #. translators: 1: files, 2: size. 563 #: includes/admin/class-admin.php:43 3578 #: includes/admin/class-admin.php:437 564 579 #, php-format 565 580 msgid "%1$s files, %2$s" … … 567 582 568 583 #. translators: %s: count. 569 #: includes/admin/class-admin.php:4 36584 #: includes/admin/class-admin.php:440 570 585 #, php-format 571 586 msgid "%s unchanged (linked)" 572 587 msgstr "" 573 588 574 #: includes/admin/class-admin.php:44 5589 #: includes/admin/class-admin.php:449 575 590 #: includes/admin/class-cloud-page.php:450 576 591 msgid "Complete" 577 592 msgstr "" 578 593 594 #. translators: %s: date. 595 #: includes/admin/class-admin.php:455 596 #, php-format 597 msgid "Checked %s: intact" 598 msgstr "" 599 600 #. translators: %s: date. 601 #: includes/admin/class-admin.php:462 602 #, php-format 603 msgid "Damaged (checked %s)" 604 msgstr "" 605 579 606 #. translators: %d: warnings. 580 #: includes/admin/class-admin.php:4 50607 #: includes/admin/class-admin.php:470 581 608 #, php-format 582 609 msgid "%d warning" … … 585 612 msgstr[1] "" 586 613 587 #: includes/admin/class-admin.php:4 55614 #: includes/admin/class-admin.php:475 588 615 msgid "Incomplete" 589 616 msgstr "" 590 617 591 #: includes/admin/class-admin.php:4 60618 #: includes/admin/class-admin.php:480 592 619 msgid "Restore to this site" 593 620 msgstr "" 594 621 595 #: includes/admin/class-admin.php:462 622 #: includes/admin/class-admin.php:481 623 msgid "Read the whole backup back and compare every part with what was backed up, to find damage before you need it." 624 msgstr "" 625 626 #: includes/admin/class-admin.php:481 627 msgid "Check" 628 msgstr "" 629 630 #: includes/admin/class-admin.php:483 596 631 msgid "Delete this backup permanently?" 597 632 msgstr "" 598 633 599 #: includes/admin/class-admin.php:4 66600 #: includes/admin/class-admin.php:5 66634 #: includes/admin/class-admin.php:487 635 #: includes/admin/class-admin.php:587 601 636 #: includes/admin/class-cloud-page.php:463 602 637 msgid "Delete" 603 638 msgstr "" 604 639 605 #: includes/admin/class-admin.php: 491640 #: includes/admin/class-admin.php:512 606 641 msgid "Another site running Site Replica can pull a full copy of this one: the database and wp-content. The copy is streamed in small encrypted pieces, so nothing large is written on this server." 607 642 msgstr "" 608 643 609 #: includes/admin/class-admin.php: 493644 #: includes/admin/class-admin.php:514 610 645 msgid "This site is not using HTTPS, so pull requests will be refused. Enable SSL first." 611 646 msgstr "" 612 647 613 #: includes/admin/class-admin.php: 498648 #: includes/admin/class-admin.php:519 614 649 msgid "Your new connection key" 615 650 msgstr "" 616 651 617 #: includes/admin/class-admin.php: 499652 #: includes/admin/class-admin.php:520 618 653 msgid "Copy it now: it will not be shown again." 619 654 msgstr "" 620 655 621 #: includes/admin/class-admin.php: 499656 #: includes/admin/class-admin.php:520 622 657 msgid "Paste it into Site Replica → Pull & Clone on the computer that will make the backup. Anyone with this key can copy this whole site, so keep it private." 623 658 msgstr "" 624 659 625 #: includes/admin/class-admin.php:5 01660 #: includes/admin/class-admin.php:522 626 661 msgid "Copy key" 627 662 msgstr "" 628 663 629 #: includes/admin/class-admin.php:5 13664 #: includes/admin/class-admin.php:534 630 665 msgid "Turn off" 631 666 msgstr "" 632 667 633 #: includes/admin/class-admin.php:5 16668 #: includes/admin/class-admin.php:537 634 669 msgid "Turn on" 635 670 msgstr "" 636 671 637 #: includes/admin/class-admin.php:5 22672 #: includes/admin/class-admin.php:543 638 673 msgid "Connection keys" 639 674 msgstr "" 640 675 641 #: includes/admin/class-admin.php:5 26642 #: includes/admin/class-admin.php: 582676 #: includes/admin/class-admin.php:547 677 #: includes/admin/class-admin.php:603 643 678 msgid "Label" 644 679 msgstr "" 645 680 646 #: includes/admin/class-admin.php:5 27681 #: includes/admin/class-admin.php:548 647 682 msgid "Created" 648 683 msgstr "" 649 684 650 #: includes/admin/class-admin.php:5 28685 #: includes/admin/class-admin.php:549 651 686 msgid "Expires" 652 687 msgstr "" 653 688 654 #: includes/admin/class-admin.php:5 29689 #: includes/admin/class-admin.php:550 655 690 msgid "Allowed IPs" 656 691 msgstr "" 657 692 658 #: includes/admin/class-admin.php:5 30693 #: includes/admin/class-admin.php:551 659 694 msgid "Last used" 660 695 msgstr "" 661 696 662 #: includes/admin/class-admin.php:5 43697 #: includes/admin/class-admin.php:564 663 698 msgid "Revoked" 664 699 msgstr "" 665 700 666 #: includes/admin/class-admin.php:5 45701 #: includes/admin/class-admin.php:566 667 702 msgid "Expired" 668 703 msgstr "" 669 704 670 #: includes/admin/class-admin.php:5 51705 #: includes/admin/class-admin.php:572 671 706 msgid "Any" 672 707 msgstr "" 673 708 674 #: includes/admin/class-admin.php:5 59709 #: includes/admin/class-admin.php:580 675 710 msgid "Revoke" 676 711 msgstr "" 677 712 678 #: includes/admin/class-admin.php:5 75713 #: includes/admin/class-admin.php:596 679 714 msgid "No keys yet." 680 715 msgstr "" 681 716 682 #: includes/admin/class-admin.php:5 78717 #: includes/admin/class-admin.php:599 683 718 msgid "Generate a key" 684 719 msgstr "" 685 720 686 #: includes/admin/class-admin.php: 583721 #: includes/admin/class-admin.php:604 687 722 msgid "e.g. Staging site" 688 723 msgstr "" 689 724 690 #: includes/admin/class-admin.php: 584725 #: includes/admin/class-admin.php:605 691 726 msgid "Expires after" 692 727 msgstr "" 693 728 694 #: includes/admin/class-admin.php: 586729 #: includes/admin/class-admin.php:607 695 730 msgid "1 day" 696 731 msgstr "" 697 732 698 #: includes/admin/class-admin.php: 587733 #: includes/admin/class-admin.php:608 699 734 msgid "7 days" 700 735 msgstr "" 701 736 702 #: includes/admin/class-admin.php: 588737 #: includes/admin/class-admin.php:609 703 738 msgid "30 days" 704 739 msgstr "" 705 740 706 #: includes/admin/class-admin.php: 589741 #: includes/admin/class-admin.php:610 707 742 msgid "1 year" 708 743 msgstr "" 709 744 710 #: includes/admin/class-admin.php: 592745 #: includes/admin/class-admin.php:613 711 746 msgid "Only allow these IP addresses (optional)" 712 747 msgstr "" 713 748 714 #: includes/admin/class-admin.php: 594749 #: includes/admin/class-admin.php:615 715 750 msgid "Comma-separated. Leave empty to allow any address. Doesn’t work if the site is behind Cloudflare." 716 751 msgstr "" 717 752 718 #: includes/admin/class-admin.php: 595753 #: includes/admin/class-admin.php:616 719 754 msgid "Generate key" 720 755 msgstr "" 721 756 722 #: includes/admin/class-admin.php: 598757 #: includes/admin/class-admin.php:619 723 758 msgid "Recent pull activity" 724 759 msgstr "" 725 760 726 #: includes/admin/class-admin.php:6 09761 #: includes/admin/class-admin.php:630 727 762 msgid "Jobs" 728 763 msgstr "" 729 764 730 #: includes/admin/class-admin.php:6 12765 #: includes/admin/class-admin.php:633 731 766 msgid "No jobs yet." 732 767 msgstr "" 733 768 734 #: includes/admin/class-admin.php:6 22769 #: includes/admin/class-admin.php:643 735 770 msgid "Activity" 736 771 msgstr "" 737 772 738 #: includes/admin/class-admin.php:6 27773 #: includes/admin/class-admin.php:648 739 774 msgid "Pull requests from other sites" 740 775 msgstr "" 741 776 742 #: includes/admin/class-admin.php:6 44777 #: includes/admin/class-admin.php:665 743 778 msgid "Storage folder" 744 779 msgstr "" 745 780 746 #: includes/admin/class-admin.php:6 46781 #: includes/admin/class-admin.php:667 747 782 msgid "Set ACCESSNOW_REPLICA_STORAGE_DIR in wp-config.php to choose another folder." 748 783 msgstr "" 749 784 750 #: includes/admin/class-admin.php:6 47785 #: includes/admin/class-admin.php:668 751 786 msgid "Work in slices of (seconds)" 752 787 msgstr "" 753 788 754 #: includes/admin/class-admin.php:6 49789 #: includes/admin/class-admin.php:670 755 790 msgid "0 = automatic (below the host’s time limit)." 756 791 msgstr "" 757 792 758 #: includes/admin/class-admin.php:6 50793 #: includes/admin/class-admin.php:671 759 794 msgid "Source time per request (ms)" 760 795 msgstr "" 761 796 762 #: includes/admin/class-admin.php:6 52797 #: includes/admin/class-admin.php:673 763 798 msgid "Data per request (bytes)" 764 799 msgstr "" 765 800 766 #: includes/admin/class-admin.php:6 54801 #: includes/admin/class-admin.php:675 767 802 msgid "Backups to keep per site" 768 803 msgstr "" 769 804 770 #: includes/admin/class-admin.php:6 56805 #: includes/admin/class-admin.php:677 771 806 msgid "0 = keep all. Unchanged files are shared between backups, so extra backups use little space." 772 807 msgstr "" 773 808 774 #: includes/admin/class-admin.php:6 57809 #: includes/admin/class-admin.php:678 775 810 msgid "Also exclude (on this site as a source)" 776 811 msgstr "" 777 812 778 #: includes/admin/class-admin.php:659 779 msgid "One pattern per line, relative to wp-content. Caches, other backup plugins’ folders, .git and node_modules are always excluded." 780 msgstr "" 781 782 #: includes/admin/class-admin.php:660 813 #: includes/admin/class-admin.php:680 814 msgid "One pattern per line, relative to wp-content. Start a line with **/ to leave out a name wherever it is, for example **/*.log. Caches, other backup plugins’ folders, .git and node_modules are always excluded." 815 msgstr "" 816 817 #: includes/admin/class-admin.php:681 818 msgid "Developer files" 819 msgstr "" 820 821 #: includes/admin/class-admin.php:682 822 msgid "Leave developer files out of themes and plugins developed on this site" 823 msgstr "" 824 825 #: includes/admin/class-admin.php:683 826 msgid "For a theme or plugin that is a git working copy (it has a .git folder): its docs, tests, bin, scripts, composer and package files, notes (*.md, CLAUDE.md) and, when composer.json asks only for development packages, vendor. Themes and plugins installed from a ZIP are never touched. Files already sent to another site stay there until you remove them." 827 msgstr "" 828 829 #: includes/admin/class-admin.php:684 783 830 msgid "Transients" 784 831 msgstr "" 785 832 786 #: includes/admin/class-admin.php:6 61833 #: includes/admin/class-admin.php:685 787 834 msgid "Include cached transients in the database export (usually not needed)" 788 835 msgstr "" 789 836 790 #: includes/admin/class-admin.php:6 63837 #: includes/admin/class-admin.php:687 791 838 msgid "Save settings" 792 839 msgstr "" 793 840 794 #: includes/admin/class-admin.php:7 30841 #: includes/admin/class-admin.php:755 795 842 msgid "Pause" 796 843 msgstr "" 797 844 798 #: includes/admin/class-admin.php:7 31845 #: includes/admin/class-admin.php:756 799 846 msgid "Resume" 800 847 msgstr "" 801 848 802 #: includes/admin/class-admin.php:7 32849 #: includes/admin/class-admin.php:757 803 850 msgid "Cancel" 804 851 msgstr "" 805 852 806 #: includes/admin/class-admin.php:7 33853 #: includes/admin/class-admin.php:758 807 854 msgid "View backups" 808 855 msgstr "" 809 856 810 #: includes/admin/class-admin.php:7 36857 #: includes/admin/class-admin.php:761 811 858 msgid "Keep this page open while the job runs. If you close it, the job pauses and you can resume it here later." 812 859 msgstr "" 813 860 814 #: includes/admin/class-admin.php:7 49861 #: includes/admin/class-admin.php:774 815 862 msgid "Nothing logged yet." 816 863 msgstr "" 817 864 818 #: includes/admin/class-admin.php:8 18819 #: includes/admin/class-admin.php:8 31820 #: includes/admin/class-admin.php:8 57821 #: includes/admin/class-admin.php:8 69822 #: includes/admin/class-admin.php: 881823 #: includes/admin/class-admin.php:9 28824 #: includes/admin/class-admin.php:9 40825 #: includes/admin/class-admin.php:9 57826 #: includes/admin/class-admin.php: 990865 #: includes/admin/class-admin.php:843 866 #: includes/admin/class-admin.php:856 867 #: includes/admin/class-admin.php:882 868 #: includes/admin/class-admin.php:894 869 #: includes/admin/class-admin.php:906 870 #: includes/admin/class-admin.php:953 871 #: includes/admin/class-admin.php:965 872 #: includes/admin/class-admin.php:982 873 #: includes/admin/class-admin.php:1015 827 874 #: includes/admin/class-cloud-page.php:482 828 875 #: includes/admin/class-cloud-page.php:495 … … 838 885 msgstr "" 839 886 840 #: includes/admin/class-admin.php:8 23887 #: includes/admin/class-admin.php:848 841 888 msgid "Pulling is on. Generate a key for the computer that will make backups." 842 889 msgstr "" 843 890 844 #: includes/admin/class-admin.php:8 23891 #: includes/admin/class-admin.php:848 845 892 msgid "Pulling is off. Existing keys stop working until you turn it on again." 846 893 msgstr "" 847 894 848 895 #. translators: %s: address. 849 #: includes/admin/class-admin.php:8 41896 #: includes/admin/class-admin.php:866 850 897 #, php-format 851 898 msgid "\"%s\" is not a valid IP address or range." 852 899 msgstr "" 853 900 854 #: includes/admin/class-admin.php:8 49901 #: includes/admin/class-admin.php:874 855 902 msgid "Key created and pulling turned on." 856 903 msgstr "" 857 904 858 #: includes/admin/class-admin.php:8 61905 #: includes/admin/class-admin.php:886 859 906 msgid "Key revoked. It stops working immediately." 860 907 msgstr "" 861 908 862 #: includes/admin/class-admin.php:8 73909 #: includes/admin/class-admin.php:898 863 910 msgid "Key deleted." 864 911 msgstr "" 865 912 866 #: includes/admin/class-admin.php: 890913 #: includes/admin/class-admin.php:915 867 914 msgid "That key belongs to this site. Paste it into the site that will make the backup." 868 915 msgstr "" 869 916 870 917 #. translators: %s: site. 871 #: includes/admin/class-admin.php:9 17918 #: includes/admin/class-admin.php:942 872 919 #, php-format 873 920 msgid "New key saved for %s. You can pull a backup now." … … 875 922 876 923 #. translators: %s: site. 877 #: includes/admin/class-admin.php:9 19924 #: includes/admin/class-admin.php:944 878 925 #, php-format 879 926 msgid "Connected to %s. You can pull a backup now." 880 927 msgstr "" 881 928 882 #: includes/admin/class-admin.php:9 32929 #: includes/admin/class-admin.php:957 883 930 msgid "Connection removed." 884 931 msgstr "" 885 932 886 #: includes/admin/class-admin.php:9 46933 #: includes/admin/class-admin.php:971 887 934 msgid "That backup is still being made. Cancel the job first." 888 935 msgstr "" 889 936 890 #: includes/admin/class-admin.php:9 49937 #: includes/admin/class-admin.php:974 891 938 #: includes/admin/class-cloud-page.php:708 892 939 msgid "Backup deleted." 893 940 msgstr "" 894 941 895 #: includes/admin/class-admin.php:9 63942 #: includes/admin/class-admin.php:988 896 943 msgid "No backups were selected." 897 944 msgstr "" 898 945 899 946 #. translators: %d: number of backups. 900 #: includes/admin/class-admin.php: 978947 #: includes/admin/class-admin.php:1003 901 948 #, php-format 902 949 msgid "%d backup deleted." … … 905 952 msgstr[1] "" 906 953 907 #: includes/admin/class-admin.php: 980954 #: includes/admin/class-admin.php:1005 908 955 msgid "One backup was kept because a job is using it." 909 956 msgstr "" 910 957 911 #: includes/admin/class-admin.php: 994958 #: includes/admin/class-admin.php:1019 912 959 msgid "Settings saved." 913 960 msgstr "" 914 961 915 962 #. translators: %s: time difference. 916 #: includes/admin/class-admin.php:10 08963 #: includes/admin/class-admin.php:1033 917 964 #, php-format 918 965 msgid "%s ago" 919 966 msgstr "" 920 967 921 #: includes/admin/class-admin.php:10 26968 #: includes/admin/class-admin.php:1051 922 969 msgid "(not created yet: a private folder in wp-content, made when the first backup starts)" 923 970 msgstr "" 924 971 925 #: includes/admin/class-admin.php:10 31972 #: includes/admin/class-admin.php:1056 926 973 msgid "(unavailable)" 927 974 msgstr "" … … 1369 1416 1370 1417 #: includes/admin/class-cloud-page.php:700 1371 #: includes/jobs/class-ajax-driver.php:11 11418 #: includes/jobs/class-ajax-driver.php:119 1372 1419 msgid "Unknown backup." 1373 1420 msgstr "" … … 1500 1547 1501 1548 #: includes/client/class-remote-site.php:297 1502 #: includes/client/class-remote-site.php:42 11549 #: includes/client/class-remote-site.php:426 1503 1550 msgid "The clocks on the two servers differ too much." 1504 1551 msgstr "" … … 1533 1580 1534 1581 #. translators: %s: error. 1535 #: includes/client/class-remote-site.php:394 1582 #: includes/client/class-remote-site.php:397 1583 #, php-format 1584 msgid "Part of the backup arrived damaged on the other site and will be sent again: %s" 1585 msgstr "" 1586 1587 #. translators: %s: error. 1588 #: includes/client/class-remote-site.php:399 1536 1589 #, php-format 1537 1590 msgid "The source site reported an error: %s" 1538 1591 msgstr "" 1539 1592 1540 #: includes/client/class-remote-site.php:4 051593 #: includes/client/class-remote-site.php:410 1541 1594 msgid "The source server stopped part-way through an answer (host limits). Retrying with smaller pieces." 1542 1595 msgstr "" 1543 1596 1544 1597 #. translators: %s: URL. 1545 #: includes/client/class-remote-site.php:41 01598 #: includes/client/class-remote-site.php:415 1546 1599 #, php-format 1547 1600 msgid "The source site redirects to %s. Generate a new connection key on that address." 1548 1601 msgstr "" 1549 1602 1550 #: includes/client/class-remote-site.php:42 31603 #: includes/client/class-remote-site.php:428 1551 1604 msgid "The source site did not accept the connection key. It may have been revoked or have expired: generate a new key on the source." 1552 1605 msgstr "" 1553 1606 1554 #: includes/client/class-remote-site.php:4 251607 #: includes/client/class-remote-site.php:430 1555 1608 msgid "The source site has temporarily blocked this computer after failed attempts. Wait 30 minutes." 1556 1609 msgstr "" 1557 1610 1558 #: includes/client/class-remote-site.php:4 271611 #: includes/client/class-remote-site.php:432 1559 1612 msgid "The request was too large for the source site." 1560 1613 msgstr "" 1561 1614 1562 #: includes/client/class-remote-site.php:4 291615 #: includes/client/class-remote-site.php:434 1563 1616 msgid "The source site is busy with another request for this key." 1564 1617 msgstr "" 1565 1618 1566 #: includes/client/class-remote-site.php:43 11619 #: includes/client/class-remote-site.php:436 1567 1620 msgid "The source site only accepts HTTPS. Use its https:// address." 1568 1621 msgstr "" 1569 1622 1570 #: includes/client/class-remote-site.php:43 31623 #: includes/client/class-remote-site.php:438 1571 1624 msgid "The two sites run different Site Replica versions. Update the plugin on both." 1572 1625 msgstr "" 1573 1626 1574 #: includes/client/class-remote-site.php:4 351627 #: includes/client/class-remote-site.php:440 1575 1628 msgid "Pulling is turned off on the source site (Site Replica → This site as a source)." 1576 1629 msgstr "" 1577 1630 1578 #: includes/client/class-remote-site.php:44 21631 #: includes/client/class-remote-site.php:447 1579 1632 msgid "The source host’s resource limit was reached (HTTP 508). Using fewer connections and waiting." 1580 1633 msgstr "" 1581 1634 1582 1635 #. translators: %d: HTTP status. 1583 #: includes/client/class-remote-site.php:4 451636 #: includes/client/class-remote-site.php:450 1584 1637 #, php-format 1585 1638 msgid "The source server returned HTTP %d (overloaded or timed out). Retrying with smaller pieces." 1586 1639 msgstr "" 1587 1640 1588 #: includes/client/class-remote-site.php:4 481641 #: includes/client/class-remote-site.php:453 1589 1642 msgid "The source host is rate-limiting requests. Waiting before retrying." 1590 1643 msgstr "" 1591 1644 1592 1645 #. translators: 1: firewall name, 2: IP hint. 1593 #: includes/client/class-remote-site.php:4 561646 #: includes/client/class-remote-site.php:461 1594 1647 #, php-format 1595 1648 msgid "The request was blocked by %1$s on the source server. Ask the host (or the firewall settings) to allow requests to this site from your IP address, or allowlist \"accessnow_replica_api\"." 1596 1649 msgstr "" 1597 1650 1598 #: includes/client/class-remote-site.php:46 01651 #: includes/client/class-remote-site.php:465 1599 1652 msgid "Site Replica is not active on the source site, or pulling is turned off there." 1600 1653 msgstr "" 1601 1654 1602 1655 #. translators: %d: HTTP status. 1603 #: includes/client/class-remote-site.php:46 31656 #: includes/client/class-remote-site.php:468 1604 1657 #, php-format 1605 1658 msgid "The source returned a web page instead of data (HTTP %d). A security plugin, cache or firewall may be intercepting the request." … … 1607 1660 1608 1661 #. translators: %d: HTTP status. 1609 #: includes/client/class-remote-site.php:4 651662 #: includes/client/class-remote-site.php:470 1610 1663 #, php-format 1611 1664 msgid "Unexpected answer from the source site (HTTP %d)." 1612 1665 msgstr "" 1613 1666 1614 #: includes/client/class-remote-site.php:5 091667 #: includes/client/class-remote-site.php:514 1615 1668 msgid "a firewall" 1616 1669 msgstr "" … … 1746 1799 1747 1800 #: includes/jobs/class-ajax-driver.php:97 1801 #: includes/jobs/class-ajax-driver.php:105 1802 #: includes/jobs/steps/class-check.php:51 1748 1803 msgid "That backup is missing or incomplete." 1749 1804 msgstr "" 1750 1805 1751 #: includes/jobs/class-ajax-driver.php:1 031806 #: includes/jobs/class-ajax-driver.php:111 1752 1807 msgid "Set up where backups go first." 1753 1808 msgstr "" 1754 1809 1755 #: includes/jobs/class-ajax-driver.php:1 261810 #: includes/jobs/class-ajax-driver.php:134 1756 1811 msgid "Unknown job type." 1757 1812 msgstr "" 1758 1813 1759 #: includes/jobs/class-ajax-driver.php:1 421814 #: includes/jobs/class-ajax-driver.php:150 1760 1815 msgid "This job link has expired. Reload the page." 1761 1816 msgstr "" 1762 1817 1763 #: includes/jobs/class-ajax-driver.php: 2961818 #: includes/jobs/class-ajax-driver.php:304 1764 1819 msgid "The site has already been switched. Choose Keep or Roll back instead." 1765 1820 msgstr "" 1766 1821 1767 1822 #. translators: %s: host. 1768 #: includes/jobs/class-ajax-driver.php:3 171823 #: includes/jobs/class-ajax-driver.php:325 1769 1824 #, php-format 1770 1825 msgid "Type %s to confirm that this site will be replaced." … … 1809 1864 msgstr "" 1810 1865 1811 #: includes/jobs/class-job-store.php:7 41866 #: includes/jobs/class-job-store.php:75 1812 1867 msgid "Starting…" 1813 1868 msgstr "" 1869 1870 #: includes/jobs/steps/class-check.php:66 1871 msgid "Checking the database…" 1872 msgstr "" 1873 1874 #. translators: %s: file. 1875 #: includes/jobs/steps/class-check.php:71 1876 #: includes/jobs/steps/class-pull.php:1716 1877 #, php-format 1878 msgid "Database chunk %s is missing or damaged." 1879 msgstr "" 1880 1881 #: includes/jobs/steps/class-check.php:83 1882 msgid "Checking large database values…" 1883 msgstr "" 1884 1885 #. translators: %s: file. 1886 #: includes/jobs/steps/class-check.php:88 1887 #: includes/jobs/steps/class-pull.php:1727 1888 #, php-format 1889 msgid "Large value %s is missing or damaged." 1890 msgstr "" 1891 1892 #. translators: 1: files checked, 2: files in the backup. 1893 #: includes/jobs/steps/class-check.php:102 1894 #, php-format 1895 msgid "Checking files: %1$s of %2$s…" 1896 msgstr "" 1897 1898 #. translators: %s: file. 1899 #: includes/jobs/steps/class-check.php:114 1900 #, php-format 1901 msgid "File %s is missing or damaged in the backup." 1902 msgstr "" 1903 1904 #. translators: %d: problems. 1905 #: includes/jobs/steps/class-check.php:149 1906 #, php-format 1907 msgid "This backup is damaged: %d part no longer matches what was backed up (see the job log). Don't restore it; make a new backup." 1908 msgid_plural "This backup is damaged: %d parts no longer match what was backed up (see the job log). Don't restore it; make a new backup." 1909 msgstr[0] "" 1910 msgstr[1] "" 1814 1911 1815 1912 #. translators: 1: part number, 2: uploaded size, 3: destination. … … 1910 2007 #. translators: %s: folder. 1911 2008 #: includes/jobs/steps/class-pull.php:264 1912 #: includes/sets/class-set-files.php: 4292009 #: includes/sets/class-set-files.php:518 1913 2010 #, php-format 1914 2011 msgid "Could not create folder %s." … … 1919 2016 #: includes/jobs/steps/class-pull.php:864 1920 2017 #: includes/sets/class-set-files.php:243 1921 #: includes/sets/class-set-files.php: 4172018 #: includes/sets/class-set-files.php:506 1922 2019 msgid "Could not write to the backup folder. Is the disk full?" 1923 2020 msgstr "" … … 2064 2161 msgstr "" 2065 2162 2066 #. translators: %s: file.2067 #: includes/jobs/steps/class-pull.php:17162068 #, php-format2069 msgid "Database chunk %s is missing or damaged."2070 msgstr ""2071 2072 2163 #: includes/jobs/steps/class-pull.php:1720 2073 2164 msgid "Verifying database chunks…" … … 2075 2166 2076 2167 #. translators: %s: file. 2077 #: includes/jobs/steps/class-pull.php:17272078 #, php-format2079 msgid "Large value %s is missing or damaged."2080 msgstr ""2081 2082 #. translators: %s: file.2083 2168 #: includes/jobs/steps/class-pull.php:1750 2084 2169 #, php-format … … 2150 2235 msgstr "" 2151 2236 2152 #: includes/jobs/steps/class-restore.php:33 62237 #: includes/jobs/steps/class-restore.php:339 2153 2238 msgid "Waiting for you to review and confirm the restore." 2154 2239 msgstr "" 2155 2240 2156 2241 #. translators: %s: table. 2157 #: includes/jobs/steps/class-restore.php:36 52242 #: includes/jobs/steps/class-restore.php:368 2158 2243 #, php-format 2159 2244 msgid "Creating table %s…" … … 2161 2246 2162 2247 #. translators: 1: table, 2: chunk, 3: chunks. 2163 #: includes/jobs/steps/class-restore.php:4 172248 #: includes/jobs/steps/class-restore.php:420 2164 2249 #, php-format 2165 2250 msgid "Importing %1$s (part %2$d of %3$d)…" … … 2167 2252 2168 2253 #. translators: %s: file. 2169 #: includes/jobs/steps/class-restore.php:42 22254 #: includes/jobs/steps/class-restore.php:425 2170 2255 #, php-format 2171 2256 msgid "Backup file %s is missing or damaged." … … 2173 2258 2174 2259 #. translators: 1: size, 2: table. 2175 #: includes/jobs/steps/class-restore.php:49 52260 #: includes/jobs/steps/class-restore.php:498 2176 2261 #, php-format 2177 2262 msgid "Writing a large value (%1$s) into %2$s…" 2178 2263 msgstr "" 2179 2264 2180 #: includes/jobs/steps/class-restore.php:5 482265 #: includes/jobs/steps/class-restore.php:551 2181 2266 msgid "Adjusting the restored data for this site…" 2182 2267 msgstr "" 2183 2268 2184 #: includes/jobs/steps/class-restore.php: 6792269 #: includes/jobs/steps/class-restore.php:722 2185 2270 msgid "Your login could not be carried over (the job was not started by a logged-in user). Log in with an account from the backup." 2186 2271 msgstr "" 2187 2272 2188 2273 #. translators: %s: login. 2189 #: includes/jobs/steps/class-restore.php: 6902274 #: includes/jobs/steps/class-restore.php:733 2190 2275 #, php-format 2191 2276 msgid "The user \"%s\" exists in the backup but is not an administrator there, so your login was not carried over. Log in with the backup’s credentials." 2192 2277 msgstr "" 2193 2278 2194 #: includes/jobs/steps/class-restore.php:7 372279 #: includes/jobs/steps/class-restore.php:780 2195 2280 msgid "The imported data does not match the backup, so nothing was changed on this site: " 2196 2281 msgstr "" 2197 2282 2198 2283 #. translators: 1: done, 2: total. 2199 #: includes/jobs/steps/class-restore.php: 7772284 #: includes/jobs/steps/class-restore.php:820 2200 2285 #, php-format 2201 2286 msgid "Preparing files: %1$s of %2$s…" … … 2203 2288 2204 2289 #. translators: 1: number of files, 2: examples. 2205 #: includes/jobs/steps/class-restore.php:8 052290 #: includes/jobs/steps/class-restore.php:848 2206 2291 #, php-format 2207 2292 msgid "%1$s files were not restored: this computer's disk ignores upper/lower case, and each has a partner whose name differs only in case (for example %2$s). Pages that use them show the partner image instead. A restore to a Linux server keeps them all." 2208 2293 msgstr "" 2209 2294 2210 #: includes/jobs/steps/class-restore.php:8 282295 #: includes/jobs/steps/class-restore.php:871 2211 2296 msgid "Switching to the restored site…" 2212 2297 msgstr "" 2213 2298 2214 2299 #. translators: %s: view. 2215 #: includes/jobs/steps/class-restore.php:9 152300 #: includes/jobs/steps/class-restore.php:958 2216 2301 #, php-format 2217 2302 msgid "View %s was not recreated: it does not belong to this site." … … 2219 2304 2220 2305 #. translators: 1: view, 2: error. 2221 #: includes/jobs/steps/class-restore.php:9 222306 #: includes/jobs/steps/class-restore.php:965 2222 2307 #, php-format 2223 2308 msgid "View %1$s could not be recreated: %2$s" … … 2225 2310 2226 2311 #. translators: %s: trigger. 2227 #: includes/jobs/steps/class-restore.php:9 302312 #: includes/jobs/steps/class-restore.php:973 2228 2313 #, php-format 2229 2314 msgid "Trigger %s was not recreated: it does not belong to a restored table." … … 2231 2316 2232 2317 #. translators: 1: trigger, 2: error. 2233 #: includes/jobs/steps/class-restore.php:9 402318 #: includes/jobs/steps/class-restore.php:983 2234 2319 #, php-format 2235 2320 msgid "Trigger %1$s could not be recreated: %2$s" … … 2237 2322 2238 2323 #. translators: %s: number of values. 2239 #: includes/jobs/steps/class-restore.php: 9652324 #: includes/jobs/steps/class-restore.php:1008 2240 2325 #, php-format 2241 2326 msgid "%s values could not be searched for addresses (too large for PHP's pattern matcher) and were left unchanged." 2242 2327 msgstr "" 2243 2328 2244 #: includes/jobs/steps/class-restore.php: 9722329 #: includes/jobs/steps/class-restore.php:1015 2245 2330 msgid "Check the restored site. Keep it to delete the previous version, or roll back to put the previous site back exactly." 2246 2331 msgstr "" 2247 2332 2248 #: includes/jobs/steps/class-restore.php: 9932333 #: includes/jobs/steps/class-restore.php:1036 2249 2334 msgid "Rolling back…" 2250 2335 msgstr "" 2251 2336 2252 #: includes/jobs/steps/class-restore.php: 9982337 #: includes/jobs/steps/class-restore.php:1041 2253 2338 msgid "Restored. Keep this version or roll back?" 2254 2339 msgstr "" 2255 2340 2256 #: includes/jobs/steps/class-restore.php:10 512341 #: includes/jobs/steps/class-restore.php:1094 2257 2342 msgid "Cleaning up…" 2258 2343 msgstr "" -
accessnow-site-replica/tags/1.2.0/readme.txt
r3736115 r3815997 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 1.07 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 130 130 == Changelog == 131 131 132 = 1.2.0 = 133 * A restore replaces each plugin, theme and must-use plugin folder the backup has whole, the way an update does: a file this site has inside one of them that the backup doesn't (left over from a copy made by hand, say) is removed, and the restore plan lists each one before you confirm. Roll back returns them. Media and must-use plugins that exist only on this site are still kept. 134 * A new Developer files setting leaves notes, scripts, tests and tooling (docs, tests, bin, .github, *.md, CLAUDE.md, composer and package files) out of themes and plugins that are git working copies, so they are not copied to another site, where they would be readable. And an exclusion line starting with **/ now leaves a name out at any depth. 135 * Check a backup: a new Check button on the Backups page reads the whole backup back and compares every part with the fingerprint recorded when it was made, so a backup damaged in storage is found before you need it. The list shows when each backup was last checked. 136 * A restore compares every file with the backup's fingerprint as it goes and stops, with nothing on the site changed, if one is damaged. A file the site already has is reused only if it really is the same: scripts and files up to 1 MB are compared by content, so a file edited without changing its date is put back from the backup. 137 * A restore keeps this site's licence records for plugins sold through Freemius, the way it keeps Site Replica's own settings, so after sending a staging copy live those plugins stay activated instead of asking whether the site is a copy. A brand-new site with no such records keeps the backup's. 138 132 139 = 1.1.0 = 133 140 * A must-use plugin named local-only-* is never copied, like the local Mailpit helper: a convention for helpers that belong to one local copy (a theme preview switch, a test login), so they can't reach a live site. -
accessnow-site-replica/trunk/accessnow-site-replica.php
r3736115 r3815997 4 4 * Plugin URI: https://accessnow.com.au/projects/site-replica/ 5 5 * Description: Back up, clone and restore large WordPress sites in small, resumable steps, even on shared hosting with little free disk. Pull a live site to another install, clone it with rollback, and schedule backups to Google Drive or S3-compatible storage. 6 * Version: 1. 1.06 * Version: 1.2.0 7 7 * Requires at least: 6.4 8 8 * Requires PHP: 7.4 … … 29 29 } 30 30 31 define( 'ACCESSNOW_REPLICA_VERSION', '1. 1.0' );31 define( 'ACCESSNOW_REPLICA_VERSION', '1.2.0' ); 32 32 define( 'ACCESSNOW_REPLICA_PROTOCOL', 1 ); 33 33 define( 'ACCESSNOW_REPLICA_FILE', __FILE__ ); -
accessnow-site-replica/trunk/assets/js/admin.js
r3726810 r3815997 262 262 if (a.removed && a.removed.length) { 263 263 box.appendChild(el('p', {}, i18n.planRemoved + ' ' + a.removed.join(', '))); 264 } 265 if (a.replaced && a.replaced.count) { 266 var replacedBox = box.appendChild(el('div', { 'class': 'srp-replaced' })); 267 replacedBox.appendChild(el('p', {}, i18n.planReplaced)); 268 var replacedList = replacedBox.appendChild(el('ul', { 'class': 'srp-pairs' })); 269 a.replaced.list.forEach(function (f) { replacedList.appendChild(el('li', { 'data-part': f.part }, f.path)); }); 270 if (a.replaced.count > a.replaced.list.length) { 271 replacedBox.appendChild(el('p', { 'class': 'srp-muted' }, i18n.planMore.replace('%s', Number(a.replaced.count - a.replaced.list.length).toLocaleString()))); 272 } 264 273 } 265 274 box.appendChild(el('p', { 'class': 'description' }, i18n.planKept)); -
accessnow-site-replica/trunk/includes/admin/class-admin.php
r3726810 r3815997 119 119 'planMoved' => __( 'Tables that exist only on this site and will be removed (kept until you choose Keep):', 'accessnow-site-replica' ), 120 120 'planRemoved' => __( 'Plugins that exist only on this site and will be removed (Roll back returns them):', 'accessnow-site-replica' ), 121 'planReplaced' => __( 'Files in plugin, theme and must-use plugin folders that the backup also has, which only this site has. Each of those folders is replaced whole, the way an update replaces it, so these will be removed (Roll back returns them):', 'accessnow-site-replica' ), 122 /* translators: %s: number of files not listed. */ 123 'planMore' => __( '…and %s more.', 'accessnow-site-replica' ), 121 124 'planKept' => __( 'Media and must-use plugins that exist only on this site are kept.', 'accessnow-site-replica' ), 122 125 'optKeepLogin' => __( 'Keep me logged in (carry my account over)', 'accessnow-site-replica' ), … … 172 175 'clone' => __( 'Clone into this site', 'accessnow-site-replica' ), 173 176 'restore' => __( 'Restore', 'accessnow-site-replica' ), 177 'check' => __( 'Check backup', 'accessnow-site-replica' ), 174 178 'backup' => __( 'Back up this site', 'accessnow-site-replica' ), 175 179 'cloud' => __( 'Cloud backup', 'accessnow-site-replica' ), … … 444 448 <?php if ( $complete ) : ?> 445 449 <span class="srp-pill is-on"><?php esc_html_e( 'Complete', 'accessnow-site-replica' ); ?></span> 450 <?php $checked = \AccessNow\Replica\Jobs\Steps\Check::result( (string) $m['set_id'] ); ?> 451 <?php if ( $checked && 0 === (int) $checked['bad'] ) : ?> 452 <br><span class="srp-muted"> 453 <?php 454 /* translators: %s: date. */ 455 echo esc_html( sprintf( __( 'Checked %s: intact', 'accessnow-site-replica' ), wp_date( get_option( 'date_format' ), (int) $checked['time'] ) ) ); 456 ?> 457 </span> 458 <?php elseif ( $checked ) : ?> 459 <br><span class="srp-pill is-warn"> 460 <?php 461 /* translators: %s: date. */ 462 echo esc_html( sprintf( __( 'Damaged (checked %s)', 'accessnow-site-replica' ), wp_date( get_option( 'date_format' ), (int) $checked['time'] ) ) ); 463 ?> 464 </span> 465 <?php endif; ?> 446 466 <?php if ( ! empty( $m['warnings'] ) ) : ?> 447 467 <br><span class="srp-muted"> … … 459 479 <?php if ( $complete ) : ?> 460 480 <button type="button" class="button" data-srp-start="restore" data-set="<?php echo esc_attr( $m['set_id'] ); ?>" <?php disabled( (bool) $active ); ?>><?php esc_html_e( 'Restore to this site', 'accessnow-site-replica' ); ?></button> 481 <button type="button" class="button" data-srp-start="check" data-set="<?php echo esc_attr( $m['set_id'] ); ?>" <?php disabled( (bool) $active ); ?> title="<?php esc_attr_e( 'Read the whole backup back and compare every part with what was backed up, to find damage before you need it.', 'accessnow-site-replica' ); ?>"><?php esc_html_e( 'Check', 'accessnow-site-replica' ); ?></button> 461 482 <?php endif; ?> 462 483 <form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="srp-inline" onsubmit="return confirm('<?php echo esc_js( __( 'Delete this backup permanently?', 'accessnow-site-replica' ) ); ?>');"> … … 657 678 <tr><th scope="row"><label for="srp-excl"><?php esc_html_e( 'Also exclude (on this site as a source)', 'accessnow-site-replica' ); ?></label></th> 658 679 <td><textarea id="srp-excl" name="extra_excludes" rows="4" class="large-text code" placeholder="uploads/big-archive uploads/*.zip"><?php echo esc_textarea( (string) $s['extra_excludes'] ); ?></textarea> 659 <p class="description"><?php esc_html_e( 'One pattern per line, relative to wp-content. Caches, other backup plugins’ folders, .git and node_modules are always excluded.', 'accessnow-site-replica' ); ?></p></td></tr> 680 <p class="description"><?php esc_html_e( 'One pattern per line, relative to wp-content. Start a line with **/ to leave out a name wherever it is, for example **/*.log. Caches, other backup plugins’ folders, .git and node_modules are always excluded.', 'accessnow-site-replica' ); ?></p></td></tr> 681 <tr><th scope="row"><?php esc_html_e( 'Developer files', 'accessnow-site-replica' ); ?></th> 682 <td><label><input type="checkbox" name="leave_dev_files" value="1" <?php checked( ! empty( $s['leave_dev_files'] ) ); ?>> <?php esc_html_e( 'Leave developer files out of themes and plugins developed on this site', 'accessnow-site-replica' ); ?></label> 683 <p class="description"><?php esc_html_e( 'For a theme or plugin that is a git working copy (it has a .git folder): its docs, tests, bin, scripts, composer and package files, notes (*.md, CLAUDE.md) and, when composer.json asks only for development packages, vendor. Themes and plugins installed from a ZIP are never touched. Files already sent to another site stay there until you remove them.', 'accessnow-site-replica' ); ?></p></td></tr> 660 684 <tr><th scope="row"><?php esc_html_e( 'Transients', 'accessnow-site-replica' ); ?></th> 661 685 <td><label><input type="checkbox" name="include_transients" value="1" <?php checked( ! empty( $s['include_transients'] ) ); ?>> <?php esc_html_e( 'Include cached transients in the database export (usually not needed)', 'accessnow-site-replica' ); ?></label></td></tr> … … 681 705 'clone' => __( 'Clone into this site', 'accessnow-site-replica' ), 682 706 'restore' => __( 'Restore', 'accessnow-site-replica' ), 707 'check' => __( 'Check backup', 'accessnow-site-replica' ), 683 708 'backup' => __( 'Back up this site', 'accessnow-site-replica' ), 684 709 'cloud' => __( 'Cloud backup', 'accessnow-site-replica' ), -
accessnow-site-replica/trunk/includes/class-settings.php
r3726758 r3815997 32 32 'extra_excludes' => '', // One pattern per line, relative to wp-content. 33 33 'include_transients' => false, 34 'leave_dev_files' => false, // Leave notes, scripts and tests out of themes and plugins developed in place (a .git folder). 34 35 'keep_sets' => 5, // Pull sets kept per source (0 = keep all). 35 36 ); … … 73 74 'extra_excludes' => isset( $input['extra_excludes'] ) ? sanitize_textarea_field( (string) $input['extra_excludes'] ) : $current['extra_excludes'], 74 75 'include_transients' => ! empty( $input['include_transients'] ), 76 'leave_dev_files' => ! empty( $input['leave_dev_files'] ), 75 77 'keep_sets' => isset( $input['keep_sets'] ) ? max( 0, min( 100, (int) $input['keep_sets'] ) ) : $current['keep_sets'], 76 78 ); -
accessnow-site-replica/trunk/includes/client/class-remote-site.php
r3726758 r3815997 392 392 if ( 'X' === $frame[0] ) { 393 393 $error = json_decode( $frame[1], true ); 394 $code = is_array( $error ) ? (string) ( $error['code'] ?? '' ) : ''; 395 if ( in_array( $code, array( 'resend_piece', 'resend_file' ), true ) ) { 396 // Data that failed a checksum on the other site: a temporary failure, sent again. 397 throw new Remote_Exception( $code, sprintf( /* translators: %s: error. */ __( 'Part of the backup arrived damaged on the other site and will be sent again: %s', 'accessnow-site-replica' ), (string) $error['error'] ), true, 3 ); 398 } 394 399 throw new Remote_Exception( 'remote_error', sprintf( /* translators: %s: error. */ __( 'The source site reported an error: %s', 'accessnow-site-replica' ), is_array( $error ) ? (string) $error['error'] : 'unknown' ) ); 395 400 } -
accessnow-site-replica/trunk/includes/files/class-exclusions.php
r3736115 r3815997 71 71 72 72 /** 73 * Developer files at the top of a theme or plugin folder (fnmatch on the name): notes, scripts, 74 * tests and tooling that a live site never needs and that would be readable there. 75 */ 76 const DEV_TOP = array( 'docs', 'tests', 'test', 'bin', '.github', '*.md', 'composer.json', 'composer.lock', 'package.json', 'package-lock.json', 'phpcs.xml*', 'phpunit.xml*', '.phpcs.xml*', '.editorconfig', '.gitignore', '.distignore' ); 77 78 /** 79 * Names that show a theme or plugin folder is being developed (not just installed), used to warn. 80 */ 81 const DEV_MARKERS = array( 'CLAUDE.md', '.github', 'phpcs.xml', 'phpcs.xml.dist', 'phpunit.xml', 'phpunit.xml.dist', 'tests' ); 82 83 /** 84 * Whether to leave developer files out of theme and plugin folders that are git working copies. 85 * 86 * @var bool 87 */ 88 private $dev_files = false; 89 90 /** 91 * Per theme/plugin folder: array( has .git, leave vendor out ). 92 * 93 * @var array<string, array{0: bool, 1: bool}> 94 */ 95 private $units = array(); 96 97 /** 98 * Name patterns excluded at any depth (extra exclusion lines that start with **\/). 99 * 100 * @var string[] 101 */ 102 private $name_patterns = array(); 103 104 /** 73 105 * Patterns for one root. 74 106 * … … 101 133 if ( 'content' === $root_key ) { 102 134 $this->patterns = self::CONTENT_PATTERNS; 135 $this->dev_files = (bool) Settings::get( 'leave_dev_files' ); 103 136 foreach ( preg_split( '/\R/', (string) Settings::get( 'extra_excludes' ) ) as $line ) { 104 $line = trim( trim( $line ), '/' ); 137 $line = trim( $line ); 138 if ( 0 === strpos( $line, '**/' ) && strlen( $line ) > 3 && false === strpos( substr( $line, 3 ), '/' ) ) { 139 $this->name_patterns[] = substr( $line, 3 ); // A name, wherever it is. 140 continue; 141 } 142 $line = trim( $line, '/' ); 105 143 if ( '' !== $line && false === strpos( $line, '..' ) ) { 106 144 $this->patterns[] = $line; … … 130 168 } 131 169 } 170 foreach ( $this->name_patterns as $pattern ) { 171 if ( fnmatch( $pattern, $name ) ) { 172 return true; 173 } 174 } 132 175 foreach ( $this->patterns as $pattern ) { 133 176 if ( fnmatch( $pattern, $rel, FNM_PATHNAME ) ) { … … 135 178 } 136 179 } 180 if ( $this->dev_files && $this->developer_file( $rel, $name ) ) { 181 return true; 182 } 137 183 if ( '' !== $this->storage && $this->root . $rel === $this->storage ) { 138 184 return true; … … 140 186 return false; 141 187 } 188 189 /** 190 * Whether a path is a developer file of a theme or plugin folder that is a git working copy. 191 * 192 * Only inside themes and plugins, and only in folders with a .git (developed in place): a theme 193 * or plugin installed from a ZIP keeps everything it came with. CLAUDE.md goes at any depth; 194 * the rest at the top of the folder. vendor/ goes only when composer.json asks for nothing but 195 * development packages (its production code, if any, would be in require). 196 * 197 * @param string $rel Path relative to wp-content. 198 * @param string $name Base name. 199 */ 200 private function developer_file( $rel, $name ) { 201 if ( ! preg_match( '#^(themes|plugins)/([^/]+)/(.+)$#', $rel, $m ) ) { 202 return false; 203 } 204 $unit = $m[1] . '/' . $m[2]; 205 if ( ! isset( $this->units[ $unit ] ) ) { 206 $dir = $this->root . $unit; 207 $this->units[ $unit ] = array( file_exists( $dir . '/.git' ), self::composer_dev_only( $dir . '/composer.json' ) ); 208 } 209 if ( ! $this->units[ $unit ][0] ) { 210 return false; 211 } 212 if ( 'CLAUDE.md' === $name ) { 213 return true; 214 } 215 $inner = $m[3]; 216 $top = false === strpos( $inner, '/' ) ? $inner : strstr( $inner, '/', true ); 217 if ( 'vendor' === $top && $this->units[ $unit ][1] ) { 218 return true; 219 } 220 foreach ( self::DEV_TOP as $pattern ) { 221 if ( fnmatch( $pattern, $top ) ) { 222 return true; 223 } 224 } 225 return false; 226 } 227 228 /** 229 * Whether a composer.json has packages only under require-dev (nothing the site runs on). 230 * 231 * @param string $file Path. 232 */ 233 private static function composer_dev_only( $file ) { 234 if ( ! is_file( $file ) ) { 235 return false; 236 } 237 $json = json_decode( (string) file_get_contents( $file ), true ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents 238 if ( ! is_array( $json ) || empty( $json['require-dev'] ) ) { 239 return false; 240 } 241 foreach ( array_keys( (array) ( $json['require'] ?? array() ) ) as $package ) { 242 if ( 'php' !== $package && 0 !== strpos( (string) $package, 'ext-' ) ) { 243 return false; 244 } 245 } 246 return true; 247 } 248 249 /** 250 * Theme and plugin folders in a list of index paths that look developed in place, with their 251 * developer files, to warn before they are sent. Names only: a backup does not hold .git. 252 * 253 * @param string[] $paths Paths relative to wp-content. 254 * @return array<string, string[]> Folder => developer files (a few). 255 */ 256 public static function developer_files_in( array $paths ) { 257 $units = array(); 258 $marked = array(); 259 foreach ( $paths as $rel ) { 260 if ( ! preg_match( '#^(themes|plugins)/([^/]+)/([^/]+)(/|$)#', $rel, $m ) ) { 261 continue; 262 } 263 $unit = $m[1] . '/' . $m[2]; 264 $top = $m[3]; 265 if ( in_array( $top, self::DEV_MARKERS, true ) ) { 266 $marked[ $unit ] = true; 267 } 268 foreach ( self::DEV_TOP as $pattern ) { 269 if ( fnmatch( $pattern, $top ) ) { 270 $units[ $unit ][ $top ] = true; 271 break; 272 } 273 } 274 } 275 $out = array(); 276 foreach ( $units as $unit => $names ) { 277 if ( isset( $marked[ $unit ] ) ) { 278 $out[ $unit ] = array_slice( array_keys( $names ), 0, 6 ); 279 } 280 } 281 return $out; 282 } 142 283 } -
accessnow-site-replica/trunk/includes/jobs/class-ajax-driver.php
r3726758 r3815997 99 99 list( $job, $token ) = Job_Store::create( 'restore', array(), array( 'set_id' => $set_id ) ); 100 100 Logger::activity( 'restore', 'Restore prepared from backup ' . $set_id, array( 'job' => $job->id() ) ); 101 } elseif ( 'check' === $type ) { 102 $set_id = isset( $_POST['set'] ) ? sanitize_text_field( wp_unslash( $_POST['set'] ) ) : ''; 103 $m = Set_Store::manifest( $set_id ); 104 if ( ! $m || 'complete' !== ( $m['status'] ?? '' ) ) { 105 wp_send_json_error( array( 'message' => __( 'That backup is missing or incomplete.', 'accessnow-site-replica' ) ), 400 ); 106 } 107 list( $job, $token ) = Job_Store::create( 'check', array(), array( 'set_id' => $set_id ) ); 108 Logger::activity( 'pull', 'Check of backup ' . $set_id . ' started', array( 'job' => $job->id() ) ); 101 109 } elseif ( 'cloud' === $type ) { 102 110 if ( ! \AccessNow\Replica\Destinations\Destination::current()->ready() ) { -
accessnow-site-replica/trunk/includes/jobs/class-job-runner.php
r3726810 r3815997 186 186 } elseif ( 0 === strpos( $step, 'cl_' ) || 0 === strpos( $step, 'ci_' ) ) { 187 187 $class = Steps\Cloud::class; 188 } elseif ( 0 === strpos( $step, 'ck_' ) ) { 189 $class = Steps\Check::class; 188 190 } else { 189 191 $class = Steps\Pull::class; -
accessnow-site-replica/trunk/includes/jobs/class-job-store.php
r3726758 r3815997 37 37 'import' => self::IMPORT, 38 38 'restore' => self::RESTORE, 39 'check' => array( 'ck_backup' ), 39 40 'clone' => array( 'preflight', 'db_schema', 'db_data', 'fs_scan', 'fs_transfer', 'verify', 'finalize', 'rs_preflight', 'rs_plan', 'rs_db_create', 'rs_db_import', 'rs_db_bigs', 'rs_db_verify', 'rs_db_fix', 'rs_files_stage', 'rs_swap', 'rs_post', 'rs_confirm', 'rs_cleanup' ), 40 41 ); -
accessnow-site-replica/trunk/includes/jobs/steps/class-restore.php
r3726758 r3815997 312 312 'moved' => $live, 313 313 'removed' => Files::plugins_only_here( Set_Store::dir( (string) $job->get( 'set_id' ) ) ), 314 // Files this site has inside plugin, theme and must-use plugin folders the backup 315 // also has: each folder is replaced whole, as an update replaces it, so they go. 316 'replaced' => Files::removed_in_folders( Set_Store::dir( (string) $job->get( 'set_id' ) ) ), 314 317 'local' => $local, 315 318 'opts' => $job->get( 'restore_opts' ), … … 561 564 $db->query( 'DELETE FROM %i WHERE ' . $own_cond, $options, ...$own ); 562 565 $db->query( 'INSERT INTO %i (option_name, option_value, autoload) SELECT option_name, option_value, autoload FROM %i WHERE ' . $own_cond, $options, $wpdb->options, ...$own ); 566 if ( self::keep_freemius_records( $db, $options, $wpdb->options ) ) { 567 $job->log( 'Kept this site\'s licence records for plugins sold through Freemius, so they stay activated here instead of asking whether this site is a copy.' ); 568 } 563 569 // Caches that must be rebuilt here. 564 570 $db->query( "DELETE FROM %i WHERE option_name IN ('rewrite_rules') OR option_name LIKE %s OR option_name LIKE %s", $options, $wpdb->esc_like( '_transient_' ) . '%', $wpdb->esc_like( '_site_transient_' ) . '%' ); … … 591 597 self::keep_login( $db, $users, $usermeta, $dst_px, (int) $job->s['user'], $job ); 592 598 } 599 return true; 600 } 601 602 /** 603 * Keeps this site's Freemius records (licences, installs, clone state) in place of the backup's. 604 * 605 * Plugins sold through Freemius keep their licence and install records in the options table. 606 * Restored from another site, those records name the other site's address, so the SDK treats 607 * this site as a copy and asks whether to duplicate, migrate or activate again (its "safe mode"), 608 * which a routine staging-to-live send should never do. Only when this site already has records 609 * of its own: a fresh site keeps the backup's, so the SDK can offer to duplicate the licence. 610 * 611 * @param Connection $db Connection. 612 * @param string $temp Restored options table, before the swap. 613 * @param string $live This site's options table. 614 * @return bool Whether this site's records were kept. 615 */ 616 public static function keep_freemius_records( Connection $db, $temp, $live ) { 617 global $wpdb; 618 // The SDK's own option names (config.php, WP_FS___OPTION_PREFIX), in production and development mode. 619 $exact = array(); 620 $like = array(); 621 foreach ( array( 'fs_', 'fs_dbg_' ) as $p ) { 622 foreach ( array( 'accounts', 'api_cache', 'gdpr', 'options', 'clone_management' ) as $name ) { 623 $exact[] = $p . $name; 624 } 625 $like[] = $wpdb->esc_like( $p . 'cache_' ) . '%'; 626 } 627 $exact[] = 'fs_active_plugins'; 628 $here = (int) $db->value( "SELECT COUNT(*) FROM %i WHERE option_name IN ('fs_accounts', 'fs_dbg_accounts')", $live ); 629 if ( 0 === $here ) { 630 return false; 631 } 632 $cond = 'option_name IN (' . implode( ',', array_fill( 0, count( $exact ), '%s' ) ) . ') OR option_name LIKE %s OR option_name LIKE %s'; 633 $args = array_merge( $exact, $like ); 634 $db->query( 'DELETE FROM %i WHERE ' . $cond, $temp, ...$args ); 635 $db->query( 'INSERT INTO %i (option_name, option_value, autoload) SELECT option_name, option_value, autoload FROM %i WHERE ' . $cond, $temp, $live, ...$args ); 593 636 return true; 594 637 } -
accessnow-site-replica/trunk/includes/restore/class-files.php
r3726758 r3815997 17 17 namespace AccessNow\Replica\Restore; 18 18 19 use AccessNow\Replica\Sets\Damaged_File; 19 20 use AccessNow\Replica\Sets\Set_Files; 20 21 use AccessNow\Replica\Storage; … … 47 48 */ 48 49 const LEGACY_DIRS = array( 'site-replica' ); 50 51 /** 52 * Live files up to this size (and every script) are hashed before an unchanged one is reused. 53 */ 54 const LINK_CHECK_BYTES = 1048576; 49 55 50 56 /** … … 169 175 @unlink( $target ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink -- Our own earlier attempt. 170 176 } 171 // Unchanged live file: hardlink it instead of copying. 177 // Unchanged live file: hardlink it instead of copying. Size and time alone can be kept by an 178 // edit (malware often resets the time), so a script or a small file must also have the bytes 179 // the backup recorded; large media go by size and time, so a restore doesn't read them all. 172 180 $live = self::dest_root( $row['r'] ) . '/' . $rel; 173 181 clearstatcache( true, $live ); 174 if ( is_file( $live ) && ! is_link( $live ) && (int) filesize( $live ) === (int) $row['s'] && (int) filemtime( $live ) === (int) $row['m'] && @link( $live, $target ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 182 if ( is_file( $live ) && ! is_link( $live ) && (int) filesize( $live ) === (int) $row['s'] && (int) filemtime( $live ) === (int) $row['m'] 183 && ( ( (int) $row['s'] > self::LINK_CHECK_BYTES && ! Set_Files::is_script( $row ) ) || Set_Files::matches( $live, $row ) ) 184 && @link( $live, $target ) ) { // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 175 185 return 'linked'; 176 186 } … … 178 188 try { 179 189 $copied = Set_Files::copy_out( $set_dir, $row, $target ); 190 } catch ( Damaged_File $e ) { 191 // The backup itself is damaged: stop before the swap, with this site untouched. 192 throw new \RuntimeException( sprintf( 'The backup is damaged: %s Nothing on this site has been changed. Restore another backup, or make a new one.', $e->getMessage() ) ); 180 193 } catch ( \RuntimeException $e ) { 181 194 return 'skipped'; // A path or checksum that is not allowed. … … 349 362 350 363 /** 364 * The plugin, theme or must-use plugin folder a path is inside, relative to its root 365 * (plugins/foo for the content root, foo for the plugins root), or null when it is not inside 366 * one: a single-file plugin, a top-level must-use plugin, media, or this plugin itself. 367 * 368 * The restore replaces each such folder whole, the way a plugin update does, so a file this site 369 * has inside a folder the backup also has, and the backup doesn't, is removed. 370 * 371 * @param string $root Root key. 372 * @param string $rel Path relative to the root. 373 * @return string|null 374 */ 375 public static function replaced_folder( $root, $rel ) { 376 $parts = explode( '/', (string) $rel ); 377 if ( 'content' === $root ) { 378 if ( count( $parts ) < 3 || ! in_array( $parts[0], array( 'plugins', 'mu-plugins', 'themes' ), true ) || '' === $parts[1] ) { 379 return null; 380 } 381 $folder = $parts[0] . '/' . $parts[1]; 382 } elseif ( in_array( $root, array( 'plugins', 'mu-plugins', 'themes' ), true ) ) { 383 if ( count( $parts ) < 2 || '' === $parts[0] ) { 384 return null; 385 } 386 $folder = $parts[0]; 387 } else { 388 return null; 389 } 390 return null === self::unit( $root, $folder ) ? null : $folder; 391 } 392 393 /** 394 * Files and folders this site has inside the plugin, theme and must-use plugin folders the backup 395 * also has, which the backup doesn't: the restore replaces those folders whole, so it removes 396 * them (Roll back puts them back). A folder the backup has nothing inside is listed once, with a 397 * trailing slash, instead of file by file. 398 * 399 * @param string $set_dir Set dir. 400 * @param int $limit Most entries to list (the count covers them all). 401 * @param array<string, string>|null $dirs Root key => live directory (tests); null for this site's. 402 * @return array{list: array[], count: int} list: {path (from wp-content's point of view), part (the swap unit, as the restore plan's parts name it)}. 403 */ 404 public static function removed_in_folders( $set_dir, $limit = 200, $dirs = null ) { 405 $out = array( 406 'list' => array(), 407 'count' => 0, 408 ); 409 $fh = @fopen( $set_dir . 'index/files.jsonl', 'rb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 410 if ( ! $fh ) { 411 return $out; 412 } 413 // What the backup has inside those folders: every file and folder, and each file's folders. 414 $folders = array(); 415 $have = array(); 416 while ( false !== ( $line = fgets( $fh ) ) ) { // phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition 417 $row = json_decode( $line, true ); 418 if ( ! is_array( $row ) || ! isset( $row['r'] ) || ! in_array( $row['t'] ?? '', array( 'f', 'd' ), true ) ) { 419 continue; // Links are not recreated, so a link here is removed like any other file. 420 } 421 $root = (string) $row['r']; 422 $rel = Set_Files::relative( $row ); 423 $top = null === $rel ? null : self::replaced_folder( $root, $rel ); 424 if ( null === $top ) { 425 continue; 426 } 427 $folders[ $root ][ $top ] = true; 428 for ( $p = $rel; strlen( $p ) > strlen( $top ) && ! isset( $have[ $root . '/' . $p ] ); $p = dirname( $p ) ) { 429 $have[ $root . '/' . $p ] = true; 430 } 431 } 432 fclose( $fh ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 433 ksort( $folders ); 434 foreach ( $folders as $root => $tops ) { 435 $base = null === $dirs ? self::dest_root( $root ) : ( $dirs[ $root ] ?? null ); 436 if ( null === $base ) { 437 continue; 438 } 439 $tops = array_keys( $tops ); 440 sort( $tops ); 441 foreach ( $tops as $top ) { 442 $live = untrailingslashit( wp_normalize_path( $base ) ) . '/' . $top; 443 if ( is_dir( $live ) && ! is_link( $live ) ) { 444 self::walk_extra( $root, $live, $top, $have, $limit, $out ); 445 } 446 } 447 } 448 return $out; 449 } 450 451 /** 452 * One folder's part of removed_in_folders(). 453 * 454 * @param string $root Root key. 455 * @param string $dir Live folder. 456 * @param string $rel Its path relative to the root. 457 * @param array $have What the backup has (root/rel => true). 458 * @param int $limit Most entries to list. 459 * @param array $out Result, added to. 460 */ 461 private static function walk_extra( $root, $dir, $rel, array $have, $limit, array &$out ) { 462 foreach ( self::list_dir( $dir ) as $name ) { 463 $path = $dir . '/' . $name; 464 $sub = $rel . '/' . $name; 465 $folder = is_dir( $path ) && ! is_link( $path ); 466 if ( isset( $have[ $root . '/' . $sub ] ) ) { 467 if ( $folder ) { 468 self::walk_extra( $root, $path, $sub, $have, $limit, $out ); 469 } 470 continue; 471 } 472 ++$out['count']; 473 if ( count( $out['list'] ) < $limit ) { 474 $out['list'][] = array( 475 'path' => ( 'content' === $root ? '' : $root . '/' ) . $sub . ( $folder ? '/' : '' ), 476 'part' => $root . '/' . self::unit( $root, $sub ), 477 ); 478 } 479 } 480 } 481 482 /** 351 483 * Performs the swap, journalling each rename first. Returns the journal path. 352 484 * -
accessnow-site-replica/trunk/includes/sets/class-set-files.php
r3726758 r3815997 309 309 310 310 /** 311 * Writes a stored file out to $dest, uncompressed. 311 * Writes a stored file out to $dest, uncompressed, checking it against the checksum the index 312 * recorded when the backup was made (rows without one, from older backups, are copied as they are). 312 313 * 313 314 * @param string $dir Set dir. 314 315 * @param array $row Index row. 315 316 * @param string $dest Destination path. 316 * @return bool 317 * @return bool False when it couldn't be read or written. 318 * @throws Damaged_File When the stored file no longer matches its checksum ($dest is removed). 317 319 */ 318 320 public static function copy_out( $dir, array $row, $dest ) { 319 321 list( $path, $z ) = self::source( $dir, $row ); 320 return @copy( ( $z ? 'compress.zlib://' : '' ) . $path, $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 322 $expect = strtolower( (string) ( $row['h'] ?? '' ) ); 323 $in = @fopen( ( $z ? 'compress.zlib://' : '' ) . $path, 'rb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 324 if ( ! $in ) { 325 return false; 326 } 327 $out = @fopen( $dest, 'wb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 328 if ( ! $out ) { 329 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 330 return false; 331 } 332 $ctx = hash_init( 'sha256' ); 333 $ok = true; 334 while ( ! feof( $in ) ) { 335 $buf = fread( $in, 1048576 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fread 336 if ( false === $buf ) { 337 $ok = false; // A compressed object that is cut off or corrupt fails here. 338 break; 339 } 340 hash_update( $ctx, $buf ); 341 if ( '' !== $buf && fwrite( $out, $buf ) !== strlen( $buf ) ) { // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fwrite 342 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 343 fclose( $out ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 344 @unlink( $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink 345 return false; // Disk full. 346 } 347 } 348 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 349 fclose( $out ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 350 $sha = hash_final( $ctx ); 351 if ( preg_match( '/^[0-9a-f]{64}$/', $expect ) && ( ! $ok || ! hash_equals( $expect, $sha ) ) ) { 352 @unlink( $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink 353 throw new Damaged_File( sprintf( '%s no longer matches the checksum recorded when the backup was made.', (string) self::relative( $row ) ) ); 354 } 355 if ( ! $ok ) { 356 @unlink( $dest ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.unlink_unlink 357 return false; 358 } 359 return true; 360 } 361 362 /** 363 * Whether a stored file still has the bytes the index recorded: true, false (missing, unreadable 364 * or changed), or null when the row has no checksum to compare with (very old backups). 365 * 366 * @param string $dir Set dir. 367 * @param array $row Index row. 368 * @return bool|null 369 */ 370 public static function intact( $dir, array $row ) { 371 $expect = strtolower( (string) ( $row['h'] ?? '' ) ); 372 if ( ! preg_match( '/^[0-9a-f]{64}$/', $expect ) ) { 373 return self::present( $dir, $row ) ? null : false; 374 } 375 try { 376 list( $path, $z ) = self::source( $dir, $row ); 377 } catch ( \RuntimeException $e ) { 378 return false; 379 } 380 $in = @fopen( ( $z ? 'compress.zlib://' : '' ) . $path, 'rb' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_operations_fopen 381 if ( ! $in ) { 382 return false; 383 } 384 $ctx = hash_init( 'sha256' ); 385 while ( ! feof( $in ) ) { 386 $buf = fread( $in, 1048576 ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fread 387 if ( false === $buf ) { 388 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 389 return false; 390 } 391 hash_update( $ctx, $buf ); 392 } 393 fclose( $in ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_fclose 394 return hash_equals( $expect, hash_final( $ctx ) ); 395 } 396 397 /** 398 * Whether a file on this site has exactly the bytes an index row recorded (rows without a checksum: no). 399 * 400 * @param string $file File. 401 * @param array $row Index row. 402 */ 403 public static function matches( $file, array $row ) { 404 $expect = strtolower( (string) ( $row['h'] ?? '' ) ); 405 if ( ! preg_match( '/^[0-9a-f]{64}$/', $expect ) ) { 406 return false; 407 } 408 $sha = @hash_file( 'sha256', $file ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 409 return is_string( $sha ) && hash_equals( $expect, $sha ); 321 410 } 322 411 -
accessnow-site-replica/trunk/includes/source/class-api.php
r3726810 r3815997 141 141 } catch ( \Throwable $e ) { 142 142 $message = $e instanceof Db_Exception ? 'Database error: ' . $e->getMessage() : $e->getMessage(); 143 Frame_Codec::add_json( $this->enc, 'X', array( 'error' => $message ) ); 143 $error = array( 'error' => $message ); 144 if ( $e instanceof Resend_Error ) { 145 $error['code'] = $e->error_code; // Not the sender's fault: it sends the same data again. 146 } 147 Frame_Codec::add_json( $this->enc, 'X', $error ); 144 148 Logger::audit( 'Operation failed.', array( 'op' => $op, 'error' => $message ) ); 145 149 $end = array( 'ok' => false ); -
accessnow-site-replica/trunk/languages/accessnow-site-replica.pot
r3736115 r3815997 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AccessNow Site Replica 1. 0.4\n"5 "Project-Id-Version: AccessNow Site Replica 1.1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/accessnow-site-replica\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-1 0-09T04:10:54+00:00\n"12 "POT-Creation-Date: 2026-11-21T16:13:50+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" … … 41 41 42 42 #: includes/admin/class-admin.php:63 43 #: includes/admin/class-admin.php:23 243 #: includes/admin/class-admin.php:236 44 44 msgid "Site Replica" 45 45 msgstr "" … … 50 50 51 51 #: includes/admin/class-admin.php:65 52 #: includes/admin/class-admin.php:24 353 #: includes/admin/class-admin.php:27 552 #: includes/admin/class-admin.php:247 53 #: includes/admin/class-admin.php:279 54 54 msgid "Pull & Clone" 55 55 msgstr "" 56 56 57 57 #: includes/admin/class-admin.php:66 58 #: includes/admin/class-admin.php:26 459 #: includes/admin/class-admin.php:35 458 #: includes/admin/class-admin.php:268 59 #: includes/admin/class-admin.php:358 60 60 msgid "Backups" 61 61 msgstr "" 62 62 63 63 #: includes/admin/class-admin.php:68 64 #: includes/admin/class-admin.php:25 465 #: includes/admin/class-admin.php: 48264 #: includes/admin/class-admin.php:258 65 #: includes/admin/class-admin.php:503 66 66 msgid "This Site as a Source" 67 67 msgstr "" 68 68 69 69 #: includes/admin/class-admin.php:69 70 #: includes/admin/class-admin.php:6 0870 #: includes/admin/class-admin.php:629 71 71 msgid "Logs" 72 72 msgstr "" 73 73 74 74 #: includes/admin/class-admin.php:70 75 #: includes/admin/class-admin.php:6 3775 #: includes/admin/class-admin.php:658 76 76 msgid "Settings" 77 77 msgstr "" … … 163 163 164 164 #: includes/admin/class-admin.php:116 165 #: includes/admin/class-admin.php: 396165 #: includes/admin/class-admin.php:400 166 166 msgid "Database" 167 167 msgstr "" 168 168 169 169 #: includes/admin/class-admin.php:117 170 #: includes/admin/class-admin.php: 397170 #: includes/admin/class-admin.php:401 171 171 msgid "Files" 172 172 msgstr "" … … 185 185 186 186 #: includes/admin/class-admin.php:121 187 msgid "Files in plugin, theme and must-use plugin folders that the backup also has, which only this site has. Each of those folders is replaced whole, the way an update replaces it, so these will be removed (Roll back returns them):" 188 msgstr "" 189 190 #. translators: %s: number of files not listed. 191 #: includes/admin/class-admin.php:123 192 #, php-format 193 msgid "…and %s more." 194 msgstr "" 195 196 #: includes/admin/class-admin.php:124 187 197 msgid "Media and must-use plugins that exist only on this site are kept." 188 198 msgstr "" 189 199 190 #: includes/admin/class-admin.php:12 2200 #: includes/admin/class-admin.php:125 191 201 msgid "Keep me logged in (carry my account over)" 192 202 msgstr "" 193 203 194 #: includes/admin/class-admin.php:12 3204 #: includes/admin/class-admin.php:126 195 205 msgid "Discourage search engines from indexing this copy" 196 206 msgstr "" 197 207 198 #: includes/admin/class-admin.php:12 4208 #: includes/admin/class-admin.php:127 199 209 msgid "Block all outgoing email from this copy" 200 210 msgstr "" 201 211 202 #: includes/admin/class-admin.php:12 5212 #: includes/admin/class-admin.php:128 203 213 msgid "Deactivate SSL-forcing plugins (this site uses http)" 204 214 msgstr "" 205 215 206 #: includes/admin/class-admin.php:12 6216 #: includes/admin/class-admin.php:129 207 217 msgid "Leave post GUIDs unchanged (recommended when moving a live site)" 208 218 msgstr "" 209 219 210 #: includes/admin/class-admin.php:1 27220 #: includes/admin/class-admin.php:130 211 221 msgid "Restore files (uploads, plugins, themes)" 212 222 msgstr "" 213 223 214 224 #. translators: %s: this site's host name. 215 #: includes/admin/class-admin.php:1 29225 #: includes/admin/class-admin.php:132 216 226 #, php-format 217 227 msgid "This replaces a live site. Type %s to confirm:" 218 228 msgstr "" 219 229 220 #: includes/admin/class-admin.php:13 0230 #: includes/admin/class-admin.php:133 221 231 msgid "Replace this site with the backup" 222 232 msgstr "" 223 233 224 #: includes/admin/class-admin.php:13 1234 #: includes/admin/class-admin.php:134 225 235 msgid "Keep the restored site" 226 236 msgstr "" 227 237 228 #: includes/admin/class-admin.php:13 2238 #: includes/admin/class-admin.php:135 229 239 msgid "Roll back" 230 240 msgstr "" 231 241 232 #: includes/admin/class-admin.php:13 3242 #: includes/admin/class-admin.php:136 233 243 msgid "Open the site in a new tab" 234 244 msgstr "" 235 245 236 #: includes/admin/class-admin.php:13 4246 #: includes/admin/class-admin.php:137 237 247 msgid "Keep the restored site and delete the previous version?" 238 248 msgstr "" 239 249 240 #: includes/admin/class-admin.php:13 5250 #: includes/admin/class-admin.php:138 241 251 msgid "Put the previous site back exactly as it was?" 242 252 msgstr "" 243 253 244 #: includes/admin/class-admin.php:13 6254 #: includes/admin/class-admin.php:139 245 255 msgid "rows" 246 256 msgstr "" 247 257 248 #: includes/admin/class-admin.php:1 37258 #: includes/admin/class-admin.php:140 249 259 msgid "tables" 250 260 msgstr "" 251 261 252 262 #. translators: %s: size, e.g. 12 MB. 253 #: includes/admin/class-admin.php:1 39263 #: includes/admin/class-admin.php:142 254 264 #, php-format 255 265 msgid "%s uploaded" … … 257 267 258 268 #. translators: %s: size, e.g. 12 MB. 259 #: includes/admin/class-admin.php:14 1269 #: includes/admin/class-admin.php:144 260 270 #, php-format 261 271 msgid "%s downloaded" … … 263 273 264 274 #. translators: 1: current step, 2: number of steps. 265 #: includes/admin/class-admin.php:14 3275 #: includes/admin/class-admin.php:146 266 276 #, php-format 267 277 msgid "step %1$s of %2$s" … … 269 279 270 280 #. translators: %s: number of files. 271 #: includes/admin/class-admin.php:14 5272 #: includes/admin/class-admin.php:1 47281 #: includes/admin/class-admin.php:148 282 #: includes/admin/class-admin.php:150 273 283 #, php-format 274 284 msgid "%s file" … … 278 288 279 289 #. translators: %s: number of rows. 280 #: includes/admin/class-admin.php:1 49281 #: includes/admin/class-admin.php:15 1290 #: includes/admin/class-admin.php:152 291 #: includes/admin/class-admin.php:154 282 292 #, php-format 283 293 msgid "%s row" … … 287 297 288 298 #. translators: %s: number of warnings. 289 #: includes/admin/class-admin.php:15 3290 #: includes/admin/class-admin.php:15 5299 #: includes/admin/class-admin.php:156 300 #: includes/admin/class-admin.php:158 291 301 #, php-format 292 302 msgid "%s warning" … … 296 306 297 307 #. translators: %s: number of unchanged files. 298 #: includes/admin/class-admin.php:1 57308 #: includes/admin/class-admin.php:160 299 309 #, php-format 300 310 msgid "%s unchanged" … … 302 312 303 313 #. translators: %s: seconds. 304 #: includes/admin/class-admin.php:1 59314 #: includes/admin/class-admin.php:162 305 315 #, php-format 306 316 msgid "retrying in %s s" 307 317 msgstr "" 308 318 309 #: includes/admin/class-admin.php:16 1310 #: includes/admin/class-admin.php:10 42319 #: includes/admin/class-admin.php:164 320 #: includes/admin/class-admin.php:1067 311 321 msgid "Starting" 312 322 msgstr "" 313 323 314 #: includes/admin/class-admin.php:16 2315 #: includes/admin/class-admin.php:10 43324 #: includes/admin/class-admin.php:165 325 #: includes/admin/class-admin.php:1068 316 326 msgid "Running" 317 327 msgstr "" 318 328 319 #: includes/admin/class-admin.php:16 3320 #: includes/admin/class-admin.php:10 44329 #: includes/admin/class-admin.php:166 330 #: includes/admin/class-admin.php:1069 321 331 msgid "Waiting to retry" 322 332 msgstr "" 323 333 324 #: includes/admin/class-admin.php:16 4325 #: includes/admin/class-admin.php:10 45334 #: includes/admin/class-admin.php:167 335 #: includes/admin/class-admin.php:1070 326 336 msgid "Paused" 327 337 msgstr "" 328 338 329 #: includes/admin/class-admin.php:16 5330 #: includes/admin/class-admin.php:10 46339 #: includes/admin/class-admin.php:168 340 #: includes/admin/class-admin.php:1071 331 341 msgid "Stopped with an error" 332 342 msgstr "" 333 343 334 #: includes/admin/class-admin.php:16 6335 #: includes/admin/class-admin.php:10 47344 #: includes/admin/class-admin.php:169 345 #: includes/admin/class-admin.php:1072 336 346 #: includes/admin/class-cloud-page.php:290 337 347 msgid "Cancelled" 338 348 msgstr "" 339 349 340 #: includes/admin/class-admin.php:1 67341 #: includes/admin/class-admin.php:10 48350 #: includes/admin/class-admin.php:170 351 #: includes/admin/class-admin.php:1073 342 352 msgid "Completed" 343 353 msgstr "" 344 354 345 #: includes/admin/class-admin.php:1 68355 #: includes/admin/class-admin.php:171 346 356 msgid "Waiting for you" 347 357 msgstr "" 348 358 349 #: includes/admin/class-admin.php:17 1350 #: includes/admin/class-admin.php: 680359 #: includes/admin/class-admin.php:174 360 #: includes/admin/class-admin.php:704 351 361 msgid "Pull backup" 352 362 msgstr "" 353 363 354 #: includes/admin/class-admin.php:17 2355 #: includes/admin/class-admin.php:31 3356 #: includes/admin/class-admin.php: 681364 #: includes/admin/class-admin.php:175 365 #: includes/admin/class-admin.php:317 366 #: includes/admin/class-admin.php:705 357 367 msgid "Clone into this site" 358 368 msgstr "" 359 369 360 #: includes/admin/class-admin.php:17 3361 #: includes/admin/class-admin.php: 682370 #: includes/admin/class-admin.php:176 371 #: includes/admin/class-admin.php:706 362 372 msgid "Restore" 363 373 msgstr "" 364 374 365 #: includes/admin/class-admin.php:174 366 #: includes/admin/class-admin.php:369 367 #: includes/admin/class-admin.php:683 375 #: includes/admin/class-admin.php:177 376 #: includes/admin/class-admin.php:707 377 msgid "Check backup" 378 msgstr "" 379 380 #: includes/admin/class-admin.php:178 381 #: includes/admin/class-admin.php:373 382 #: includes/admin/class-admin.php:708 368 383 msgid "Back up this site" 369 384 msgstr "" 370 385 371 #: includes/admin/class-admin.php:17 5372 #: includes/admin/class-admin.php: 684386 #: includes/admin/class-admin.php:179 387 #: includes/admin/class-admin.php:709 373 388 msgid "Cloud backup" 374 389 msgstr "" 375 390 376 #: includes/admin/class-admin.php:1 76377 #: includes/admin/class-admin.php: 685391 #: includes/admin/class-admin.php:180 392 #: includes/admin/class-admin.php:710 378 393 msgid "Database backup to the cloud" 379 394 msgstr "" 380 395 381 #: includes/admin/class-admin.php:1 77382 #: includes/admin/class-admin.php: 686396 #: includes/admin/class-admin.php:181 397 #: includes/admin/class-admin.php:711 383 398 msgid "Download from the cloud" 384 399 msgstr "" 385 400 386 #: includes/admin/class-admin.php:1 79401 #: includes/admin/class-admin.php:183 387 402 msgid "This backup runs on the server: you can close this page. You will find the result here and, if you chose so, by e-mail." 388 403 msgstr "" 389 404 390 #: includes/admin/class-admin.php: 199405 #: includes/admin/class-admin.php:203 391 406 msgid "The backup folder can be downloaded from the web on this server (it ignores the folder’s .htaccess protection). Ask your host to stop serving that folder, or set ACCESSNOW_REPLICA_STORAGE_DIR in wp-config.php to a folder the web server does not serve, before making backups here." 392 407 msgstr "" 393 408 394 #: includes/admin/class-admin.php:2 18409 #: includes/admin/class-admin.php:222 395 410 msgid "This copy is not sending email. A restore installed a guard so a copied site cannot email the original site’s people. Delete wp-content/mu-plugins/accessnow-replica-mail-guard.php to allow email again." 396 411 msgstr "" 397 412 398 #: includes/admin/class-admin.php:24 1413 #: includes/admin/class-admin.php:245 399 414 msgid "Back up a live site to this computer" 400 415 msgstr "" 401 416 402 #: includes/admin/class-admin.php:24 2417 #: includes/admin/class-admin.php:246 403 418 msgid "Pull a complete copy (database and wp-content) from another WordPress site running Site Replica. Nothing large is written on that server." 404 419 msgstr "" 405 420 406 #: includes/admin/class-admin.php:2 46421 #: includes/admin/class-admin.php:250 407 422 msgid "Let another site pull this one" 408 423 msgstr "" 409 424 410 #: includes/admin/class-admin.php:25 0411 #: includes/admin/class-admin.php:5 12425 #: includes/admin/class-admin.php:254 426 #: includes/admin/class-admin.php:533 412 427 msgid "Pulling is ON" 413 428 msgstr "" 414 429 415 #: includes/admin/class-admin.php:25 1416 #: includes/admin/class-admin.php:5 15430 #: includes/admin/class-admin.php:255 431 #: includes/admin/class-admin.php:536 417 432 msgid "Pulling is off" 418 433 msgstr "" 419 434 420 #: includes/admin/class-admin.php:2 57435 #: includes/admin/class-admin.php:261 421 436 msgid "Backups on this computer" 422 437 msgstr "" 423 438 424 439 #. translators: %d: number of backup sets. 425 #: includes/admin/class-admin.php:26 1440 #: includes/admin/class-admin.php:265 426 441 #, php-format 427 442 msgid "%d backup set" … … 430 445 msgstr[1] "" 431 446 432 #: includes/admin/class-admin.php:28 3447 #: includes/admin/class-admin.php:287 433 448 msgid "Saved connections can no longer be decrypted (the security keys in wp-config.php changed). Add the connections again." 434 449 msgstr "" 435 450 436 #: includes/admin/class-admin.php:2 86451 #: includes/admin/class-admin.php:290 437 452 msgid "Connected sites" 438 453 msgstr "" 439 454 440 #: includes/admin/class-admin.php:2 88455 #: includes/admin/class-admin.php:292 441 456 msgid "No sites yet. Add one below with a connection key." 442 457 msgstr "" 443 458 444 #: includes/admin/class-admin.php:29 2459 #: includes/admin/class-admin.php:296 445 460 msgid "Site" 446 461 msgstr "" 447 462 448 #: includes/admin/class-admin.php:29 3449 #: includes/admin/class-admin.php:7 35463 #: includes/admin/class-admin.php:297 464 #: includes/admin/class-admin.php:760 450 465 msgid "Details" 451 466 msgstr "" 452 467 453 #: includes/admin/class-admin.php:29 4468 #: includes/admin/class-admin.php:298 454 469 msgid "Last backup" 455 470 msgstr "" 456 471 457 #: includes/admin/class-admin.php:29 5472 #: includes/admin/class-admin.php:299 458 473 msgid "Key expires" 459 474 msgstr "" 460 475 461 #: includes/admin/class-admin.php:31 0462 #: includes/admin/class-admin.php:5 47463 #: includes/admin/class-admin.php: 590476 #: includes/admin/class-admin.php:314 477 #: includes/admin/class-admin.php:568 478 #: includes/admin/class-admin.php:611 464 479 #: includes/admin/class-cloud-page.php:359 465 480 msgid "Never" 466 481 msgstr "" 467 482 468 #: includes/admin/class-admin.php:31 2483 #: includes/admin/class-admin.php:316 469 484 msgid "Pull backup now" 470 485 msgstr "" 471 486 472 #: includes/admin/class-admin.php:31 3487 #: includes/admin/class-admin.php:317 473 488 msgid "Pull a fresh backup, then replace this site with it (you review the plan before anything changes)." 474 489 msgstr "" 475 490 476 #: includes/admin/class-admin.php:31 4491 #: includes/admin/class-admin.php:318 477 492 msgid "Remove this connection? Backups already made are kept." 478 493 msgstr "" 479 494 480 #: includes/admin/class-admin.php:3 18495 #: includes/admin/class-admin.php:322 481 496 msgid "Remove" 482 497 msgstr "" 483 498 484 #: includes/admin/class-admin.php:3 27499 #: includes/admin/class-admin.php:331 485 500 msgid "Add a site" 486 501 msgstr "" 487 502 488 #: includes/admin/class-admin.php:3 29503 #: includes/admin/class-admin.php:333 489 504 msgid "On the site you want to back up, install Site Replica and go to Site Replica → This Site as a Source." 490 505 msgstr "" 491 506 492 #: includes/admin/class-admin.php:33 0507 #: includes/admin/class-admin.php:334 493 508 msgid "Turn pulling on and generate a connection key." 494 509 msgstr "" 495 510 496 #: includes/admin/class-admin.php:33 1511 #: includes/admin/class-admin.php:335 497 512 msgid "Paste the key here." 498 513 msgstr "" 499 514 500 #: includes/admin/class-admin.php:3 36515 #: includes/admin/class-admin.php:340 501 516 msgid "Connection key" 502 517 msgstr "" 503 518 504 #: includes/admin/class-admin.php:3 38519 #: includes/admin/class-admin.php:342 505 520 msgid "Connect and check" 506 521 msgstr "" 507 522 508 523 #. translators: %s: storage path. 509 #: includes/admin/class-admin.php:34 3524 #: includes/admin/class-admin.php:347 510 525 #, php-format 511 526 msgid "Backups are stored in %s" … … 513 528 514 529 #. translators: %s: storage path. 515 #: includes/admin/class-admin.php:36 5530 #: includes/admin/class-admin.php:369 516 531 #, php-format 517 532 msgid "Stored in %s" 518 533 msgstr "" 519 534 520 #: includes/admin/class-admin.php:37 0535 #: includes/admin/class-admin.php:374 521 536 msgid "Makes a backup of this site, stored on this server. If something goes wrong later, restore it from the list below." 522 537 msgstr "" 523 538 524 #: includes/admin/class-admin.php:37 3539 #: includes/admin/class-admin.php:377 525 540 msgid "No backups yet." 526 541 msgstr "" 527 542 528 #: includes/admin/class-admin.php:3 88543 #: includes/admin/class-admin.php:392 529 544 msgid "Delete selected" 530 545 msgstr "" 531 546 532 #: includes/admin/class-admin.php:39 3547 #: includes/admin/class-admin.php:397 533 548 msgid "Select all backups" 534 549 msgstr "" 535 550 536 #: includes/admin/class-admin.php:39 4551 #: includes/admin/class-admin.php:398 537 552 #: includes/admin/class-cloud-page.php:433 538 553 msgid "Backup" 539 554 msgstr "" 540 555 541 #: includes/admin/class-admin.php:39 5556 #: includes/admin/class-admin.php:399 542 557 msgid "Source" 543 558 msgstr "" 544 559 545 #: includes/admin/class-admin.php: 398560 #: includes/admin/class-admin.php:402 546 561 #: includes/admin/class-cloud-page.php:435 547 562 msgid "Status" … … 549 564 550 565 #. translators: %s: backup date. 551 #: includes/admin/class-admin.php:41 4566 #: includes/admin/class-admin.php:418 552 567 #, php-format 553 568 msgid "Select backup of %s" … … 555 570 556 571 #. translators: 1: tables, 2: rows. 557 #: includes/admin/class-admin.php:42 3572 #: includes/admin/class-admin.php:427 558 573 #, php-format 559 574 msgid "%1$d tables, %2$s rows" … … 561 576 562 577 #. translators: 1: files, 2: size. 563 #: includes/admin/class-admin.php:43 3578 #: includes/admin/class-admin.php:437 564 579 #, php-format 565 580 msgid "%1$s files, %2$s" … … 567 582 568 583 #. translators: %s: count. 569 #: includes/admin/class-admin.php:4 36584 #: includes/admin/class-admin.php:440 570 585 #, php-format 571 586 msgid "%s unchanged (linked)" 572 587 msgstr "" 573 588 574 #: includes/admin/class-admin.php:44 5589 #: includes/admin/class-admin.php:449 575 590 #: includes/admin/class-cloud-page.php:450 576 591 msgid "Complete" 577 592 msgstr "" 578 593 594 #. translators: %s: date. 595 #: includes/admin/class-admin.php:455 596 #, php-format 597 msgid "Checked %s: intact" 598 msgstr "" 599 600 #. translators: %s: date. 601 #: includes/admin/class-admin.php:462 602 #, php-format 603 msgid "Damaged (checked %s)" 604 msgstr "" 605 579 606 #. translators: %d: warnings. 580 #: includes/admin/class-admin.php:4 50607 #: includes/admin/class-admin.php:470 581 608 #, php-format 582 609 msgid "%d warning" … … 585 612 msgstr[1] "" 586 613 587 #: includes/admin/class-admin.php:4 55614 #: includes/admin/class-admin.php:475 588 615 msgid "Incomplete" 589 616 msgstr "" 590 617 591 #: includes/admin/class-admin.php:4 60618 #: includes/admin/class-admin.php:480 592 619 msgid "Restore to this site" 593 620 msgstr "" 594 621 595 #: includes/admin/class-admin.php:462 622 #: includes/admin/class-admin.php:481 623 msgid "Read the whole backup back and compare every part with what was backed up, to find damage before you need it." 624 msgstr "" 625 626 #: includes/admin/class-admin.php:481 627 msgid "Check" 628 msgstr "" 629 630 #: includes/admin/class-admin.php:483 596 631 msgid "Delete this backup permanently?" 597 632 msgstr "" 598 633 599 #: includes/admin/class-admin.php:4 66600 #: includes/admin/class-admin.php:5 66634 #: includes/admin/class-admin.php:487 635 #: includes/admin/class-admin.php:587 601 636 #: includes/admin/class-cloud-page.php:463 602 637 msgid "Delete" 603 638 msgstr "" 604 639 605 #: includes/admin/class-admin.php: 491640 #: includes/admin/class-admin.php:512 606 641 msgid "Another site running Site Replica can pull a full copy of this one: the database and wp-content. The copy is streamed in small encrypted pieces, so nothing large is written on this server." 607 642 msgstr "" 608 643 609 #: includes/admin/class-admin.php: 493644 #: includes/admin/class-admin.php:514 610 645 msgid "This site is not using HTTPS, so pull requests will be refused. Enable SSL first." 611 646 msgstr "" 612 647 613 #: includes/admin/class-admin.php: 498648 #: includes/admin/class-admin.php:519 614 649 msgid "Your new connection key" 615 650 msgstr "" 616 651 617 #: includes/admin/class-admin.php: 499652 #: includes/admin/class-admin.php:520 618 653 msgid "Copy it now: it will not be shown again." 619 654 msgstr "" 620 655 621 #: includes/admin/class-admin.php: 499656 #: includes/admin/class-admin.php:520 622 657 msgid "Paste it into Site Replica → Pull & Clone on the computer that will make the backup. Anyone with this key can copy this whole site, so keep it private." 623 658 msgstr "" 624 659 625 #: includes/admin/class-admin.php:5 01660 #: includes/admin/class-admin.php:522 626 661 msgid "Copy key" 627 662 msgstr "" 628 663 629 #: includes/admin/class-admin.php:5 13664 #: includes/admin/class-admin.php:534 630 665 msgid "Turn off" 631 666 msgstr "" 632 667 633 #: includes/admin/class-admin.php:5 16668 #: includes/admin/class-admin.php:537 634 669 msgid "Turn on" 635 670 msgstr "" 636 671 637 #: includes/admin/class-admin.php:5 22672 #: includes/admin/class-admin.php:543 638 673 msgid "Connection keys" 639 674 msgstr "" 640 675 641 #: includes/admin/class-admin.php:5 26642 #: includes/admin/class-admin.php: 582676 #: includes/admin/class-admin.php:547 677 #: includes/admin/class-admin.php:603 643 678 msgid "Label" 644 679 msgstr "" 645 680 646 #: includes/admin/class-admin.php:5 27681 #: includes/admin/class-admin.php:548 647 682 msgid "Created" 648 683 msgstr "" 649 684 650 #: includes/admin/class-admin.php:5 28685 #: includes/admin/class-admin.php:549 651 686 msgid "Expires" 652 687 msgstr "" 653 688 654 #: includes/admin/class-admin.php:5 29689 #: includes/admin/class-admin.php:550 655 690 msgid "Allowed IPs" 656 691 msgstr "" 657 692 658 #: includes/admin/class-admin.php:5 30693 #: includes/admin/class-admin.php:551 659 694 msgid "Last used" 660 695 msgstr "" 661 696 662 #: includes/admin/class-admin.php:5 43697 #: includes/admin/class-admin.php:564 663 698 msgid "Revoked" 664 699 msgstr "" 665 700 666 #: includes/admin/class-admin.php:5 45701 #: includes/admin/class-admin.php:566 667 702 msgid "Expired" 668 703 msgstr "" 669 704 670 #: includes/admin/class-admin.php:5 51705 #: includes/admin/class-admin.php:572 671 706 msgid "Any" 672 707 msgstr "" 673 708 674 #: includes/admin/class-admin.php:5 59709 #: includes/admin/class-admin.php:580 675 710 msgid "Revoke" 676 711 msgstr "" 677 712 678 #: includes/admin/class-admin.php:5 75713 #: includes/admin/class-admin.php:596 679 714 msgid "No keys yet." 680 715 msgstr "" 681 716 682 #: includes/admin/class-admin.php:5 78717 #: includes/admin/class-admin.php:599 683 718 msgid "Generate a key" 684 719 msgstr "" 685 720 686 #: includes/admin/class-admin.php: 583721 #: includes/admin/class-admin.php:604 687 722 msgid "e.g. Staging site" 688 723 msgstr "" 689 724 690 #: includes/admin/class-admin.php: 584725 #: includes/admin/class-admin.php:605 691 726 msgid "Expires after" 692 727 msgstr "" 693 728 694 #: includes/admin/class-admin.php: 586729 #: includes/admin/class-admin.php:607 695 730 msgid "1 day" 696 731 msgstr "" 697 732 698 #: includes/admin/class-admin.php: 587733 #: includes/admin/class-admin.php:608 699 734 msgid "7 days" 700 735 msgstr "" 701 736 702 #: includes/admin/class-admin.php: 588737 #: includes/admin/class-admin.php:609 703 738 msgid "30 days" 704 739 msgstr "" 705 740 706 #: includes/admin/class-admin.php: 589741 #: includes/admin/class-admin.php:610 707 742 msgid "1 year" 708 743 msgstr "" 709 744 710 #: includes/admin/class-admin.php: 592745 #: includes/admin/class-admin.php:613 711 746 msgid "Only allow these IP addresses (optional)" 712 747 msgstr "" 713 748 714 #: includes/admin/class-admin.php: 594749 #: includes/admin/class-admin.php:615 715 750 msgid "Comma-separated. Leave empty to allow any address. Doesn’t work if the site is behind Cloudflare." 716 751 msgstr "" 717 752 718 #: includes/admin/class-admin.php: 595753 #: includes/admin/class-admin.php:616 719 754 msgid "Generate key" 720 755 msgstr "" 721 756 722 #: includes/admin/class-admin.php: 598757 #: includes/admin/class-admin.php:619 723 758 msgid "Recent pull activity" 724 759 msgstr "" 725 760 726 #: includes/admin/class-admin.php:6 09761 #: includes/admin/class-admin.php:630 727 762 msgid "Jobs" 728 763 msgstr "" 729 764 730 #: includes/admin/class-admin.php:6 12765 #: includes/admin/class-admin.php:633 731 766 msgid "No jobs yet." 732 767 msgstr "" 733 768 734 #: includes/admin/class-admin.php:6 22769 #: includes/admin/class-admin.php:643 735 770 msgid "Activity" 736 771 msgstr "" 737 772 738 #: includes/admin/class-admin.php:6 27773 #: includes/admin/class-admin.php:648 739 774 msgid "Pull requests from other sites" 740 775 msgstr "" 741 776 742 #: includes/admin/class-admin.php:6 44777 #: includes/admin/class-admin.php:665 743 778 msgid "Storage folder" 744 779 msgstr "" 745 780 746 #: includes/admin/class-admin.php:6 46781 #: includes/admin/class-admin.php:667 747 782 msgid "Set ACCESSNOW_REPLICA_STORAGE_DIR in wp-config.php to choose another folder." 748 783 msgstr "" 749 784 750 #: includes/admin/class-admin.php:6 47785 #: includes/admin/class-admin.php:668 751 786 msgid "Work in slices of (seconds)" 752 787 msgstr "" 753 788 754 #: includes/admin/class-admin.php:6 49789 #: includes/admin/class-admin.php:670 755 790 msgid "0 = automatic (below the host’s time limit)." 756 791 msgstr "" 757 792 758 #: includes/admin/class-admin.php:6 50793 #: includes/admin/class-admin.php:671 759 794 msgid "Source time per request (ms)" 760 795 msgstr "" 761 796 762 #: includes/admin/class-admin.php:6 52797 #: includes/admin/class-admin.php:673 763 798 msgid "Data per request (bytes)" 764 799 msgstr "" 765 800 766 #: includes/admin/class-admin.php:6 54801 #: includes/admin/class-admin.php:675 767 802 msgid "Backups to keep per site" 768 803 msgstr "" 769 804 770 #: includes/admin/class-admin.php:6 56805 #: includes/admin/class-admin.php:677 771 806 msgid "0 = keep all. Unchanged files are shared between backups, so extra backups use little space." 772 807 msgstr "" 773 808 774 #: includes/admin/class-admin.php:6 57809 #: includes/admin/class-admin.php:678 775 810 msgid "Also exclude (on this site as a source)" 776 811 msgstr "" 777 812 778 #: includes/admin/class-admin.php:659 779 msgid "One pattern per line, relative to wp-content. Caches, other backup plugins’ folders, .git and node_modules are always excluded." 780 msgstr "" 781 782 #: includes/admin/class-admin.php:660 813 #: includes/admin/class-admin.php:680 814 msgid "One pattern per line, relative to wp-content. Start a line with **/ to leave out a name wherever it is, for example **/*.log. Caches, other backup plugins’ folders, .git and node_modules are always excluded." 815 msgstr "" 816 817 #: includes/admin/class-admin.php:681 818 msgid "Developer files" 819 msgstr "" 820 821 #: includes/admin/class-admin.php:682 822 msgid "Leave developer files out of themes and plugins developed on this site" 823 msgstr "" 824 825 #: includes/admin/class-admin.php:683 826 msgid "For a theme or plugin that is a git working copy (it has a .git folder): its docs, tests, bin, scripts, composer and package files, notes (*.md, CLAUDE.md) and, when composer.json asks only for development packages, vendor. Themes and plugins installed from a ZIP are never touched. Files already sent to another site stay there until you remove them." 827 msgstr "" 828 829 #: includes/admin/class-admin.php:684 783 830 msgid "Transients" 784 831 msgstr "" 785 832 786 #: includes/admin/class-admin.php:6 61833 #: includes/admin/class-admin.php:685 787 834 msgid "Include cached transients in the database export (usually not needed)" 788 835 msgstr "" 789 836 790 #: includes/admin/class-admin.php:6 63837 #: includes/admin/class-admin.php:687 791 838 msgid "Save settings" 792 839 msgstr "" 793 840 794 #: includes/admin/class-admin.php:7 30841 #: includes/admin/class-admin.php:755 795 842 msgid "Pause" 796 843 msgstr "" 797 844 798 #: includes/admin/class-admin.php:7 31845 #: includes/admin/class-admin.php:756 799 846 msgid "Resume" 800 847 msgstr "" 801 848 802 #: includes/admin/class-admin.php:7 32849 #: includes/admin/class-admin.php:757 803 850 msgid "Cancel" 804 851 msgstr "" 805 852 806 #: includes/admin/class-admin.php:7 33853 #: includes/admin/class-admin.php:758 807 854 msgid "View backups" 808 855 msgstr "" 809 856 810 #: includes/admin/class-admin.php:7 36857 #: includes/admin/class-admin.php:761 811 858 msgid "Keep this page open while the job runs. If you close it, the job pauses and you can resume it here later." 812 859 msgstr "" 813 860 814 #: includes/admin/class-admin.php:7 49861 #: includes/admin/class-admin.php:774 815 862 msgid "Nothing logged yet." 816 863 msgstr "" 817 864 818 #: includes/admin/class-admin.php:8 18819 #: includes/admin/class-admin.php:8 31820 #: includes/admin/class-admin.php:8 57821 #: includes/admin/class-admin.php:8 69822 #: includes/admin/class-admin.php: 881823 #: includes/admin/class-admin.php:9 28824 #: includes/admin/class-admin.php:9 40825 #: includes/admin/class-admin.php:9 57826 #: includes/admin/class-admin.php: 990865 #: includes/admin/class-admin.php:843 866 #: includes/admin/class-admin.php:856 867 #: includes/admin/class-admin.php:882 868 #: includes/admin/class-admin.php:894 869 #: includes/admin/class-admin.php:906 870 #: includes/admin/class-admin.php:953 871 #: includes/admin/class-admin.php:965 872 #: includes/admin/class-admin.php:982 873 #: includes/admin/class-admin.php:1015 827 874 #: includes/admin/class-cloud-page.php:482 828 875 #: includes/admin/class-cloud-page.php:495 … … 838 885 msgstr "" 839 886 840 #: includes/admin/class-admin.php:8 23887 #: includes/admin/class-admin.php:848 841 888 msgid "Pulling is on. Generate a key for the computer that will make backups." 842 889 msgstr "" 843 890 844 #: includes/admin/class-admin.php:8 23891 #: includes/admin/class-admin.php:848 845 892 msgid "Pulling is off. Existing keys stop working until you turn it on again." 846 893 msgstr "" 847 894 848 895 #. translators: %s: address. 849 #: includes/admin/class-admin.php:8 41896 #: includes/admin/class-admin.php:866 850 897 #, php-format 851 898 msgid "\"%s\" is not a valid IP address or range." 852 899 msgstr "" 853 900 854 #: includes/admin/class-admin.php:8 49901 #: includes/admin/class-admin.php:874 855 902 msgid "Key created and pulling turned on." 856 903 msgstr "" 857 904 858 #: includes/admin/class-admin.php:8 61905 #: includes/admin/class-admin.php:886 859 906 msgid "Key revoked. It stops working immediately." 860 907 msgstr "" 861 908 862 #: includes/admin/class-admin.php:8 73909 #: includes/admin/class-admin.php:898 863 910 msgid "Key deleted." 864 911 msgstr "" 865 912 866 #: includes/admin/class-admin.php: 890913 #: includes/admin/class-admin.php:915 867 914 msgid "That key belongs to this site. Paste it into the site that will make the backup." 868 915 msgstr "" 869 916 870 917 #. translators: %s: site. 871 #: includes/admin/class-admin.php:9 17918 #: includes/admin/class-admin.php:942 872 919 #, php-format 873 920 msgid "New key saved for %s. You can pull a backup now." … … 875 922 876 923 #. translators: %s: site. 877 #: includes/admin/class-admin.php:9 19924 #: includes/admin/class-admin.php:944 878 925 #, php-format 879 926 msgid "Connected to %s. You can pull a backup now." 880 927 msgstr "" 881 928 882 #: includes/admin/class-admin.php:9 32929 #: includes/admin/class-admin.php:957 883 930 msgid "Connection removed." 884 931 msgstr "" 885 932 886 #: includes/admin/class-admin.php:9 46933 #: includes/admin/class-admin.php:971 887 934 msgid "That backup is still being made. Cancel the job first." 888 935 msgstr "" 889 936 890 #: includes/admin/class-admin.php:9 49937 #: includes/admin/class-admin.php:974 891 938 #: includes/admin/class-cloud-page.php:708 892 939 msgid "Backup deleted." 893 940 msgstr "" 894 941 895 #: includes/admin/class-admin.php:9 63942 #: includes/admin/class-admin.php:988 896 943 msgid "No backups were selected." 897 944 msgstr "" 898 945 899 946 #. translators: %d: number of backups. 900 #: includes/admin/class-admin.php: 978947 #: includes/admin/class-admin.php:1003 901 948 #, php-format 902 949 msgid "%d backup deleted." … … 905 952 msgstr[1] "" 906 953 907 #: includes/admin/class-admin.php: 980954 #: includes/admin/class-admin.php:1005 908 955 msgid "One backup was kept because a job is using it." 909 956 msgstr "" 910 957 911 #: includes/admin/class-admin.php: 994958 #: includes/admin/class-admin.php:1019 912 959 msgid "Settings saved." 913 960 msgstr "" 914 961 915 962 #. translators: %s: time difference. 916 #: includes/admin/class-admin.php:10 08963 #: includes/admin/class-admin.php:1033 917 964 #, php-format 918 965 msgid "%s ago" 919 966 msgstr "" 920 967 921 #: includes/admin/class-admin.php:10 26968 #: includes/admin/class-admin.php:1051 922 969 msgid "(not created yet: a private folder in wp-content, made when the first backup starts)" 923 970 msgstr "" 924 971 925 #: includes/admin/class-admin.php:10 31972 #: includes/admin/class-admin.php:1056 926 973 msgid "(unavailable)" 927 974 msgstr "" … … 1369 1416 1370 1417 #: includes/admin/class-cloud-page.php:700 1371 #: includes/jobs/class-ajax-driver.php:11 11418 #: includes/jobs/class-ajax-driver.php:119 1372 1419 msgid "Unknown backup." 1373 1420 msgstr "" … … 1500 1547 1501 1548 #: includes/client/class-remote-site.php:297 1502 #: includes/client/class-remote-site.php:42 11549 #: includes/client/class-remote-site.php:426 1503 1550 msgid "The clocks on the two servers differ too much." 1504 1551 msgstr "" … … 1533 1580 1534 1581 #. translators: %s: error. 1535 #: includes/client/class-remote-site.php:394 1582 #: includes/client/class-remote-site.php:397 1583 #, php-format 1584 msgid "Part of the backup arrived damaged on the other site and will be sent again: %s" 1585 msgstr "" 1586 1587 #. translators: %s: error. 1588 #: includes/client/class-remote-site.php:399 1536 1589 #, php-format 1537 1590 msgid "The source site reported an error: %s" 1538 1591 msgstr "" 1539 1592 1540 #: includes/client/class-remote-site.php:4 051593 #: includes/client/class-remote-site.php:410 1541 1594 msgid "The source server stopped part-way through an answer (host limits). Retrying with smaller pieces." 1542 1595 msgstr "" 1543 1596 1544 1597 #. translators: %s: URL. 1545 #: includes/client/class-remote-site.php:41 01598 #: includes/client/class-remote-site.php:415 1546 1599 #, php-format 1547 1600 msgid "The source site redirects to %s. Generate a new connection key on that address." 1548 1601 msgstr "" 1549 1602 1550 #: includes/client/class-remote-site.php:42 31603 #: includes/client/class-remote-site.php:428 1551 1604 msgid "The source site did not accept the connection key. It may have been revoked or have expired: generate a new key on the source." 1552 1605 msgstr "" 1553 1606 1554 #: includes/client/class-remote-site.php:4 251607 #: includes/client/class-remote-site.php:430 1555 1608 msgid "The source site has temporarily blocked this computer after failed attempts. Wait 30 minutes." 1556 1609 msgstr "" 1557 1610 1558 #: includes/client/class-remote-site.php:4 271611 #: includes/client/class-remote-site.php:432 1559 1612 msgid "The request was too large for the source site." 1560 1613 msgstr "" 1561 1614 1562 #: includes/client/class-remote-site.php:4 291615 #: includes/client/class-remote-site.php:434 1563 1616 msgid "The source site is busy with another request for this key." 1564 1617 msgstr "" 1565 1618 1566 #: includes/client/class-remote-site.php:43 11619 #: includes/client/class-remote-site.php:436 1567 1620 msgid "The source site only accepts HTTPS. Use its https:// address." 1568 1621 msgstr "" 1569 1622 1570 #: includes/client/class-remote-site.php:43 31623 #: includes/client/class-remote-site.php:438 1571 1624 msgid "The two sites run different Site Replica versions. Update the plugin on both." 1572 1625 msgstr "" 1573 1626 1574 #: includes/client/class-remote-site.php:4 351627 #: includes/client/class-remote-site.php:440 1575 1628 msgid "Pulling is turned off on the source site (Site Replica → This site as a source)." 1576 1629 msgstr "" 1577 1630 1578 #: includes/client/class-remote-site.php:44 21631 #: includes/client/class-remote-site.php:447 1579 1632 msgid "The source host’s resource limit was reached (HTTP 508). Using fewer connections and waiting." 1580 1633 msgstr "" 1581 1634 1582 1635 #. translators: %d: HTTP status. 1583 #: includes/client/class-remote-site.php:4 451636 #: includes/client/class-remote-site.php:450 1584 1637 #, php-format 1585 1638 msgid "The source server returned HTTP %d (overloaded or timed out). Retrying with smaller pieces." 1586 1639 msgstr "" 1587 1640 1588 #: includes/client/class-remote-site.php:4 481641 #: includes/client/class-remote-site.php:453 1589 1642 msgid "The source host is rate-limiting requests. Waiting before retrying." 1590 1643 msgstr "" 1591 1644 1592 1645 #. translators: 1: firewall name, 2: IP hint. 1593 #: includes/client/class-remote-site.php:4 561646 #: includes/client/class-remote-site.php:461 1594 1647 #, php-format 1595 1648 msgid "The request was blocked by %1$s on the source server. Ask the host (or the firewall settings) to allow requests to this site from your IP address, or allowlist \"accessnow_replica_api\"." 1596 1649 msgstr "" 1597 1650 1598 #: includes/client/class-remote-site.php:46 01651 #: includes/client/class-remote-site.php:465 1599 1652 msgid "Site Replica is not active on the source site, or pulling is turned off there." 1600 1653 msgstr "" 1601 1654 1602 1655 #. translators: %d: HTTP status. 1603 #: includes/client/class-remote-site.php:46 31656 #: includes/client/class-remote-site.php:468 1604 1657 #, php-format 1605 1658 msgid "The source returned a web page instead of data (HTTP %d). A security plugin, cache or firewall may be intercepting the request." … … 1607 1660 1608 1661 #. translators: %d: HTTP status. 1609 #: includes/client/class-remote-site.php:4 651662 #: includes/client/class-remote-site.php:470 1610 1663 #, php-format 1611 1664 msgid "Unexpected answer from the source site (HTTP %d)." 1612 1665 msgstr "" 1613 1666 1614 #: includes/client/class-remote-site.php:5 091667 #: includes/client/class-remote-site.php:514 1615 1668 msgid "a firewall" 1616 1669 msgstr "" … … 1746 1799 1747 1800 #: includes/jobs/class-ajax-driver.php:97 1801 #: includes/jobs/class-ajax-driver.php:105 1802 #: includes/jobs/steps/class-check.php:51 1748 1803 msgid "That backup is missing or incomplete." 1749 1804 msgstr "" 1750 1805 1751 #: includes/jobs/class-ajax-driver.php:1 031806 #: includes/jobs/class-ajax-driver.php:111 1752 1807 msgid "Set up where backups go first." 1753 1808 msgstr "" 1754 1809 1755 #: includes/jobs/class-ajax-driver.php:1 261810 #: includes/jobs/class-ajax-driver.php:134 1756 1811 msgid "Unknown job type." 1757 1812 msgstr "" 1758 1813 1759 #: includes/jobs/class-ajax-driver.php:1 421814 #: includes/jobs/class-ajax-driver.php:150 1760 1815 msgid "This job link has expired. Reload the page." 1761 1816 msgstr "" 1762 1817 1763 #: includes/jobs/class-ajax-driver.php: 2961818 #: includes/jobs/class-ajax-driver.php:304 1764 1819 msgid "The site has already been switched. Choose Keep or Roll back instead." 1765 1820 msgstr "" 1766 1821 1767 1822 #. translators: %s: host. 1768 #: includes/jobs/class-ajax-driver.php:3 171823 #: includes/jobs/class-ajax-driver.php:325 1769 1824 #, php-format 1770 1825 msgid "Type %s to confirm that this site will be replaced." … … 1809 1864 msgstr "" 1810 1865 1811 #: includes/jobs/class-job-store.php:7 41866 #: includes/jobs/class-job-store.php:75 1812 1867 msgid "Starting…" 1813 1868 msgstr "" 1869 1870 #: includes/jobs/steps/class-check.php:66 1871 msgid "Checking the database…" 1872 msgstr "" 1873 1874 #. translators: %s: file. 1875 #: includes/jobs/steps/class-check.php:71 1876 #: includes/jobs/steps/class-pull.php:1716 1877 #, php-format 1878 msgid "Database chunk %s is missing or damaged." 1879 msgstr "" 1880 1881 #: includes/jobs/steps/class-check.php:83 1882 msgid "Checking large database values…" 1883 msgstr "" 1884 1885 #. translators: %s: file. 1886 #: includes/jobs/steps/class-check.php:88 1887 #: includes/jobs/steps/class-pull.php:1727 1888 #, php-format 1889 msgid "Large value %s is missing or damaged." 1890 msgstr "" 1891 1892 #. translators: 1: files checked, 2: files in the backup. 1893 #: includes/jobs/steps/class-check.php:102 1894 #, php-format 1895 msgid "Checking files: %1$s of %2$s…" 1896 msgstr "" 1897 1898 #. translators: %s: file. 1899 #: includes/jobs/steps/class-check.php:114 1900 #, php-format 1901 msgid "File %s is missing or damaged in the backup." 1902 msgstr "" 1903 1904 #. translators: %d: problems. 1905 #: includes/jobs/steps/class-check.php:149 1906 #, php-format 1907 msgid "This backup is damaged: %d part no longer matches what was backed up (see the job log). Don't restore it; make a new backup." 1908 msgid_plural "This backup is damaged: %d parts no longer match what was backed up (see the job log). Don't restore it; make a new backup." 1909 msgstr[0] "" 1910 msgstr[1] "" 1814 1911 1815 1912 #. translators: 1: part number, 2: uploaded size, 3: destination. … … 1910 2007 #. translators: %s: folder. 1911 2008 #: includes/jobs/steps/class-pull.php:264 1912 #: includes/sets/class-set-files.php: 4292009 #: includes/sets/class-set-files.php:518 1913 2010 #, php-format 1914 2011 msgid "Could not create folder %s." … … 1919 2016 #: includes/jobs/steps/class-pull.php:864 1920 2017 #: includes/sets/class-set-files.php:243 1921 #: includes/sets/class-set-files.php: 4172018 #: includes/sets/class-set-files.php:506 1922 2019 msgid "Could not write to the backup folder. Is the disk full?" 1923 2020 msgstr "" … … 2064 2161 msgstr "" 2065 2162 2066 #. translators: %s: file.2067 #: includes/jobs/steps/class-pull.php:17162068 #, php-format2069 msgid "Database chunk %s is missing or damaged."2070 msgstr ""2071 2072 2163 #: includes/jobs/steps/class-pull.php:1720 2073 2164 msgid "Verifying database chunks…" … … 2075 2166 2076 2167 #. translators: %s: file. 2077 #: includes/jobs/steps/class-pull.php:17272078 #, php-format2079 msgid "Large value %s is missing or damaged."2080 msgstr ""2081 2082 #. translators: %s: file.2083 2168 #: includes/jobs/steps/class-pull.php:1750 2084 2169 #, php-format … … 2150 2235 msgstr "" 2151 2236 2152 #: includes/jobs/steps/class-restore.php:33 62237 #: includes/jobs/steps/class-restore.php:339 2153 2238 msgid "Waiting for you to review and confirm the restore." 2154 2239 msgstr "" 2155 2240 2156 2241 #. translators: %s: table. 2157 #: includes/jobs/steps/class-restore.php:36 52242 #: includes/jobs/steps/class-restore.php:368 2158 2243 #, php-format 2159 2244 msgid "Creating table %s…" … … 2161 2246 2162 2247 #. translators: 1: table, 2: chunk, 3: chunks. 2163 #: includes/jobs/steps/class-restore.php:4 172248 #: includes/jobs/steps/class-restore.php:420 2164 2249 #, php-format 2165 2250 msgid "Importing %1$s (part %2$d of %3$d)…" … … 2167 2252 2168 2253 #. translators: %s: file. 2169 #: includes/jobs/steps/class-restore.php:42 22254 #: includes/jobs/steps/class-restore.php:425 2170 2255 #, php-format 2171 2256 msgid "Backup file %s is missing or damaged." … … 2173 2258 2174 2259 #. translators: 1: size, 2: table. 2175 #: includes/jobs/steps/class-restore.php:49 52260 #: includes/jobs/steps/class-restore.php:498 2176 2261 #, php-format 2177 2262 msgid "Writing a large value (%1$s) into %2$s…" 2178 2263 msgstr "" 2179 2264 2180 #: includes/jobs/steps/class-restore.php:5 482265 #: includes/jobs/steps/class-restore.php:551 2181 2266 msgid "Adjusting the restored data for this site…" 2182 2267 msgstr "" 2183 2268 2184 #: includes/jobs/steps/class-restore.php: 6792269 #: includes/jobs/steps/class-restore.php:722 2185 2270 msgid "Your login could not be carried over (the job was not started by a logged-in user). Log in with an account from the backup." 2186 2271 msgstr "" 2187 2272 2188 2273 #. translators: %s: login. 2189 #: includes/jobs/steps/class-restore.php: 6902274 #: includes/jobs/steps/class-restore.php:733 2190 2275 #, php-format 2191 2276 msgid "The user \"%s\" exists in the backup but is not an administrator there, so your login was not carried over. Log in with the backup’s credentials." 2192 2277 msgstr "" 2193 2278 2194 #: includes/jobs/steps/class-restore.php:7 372279 #: includes/jobs/steps/class-restore.php:780 2195 2280 msgid "The imported data does not match the backup, so nothing was changed on this site: " 2196 2281 msgstr "" 2197 2282 2198 2283 #. translators: 1: done, 2: total. 2199 #: includes/jobs/steps/class-restore.php: 7772284 #: includes/jobs/steps/class-restore.php:820 2200 2285 #, php-format 2201 2286 msgid "Preparing files: %1$s of %2$s…" … … 2203 2288 2204 2289 #. translators: 1: number of files, 2: examples. 2205 #: includes/jobs/steps/class-restore.php:8 052290 #: includes/jobs/steps/class-restore.php:848 2206 2291 #, php-format 2207 2292 msgid "%1$s files were not restored: this computer's disk ignores upper/lower case, and each has a partner whose name differs only in case (for example %2$s). Pages that use them show the partner image instead. A restore to a Linux server keeps them all." 2208 2293 msgstr "" 2209 2294 2210 #: includes/jobs/steps/class-restore.php:8 282295 #: includes/jobs/steps/class-restore.php:871 2211 2296 msgid "Switching to the restored site…" 2212 2297 msgstr "" 2213 2298 2214 2299 #. translators: %s: view. 2215 #: includes/jobs/steps/class-restore.php:9 152300 #: includes/jobs/steps/class-restore.php:958 2216 2301 #, php-format 2217 2302 msgid "View %s was not recreated: it does not belong to this site." … … 2219 2304 2220 2305 #. translators: 1: view, 2: error. 2221 #: includes/jobs/steps/class-restore.php:9 222306 #: includes/jobs/steps/class-restore.php:965 2222 2307 #, php-format 2223 2308 msgid "View %1$s could not be recreated: %2$s" … … 2225 2310 2226 2311 #. translators: %s: trigger. 2227 #: includes/jobs/steps/class-restore.php:9 302312 #: includes/jobs/steps/class-restore.php:973 2228 2313 #, php-format 2229 2314 msgid "Trigger %s was not recreated: it does not belong to a restored table." … … 2231 2316 2232 2317 #. translators: 1: trigger, 2: error. 2233 #: includes/jobs/steps/class-restore.php:9 402318 #: includes/jobs/steps/class-restore.php:983 2234 2319 #, php-format 2235 2320 msgid "Trigger %1$s could not be recreated: %2$s" … … 2237 2322 2238 2323 #. translators: %s: number of values. 2239 #: includes/jobs/steps/class-restore.php: 9652324 #: includes/jobs/steps/class-restore.php:1008 2240 2325 #, php-format 2241 2326 msgid "%s values could not be searched for addresses (too large for PHP's pattern matcher) and were left unchanged." 2242 2327 msgstr "" 2243 2328 2244 #: includes/jobs/steps/class-restore.php: 9722329 #: includes/jobs/steps/class-restore.php:1015 2245 2330 msgid "Check the restored site. Keep it to delete the previous version, or roll back to put the previous site back exactly." 2246 2331 msgstr "" 2247 2332 2248 #: includes/jobs/steps/class-restore.php: 9932333 #: includes/jobs/steps/class-restore.php:1036 2249 2334 msgid "Rolling back…" 2250 2335 msgstr "" 2251 2336 2252 #: includes/jobs/steps/class-restore.php: 9982337 #: includes/jobs/steps/class-restore.php:1041 2253 2338 msgid "Restored. Keep this version or roll back?" 2254 2339 msgstr "" 2255 2340 2256 #: includes/jobs/steps/class-restore.php:10 512341 #: includes/jobs/steps/class-restore.php:1094 2257 2342 msgid "Cleaning up…" 2258 2343 msgstr "" -
accessnow-site-replica/trunk/readme.txt
r3736115 r3815997 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 1.07 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 130 130 == Changelog == 131 131 132 = 1.2.0 = 133 * A restore replaces each plugin, theme and must-use plugin folder the backup has whole, the way an update does: a file this site has inside one of them that the backup doesn't (left over from a copy made by hand, say) is removed, and the restore plan lists each one before you confirm. Roll back returns them. Media and must-use plugins that exist only on this site are still kept. 134 * A new Developer files setting leaves notes, scripts, tests and tooling (docs, tests, bin, .github, *.md, CLAUDE.md, composer and package files) out of themes and plugins that are git working copies, so they are not copied to another site, where they would be readable. And an exclusion line starting with **/ now leaves a name out at any depth. 135 * Check a backup: a new Check button on the Backups page reads the whole backup back and compares every part with the fingerprint recorded when it was made, so a backup damaged in storage is found before you need it. The list shows when each backup was last checked. 136 * A restore compares every file with the backup's fingerprint as it goes and stops, with nothing on the site changed, if one is damaged. A file the site already has is reused only if it really is the same: scripts and files up to 1 MB are compared by content, so a file edited without changing its date is put back from the backup. 137 * A restore keeps this site's licence records for plugins sold through Freemius, the way it keeps Site Replica's own settings, so after sending a staging copy live those plugins stay activated instead of asking whether the site is a copy. A brand-new site with no such records keeps the backup's. 138 132 139 = 1.1.0 = 133 140 * A must-use plugin named local-only-* is never copied, like the local Mailpit helper: a convention for helpers that belong to one local copy (a theme preview switch, a test login), so they can't reach a live site.
Note:
See TracChangeset
for help on using the changeset viewer.