Changeset 3664708
- Timestamp:
- 08/25/2026 06:32:45 AM (3 months ago)
- Location:
- ai-siteark
- Files:
-
- 8 edited
- 1 copied
-
tags/2.9.5 (copied) (copied from ai-siteark/trunk )
-
tags/2.9.5/ai-siteark.php (modified) (2 diffs)
-
tags/2.9.5/includes/helpers/class-local-store.php (modified) (3 diffs)
-
tags/2.9.5/includes/jobs/class-backup-runner.php (modified) (1 diff)
-
tags/2.9.5/readme.txt (modified) (2 diffs)
-
trunk/ai-siteark.php (modified) (2 diffs)
-
trunk/includes/helpers/class-local-store.php (modified) (3 diffs)
-
trunk/includes/jobs/class-backup-runner.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ai-siteark/tags/2.9.5/ai-siteark.php
r3657880 r3664708 4 4 * Plugin URI: https://wp.aiappstore.in/ai-siteark/ 5 5 * Description: Full WordPress site backup, restore and migration — back up your entire database and files to local storage or the cloud (Google Drive, OneDrive, Dropbox, Amazon S3, FTP/SFTP), and restore or migrate to any site. 6 * Version: 2.9. 46 * Version: 2.9.5 7 7 * Author: AtoZ INFOWAY INC 8 8 * Author URI: https://atozinfoway.com … … 27 27 * Constants 28 28 * ---------------------------------------------------------------------- */ 29 define( 'AISITEARK_VERSION', '2.9. 4' );29 define( 'AISITEARK_VERSION', '2.9.5' ); 30 30 define( 'AISITEARK_DB_VERSION', '1.0.0' ); 31 31 define( 'AISITEARK_FILE', __FILE__ ); -
ai-siteark/tags/2.9.5/includes/helpers/class-local-store.php
r3657840 r3664708 352 352 353 353 /** 354 * Sub-folder that holds the actual backup archives, kept tidy and separate from recovery 355 * points and work files. Lives under the (web-blocked) store dir, so it inherits the same 356 * .htaccess protection. New backups are written here; archives created before this existed 357 * remain in the store root and are still found (see list_files() / path_for()). 358 * 359 * @return string|\WP_Error 360 */ 361 public static function backup_dir() { 362 $dir = self::dir(); 363 if ( is_wp_error( $dir ) ) { 364 return $dir; 365 } 366 $bdir = trailingslashit( $dir ) . 'backup'; 367 if ( ! is_dir( $bdir ) ) { 368 wp_mkdir_p( $bdir ); 369 } 370 return $bdir; 371 } 372 373 /** 354 374 * The site's host as a filename/folder-safe slug (lowercase, no "www.", only a-z0-9-), 355 375 * e.g. "example.com" -> "example-com". Empty string if it can't be determined. … … 396 416 return array(); 397 417 } 398 $out = array(); 399 // Only base volumes end in ".aisv"; continuation parts (".aisv.2") don't match. 400 foreach ( (array) glob( trailingslashit( $dir ) . '*.aisv' ) as $path ) { 401 if ( ! is_file( $path ) ) { 402 continue; 403 } 404 $vols = self::volumes_for( $path ); 405 $size = 0; 406 foreach ( $vols as $v ) { 407 $size += (int) filesize( $v ); 408 } 409 $out[] = array( 410 'file' => basename( $path ), 411 'path' => $path, 412 'size' => $size, 413 'mtime' => (int) filemtime( $path ), 414 'volumes' => count( $vols ), 415 ); 418 $out = array(); 419 $seen = array(); 420 // New backups live in the backup/ sub-folder; archives from before it existed are in the 421 // store root. Scan both (backup/ first so it wins on a duplicate name). Only base volumes 422 // end in ".aisv"; continuation parts (".aisv.2") don't match. 423 $globs = array(); 424 $bdir = self::backup_dir(); 425 if ( ! is_wp_error( $bdir ) ) { 426 $globs[] = trailingslashit( $bdir ) . '*.aisv'; 427 } 428 $globs[] = trailingslashit( $dir ) . '*.aisv'; 429 foreach ( $globs as $glob ) { 430 foreach ( (array) glob( $glob ) as $path ) { 431 if ( ! is_file( $path ) ) { 432 continue; 433 } 434 $base = basename( $path ); 435 if ( isset( $seen[ $base ] ) ) { 436 continue; 437 } 438 $seen[ $base ] = true; 439 $vols = self::volumes_for( $path ); 440 $size = 0; 441 foreach ( $vols as $v ) { 442 $size += (int) filesize( $v ); 443 } 444 $out[] = array( 445 'file' => $base, 446 'path' => $path, 447 'size' => $size, 448 'mtime' => (int) filemtime( $path ), 449 'volumes' => count( $vols ), 450 ); 451 } 416 452 } 417 453 usort( $out, static function ( $a, $b ) { return $b['mtime'] <=> $a['mtime']; } ); … … 433 469 if ( is_wp_error( $dir ) ) { 434 470 return false; 471 } 472 // Prefer the backup/ sub-folder (new location); fall back to the store root (archives 473 // created before backup/ existed, and imported uploaded-/cloud- archives). 474 $bdir = self::backup_dir(); 475 if ( ! is_wp_error( $bdir ) ) { 476 $bpath = trailingslashit( $bdir ) . $file; 477 if ( is_file( $bpath ) ) { 478 return $bpath; 479 } 435 480 } 436 481 $path = trailingslashit( $dir ) . $file; -
ai-siteark/tags/2.9.5/includes/jobs/class-backup-runner.php
r3657840 r3664708 90 90 $gw = new Job_Gateway(); 91 91 $id = $gw->insert( 'backup', array( 'phase' => 'prepare' ) ); 92 $archive = trailingslashit( $store ) . Local_Store::filename(); 92 // New backups go into the backup/ sub-folder (falls back to the store root on error). 93 $bstore = Local_Store::backup_dir(); 94 $dest = is_wp_error( $bstore ) ? $store : $bstore; 95 $archive = trailingslashit( $dest ) . Local_Store::filename(); 93 96 $work = Local_Store::work_dir( $id ); 94 97 if ( is_wp_error( $work ) ) { -
ai-siteark/tags/2.9.5/readme.txt
r3657880 r3664708 3 3 Tags: backup, restore, migration, clone, database 4 4 Requires at least: 6.0 5 Tested up to: 7. 05 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.9. 47 Stable tag: 2.9.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 2.9. 4=78 = 2.9.5 = 79 79 AI-SiteArk backs up, restores and migrates your entire WordPress site — the full database and your files — into a single portable, integrity-checked .aisv archive, with optional AES-256 password encryption and authenticated (tamper-evident) backups. Restore in place, or migrate to a new domain or host with automatic, serialization-safe URL/path rewriting. Backups run as memory-safe, resumable background jobs, so they work on large sites and modest hosting. 80 80 -
ai-siteark/trunk/ai-siteark.php
r3657880 r3664708 4 4 * Plugin URI: https://wp.aiappstore.in/ai-siteark/ 5 5 * Description: Full WordPress site backup, restore and migration — back up your entire database and files to local storage or the cloud (Google Drive, OneDrive, Dropbox, Amazon S3, FTP/SFTP), and restore or migrate to any site. 6 * Version: 2.9. 46 * Version: 2.9.5 7 7 * Author: AtoZ INFOWAY INC 8 8 * Author URI: https://atozinfoway.com … … 27 27 * Constants 28 28 * ---------------------------------------------------------------------- */ 29 define( 'AISITEARK_VERSION', '2.9. 4' );29 define( 'AISITEARK_VERSION', '2.9.5' ); 30 30 define( 'AISITEARK_DB_VERSION', '1.0.0' ); 31 31 define( 'AISITEARK_FILE', __FILE__ ); -
ai-siteark/trunk/includes/helpers/class-local-store.php
r3657840 r3664708 352 352 353 353 /** 354 * Sub-folder that holds the actual backup archives, kept tidy and separate from recovery 355 * points and work files. Lives under the (web-blocked) store dir, so it inherits the same 356 * .htaccess protection. New backups are written here; archives created before this existed 357 * remain in the store root and are still found (see list_files() / path_for()). 358 * 359 * @return string|\WP_Error 360 */ 361 public static function backup_dir() { 362 $dir = self::dir(); 363 if ( is_wp_error( $dir ) ) { 364 return $dir; 365 } 366 $bdir = trailingslashit( $dir ) . 'backup'; 367 if ( ! is_dir( $bdir ) ) { 368 wp_mkdir_p( $bdir ); 369 } 370 return $bdir; 371 } 372 373 /** 354 374 * The site's host as a filename/folder-safe slug (lowercase, no "www.", only a-z0-9-), 355 375 * e.g. "example.com" -> "example-com". Empty string if it can't be determined. … … 396 416 return array(); 397 417 } 398 $out = array(); 399 // Only base volumes end in ".aisv"; continuation parts (".aisv.2") don't match. 400 foreach ( (array) glob( trailingslashit( $dir ) . '*.aisv' ) as $path ) { 401 if ( ! is_file( $path ) ) { 402 continue; 403 } 404 $vols = self::volumes_for( $path ); 405 $size = 0; 406 foreach ( $vols as $v ) { 407 $size += (int) filesize( $v ); 408 } 409 $out[] = array( 410 'file' => basename( $path ), 411 'path' => $path, 412 'size' => $size, 413 'mtime' => (int) filemtime( $path ), 414 'volumes' => count( $vols ), 415 ); 418 $out = array(); 419 $seen = array(); 420 // New backups live in the backup/ sub-folder; archives from before it existed are in the 421 // store root. Scan both (backup/ first so it wins on a duplicate name). Only base volumes 422 // end in ".aisv"; continuation parts (".aisv.2") don't match. 423 $globs = array(); 424 $bdir = self::backup_dir(); 425 if ( ! is_wp_error( $bdir ) ) { 426 $globs[] = trailingslashit( $bdir ) . '*.aisv'; 427 } 428 $globs[] = trailingslashit( $dir ) . '*.aisv'; 429 foreach ( $globs as $glob ) { 430 foreach ( (array) glob( $glob ) as $path ) { 431 if ( ! is_file( $path ) ) { 432 continue; 433 } 434 $base = basename( $path ); 435 if ( isset( $seen[ $base ] ) ) { 436 continue; 437 } 438 $seen[ $base ] = true; 439 $vols = self::volumes_for( $path ); 440 $size = 0; 441 foreach ( $vols as $v ) { 442 $size += (int) filesize( $v ); 443 } 444 $out[] = array( 445 'file' => $base, 446 'path' => $path, 447 'size' => $size, 448 'mtime' => (int) filemtime( $path ), 449 'volumes' => count( $vols ), 450 ); 451 } 416 452 } 417 453 usort( $out, static function ( $a, $b ) { return $b['mtime'] <=> $a['mtime']; } ); … … 433 469 if ( is_wp_error( $dir ) ) { 434 470 return false; 471 } 472 // Prefer the backup/ sub-folder (new location); fall back to the store root (archives 473 // created before backup/ existed, and imported uploaded-/cloud- archives). 474 $bdir = self::backup_dir(); 475 if ( ! is_wp_error( $bdir ) ) { 476 $bpath = trailingslashit( $bdir ) . $file; 477 if ( is_file( $bpath ) ) { 478 return $bpath; 479 } 435 480 } 436 481 $path = trailingslashit( $dir ) . $file; -
ai-siteark/trunk/includes/jobs/class-backup-runner.php
r3657840 r3664708 90 90 $gw = new Job_Gateway(); 91 91 $id = $gw->insert( 'backup', array( 'phase' => 'prepare' ) ); 92 $archive = trailingslashit( $store ) . Local_Store::filename(); 92 // New backups go into the backup/ sub-folder (falls back to the store root on error). 93 $bstore = Local_Store::backup_dir(); 94 $dest = is_wp_error( $bstore ) ? $store : $bstore; 95 $archive = trailingslashit( $dest ) . Local_Store::filename(); 93 96 $work = Local_Store::work_dir( $id ); 94 97 if ( is_wp_error( $work ) ) { -
ai-siteark/trunk/readme.txt
r3657880 r3664708 3 3 Tags: backup, restore, migration, clone, database 4 4 Requires at least: 6.0 5 Tested up to: 7. 05 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.9. 47 Stable tag: 2.9.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 76 76 == Changelog == 77 77 78 = 2.9. 4=78 = 2.9.5 = 79 79 AI-SiteArk backs up, restores and migrates your entire WordPress site — the full database and your files — into a single portable, integrity-checked .aisv archive, with optional AES-256 password encryption and authenticated (tamper-evident) backups. Restore in place, or migrate to a new domain or host with automatic, serialization-safe URL/path rewriting. Backups run as memory-safe, resumable background jobs, so they work on large sites and modest hosting. 80 80
Note:
See TracChangeset
for help on using the changeset viewer.