Archiver
A powerful, single-file PHP script designed for creating reliable backups and seamless migrations.
Cloud86 Migrator & Archiver
A robust, self-contained PHP-based website packaging and migration tool. It allows administrators to package files and databases into standard archives, perform direct server-to-server transfers via Rsync, and audit the host environment prior to migration.
Features
- Direct Rsync Migrations: Direct server-to-server transfers for both databases and files using the system
rsynccommand, featuring bandwidth throttling and key-based SSH authentication. - Robust Database Backup:
- Automatically detects CMS configurations (WordPress, Joomla, etc.).
- Auto-converts MyISAM tables to InnoDB on charset overrides (
utf8mb4) and enforcesROW_FORMAT=DYNAMICto prevent key length limit issues (Error 1071).
- Multipart Archiving: Packages directories into standard ZIP or TAR.GZ formats, supporting splitting into multi-part archives for large sites.
- Server Environment Pre-flight Check: Audits PHP settings, system utilities (tar, zip, rsync, curl), and remote transfer protocols (FTP, SFTP) to show available methods in a clean grid.
- Automatic Exclusions: Built-in rules to automatically filter out existing backup folders, caching directories, and log files.
How to Build (Compiling the PHAR)
The application is built as a single, self-contained PHAR (PHP Archive) file for easy deployment on any server.
Prerequisites
- PHP CLI installed on your local machine.
- The
pharextension enabled in your local PHP configuration.
Compilation Command
To compile the source files into archiver.phar, run the compiler script in the root directory while disabling the Phar read-only restriction:
php -d phar.readonly=0 compile.php
This will package entry.php, all files in /src/, and the assets in /assets/ and /templates/ into the final archiver.phar file.
How to Deploy & Use
- Upload: Upload the compiled
archiver.pharto the root directory of the website you want to package or migrate. - Rename: Rename the file to
archiver.php(so the web server executes it as a PHP script). - Run: Access it via your web browser:
https://example.com/archiver.php - Clean up: After the migration is complete, remember to delete the
archiver.phpfile from the server for security reasons.
Key Configurations & Customization
The core configuration settings are located in src/Config.php.
Customizing at Runtime (via the UI)
You can dynamically adjust key configurations in Step 3 (Advanced Options) of the user interface before starting the archive process:
- Enable Debug Mode: Activating this checkbox writes verbose operations and memory logs directly to the log file to help troubleshoot issues.
- Max Zip Part Size (MB): Set the maximum size (in MB) of the zip parts before they are split. Setting this value to
0or blank disables archive splitting.
Default Configurations List
MAX_ARCHIVE_PART_SIZE: The maximum size (in bytes) of each archive chunk when using multi-part splitting (Default: 1 GB).THROTTLE_COMMAND: The system prefix command used to limit CPU and Disk I/O when archiving or transferring (Default:nice -n 19 ionice -c 3).- *`AUTOEXCLUDE`**: Lists of directories (backups, cache, large log files) that are skipped by default to minimize archive sizes.