=== AegisBackup – WordPress Backup, Restore & Migration ===
Contributors: aegisify
Donate link: https://aegisify.com
Tags: wordpress backup, restore wordpress, migration, database backup, file backup, push pull migration, security, aegis
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.1.16
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AegisBackup is a professional-grade WordPress backup, restore, and migration solution designed for real-world hosting environments — including shared hosting, VPS, and enterprise servers.

== Description ==

AegisBackup is part of the **Aegisify ecosystem** and was built with one clear objective:

**Make WordPress backups, restores, and migrations predictable, safe, and transparent — even under strict hosting limits.**

Unlike traditional backup plugins that rely on fragile AJAX loops or opaque restore logic, AegisBackup uses **guided workflows, explicit confirmations, and connection-aware migrations** that match how WordPress hosting actually works.

---

## Core Features

### 🔹 Database Backups
* Full database backups
* Selective table backups
* Column-aware exports
* Scheduled database plans
* Safe table replacement logic
* Prefix-aware restore workflows

### 🔹 File Backups
* Full WordPress file backups
* Selective directories/files
* Tree-based file selector (no AJAX dependency)
* Scheduled file backup plans
* ZIP-based storage optimized for shared hosting

### 🔹 WordPress Backups (Snapshots)
* Full WordPress snapshots (files + database)
* Environment and metadata capture
* Safe restore into existing installations
* Optional advanced restore into a new database

---

## 🚀 Push / Pull Migration (NEW)

AegisBackup introduces a **secure Push / Pull Migration system** designed for moving WordPress sites **between live servers**.

### How It Works
* Destination WordPress generates a short-lived, HMAC-signed token
* Source WordPress connects securely using that token
* Source can:
  - **Migrate Database Backups**
  - **Migrate Selected Files / Directories**
* Destination receives and stages incoming data safely
* Restore actions are always explicit and user-controlled

### Migration Capabilities
* Push database backups to another WordPress site
* Push selected files or directories (relative to `/public_html/`)
* Destination-side listing of received DB backups
* One-click Restore or Delete on the Destination
* Connection auto-expiration for security
* No FTP, no SSH, no manual uploads

---

## 🔐 Designed for Shared Hosting
AegisBackup is built for environments with:
* Low memory limits
* Execution time limits
* Database permission restrictions

All restore and migration operations are:
* Chunk-safe
* Prefix-aware
* Explicitly confirmed
* Recoverable if interrupted

---

== Installation ==

1. Upload the `aegisbackup` folder to `/wp-content/plugins/`
2. Activate the plugin through the WordPress Plugins menu
3. Navigate to **AegisBackup → Backups & Migrate**
4. Configure backups, restores, or migrations as needed

---

== Usage ==

### Database Backups
Navigate to:
**AegisBackup → Backups & Migrate → Database Backups**

* Create full or table-specific backups
* Schedule recurring database backups
* Download, delete, or migrate backups to another site

### File Backups
Navigate to:
**AegisBackup → Backups & Migrate → File Backups**

* Select files/directories using a tree-based selector
* Schedule recurring file backups
* Restore or migrate selected files safely

### Migration Wizard
Navigate to:
**AegisBackup → Backups & Migrate → Migration Wizard**

* Connect Source and Destination WordPress sites
* Migrate database backups
* Migrate selected files/directories
* Monitor incoming backups on the Destination
* Restore with explicit confirmation

---

== Restore Wizard ==

### Default (Recommended)
**Restore into existing WordPress installation**
* Uses current database and wp-config.php
* Safely drops existing WordPress tables
* Restores backup tables and files
* Fixes URLs, paths, and permalinks
* Cleans up temporary files

### Advanced
**Restore into a new database**
* User-supplied database credentials
* Restores into isolated database
* Optional wp-config.php update
* Intended for advanced users

---

== Changelog ==

= 1.1.16 =
**Push / Pull Migration & Live Transfer Enhancements**

* Added secure Push / Pull Migration system
* Destination-side connection listening with token-based authentication
* Source-side migration of:
  - Database backups
  - Selected files/directories
* Destination now lists received database backups with:
  - Restore
  - Delete
* Integrated Database Table Backups into Migration Wizard
* Package selector no longer auto-selects backups
* Default base path set to `/public_html/` for Source and Destination
* Improved shared-hosting safety and clarity

= 1.1.15 =
* UI and stability improvements
* Backup listing persistence fixes
* Improved migration package handling

= 1.1.14 =
* Restore background process improvements
* Improved job state tracking and recovery

= 1.1.13 =
* Restore / Migrate tabs renamed for clarity
* Migration UI improvements

= 1.1.12 =
* Restore / Migrate submenu split
* Restore tab lists backups by type

= 1.1.11 =
* Improved migration package layout
* Fixed database restore edge cases

= 1.1.10 =
* Database Prefix Manager improvements

(earlier changelog entries preserved)

---

== Upgrade Notice ==

= 1.1.16 =
This update introduces secure Push / Pull Migration and destination-side restore management. Highly recommended for users performing site migrations.

---

== Support ==

Documentation, updates, and support:
https://aegisify.com

---

== Disclaimer ==

Always test restores and migrations in a staging environment first.  
AegisBackup performs destructive operations during restore and requires explicit user confirmation.
