=== DataVaultRA Backup & Migration ===
Contributors: smarttravelroute8
Tags: backup, google drive, migration, restore, staging
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.2.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Backup, restore, migrate and clone WordPress sites with local backups, scheduled backups and optional Google Drive storage.

== Description ==

DataVaultRA Backup & Migration helps WordPress administrators create portable backups, restore websites, migrate between domains or servers, create staging clones, schedule automatic backups, and optionally store backup archives in Google Drive.

The plugin is designed around administrator-controlled backup and recovery. Local backups stay under your WordPress installation unless you explicitly configure an external destination or transfer a package to another site.

= Backup and recovery features =

* Create full WordPress backups containing files and database tables.
* Create files-only or database-only backups.
* Download portable DataVaultRA backup archives.
* Upload DataVaultRA backup packages in resumable chunks.
* Validate uploaded packages before restoration.
* Restore files and database content from a DataVaultRA backup.
* View server-reported restore progress during validation, files, database and finalization.
* Recover the admin experience after restoration without leaving WordPress maintenance mode active.
* Protect important recovery points from automatic cleanup.

= Automatic backups =

* Schedule automatic WordPress backups.
* Configure local-backup retention.
* Choose hourly, 12-hour, daily, weekly, fortnightly or monthly schedules.
* Prevent overlapping backup jobs with operation locking.
* Choose local storage or Google Drive where configured.

= Google Drive backup =

Google Drive integration is optional.

After an administrator supplies their own Google OAuth credentials and connects an account, DataVaultRA can upload administrator-selected backup packages to Google Drive.

Features include:

* Administrator-controlled OAuth connection.
* Encrypted storage of Google OAuth tokens in WordPress.
* Resumable Google Drive uploads.
* Manual Google Drive backups.
* Scheduled Google Drive backups when configured.
* Account reconnect and credential-management controls.

= Migration and direct transfer =

Move a WordPress site to another domain, hosting account or WordPress installation.

* Create portable migration packages.
* Upload a backup package on the destination site and restore it.
* Rewrite site URLs, paths and supported serialized WordPress values for the destination.
* Use direct site-to-site package transfer with an administrator-generated destination migration key.
* Transfer packages directly between the selected WordPress installations without routing backup archives through a DataVaultRA vendor server.

= Staging and cloning =

Create an isolated staging copy of a WordPress site for testing or development.

DataVaultRA can clone WordPress files and database tables, adjust site URLs and serialized values, and prepare a separate staging environment using administrator-supplied settings.

= Large-site workflow =

DataVaultRA includes controls intended to make backup and migration operations more practical on typical WordPress hosting:

* 256 KB chunked browser uploads for migration packages.
* Database batching.
* Maximum-file-size controls.
* CPU-priority options.
* Operation progress and diagnostic logging.
* Protected local backup storage.

= Local-first design =

DataVaultRA does not require a DataVaultRA cloud account for local backup, restore, migration or staging features.

All included features in this WordPress.org package are enabled. There is no artificial feature lock.

== Privacy & Security ==

DataVaultRA stores local backup packages in a protected directory under `wp-content/datavaultra-backups`.

Backup packages can contain a complete copy of a WordPress site, including database content and uploaded files. Administrators should protect backup archives with the same care as the live website and remove copies that are no longer required.

DataVaultRA does not automatically send local backup archives to a DataVaultRA-operated service.

External communication occurs only when an administrator explicitly uses an external feature described below.

== External services ==

= Google Drive =

Google Drive integration is optional and is used only after an administrator enters their own Google OAuth credentials and explicitly connects an account.

When connected, DataVaultRA sends OAuth authorization requests to Google and uploads administrator-selected backup archives to Google Drive.

Depending on the operation, Google may receive information required to authenticate the administrator and store the selected file, such as the site IP address, OAuth account information, archive filename, file size and backup archive bytes.

Google APIs Terms of Service:
https://developers.google.com/terms

Google Privacy Policy:
https://policies.google.com/privacy

= Direct site-to-site transfer =

Direct Transfer is optional and starts only after an administrator enters a destination WordPress URL and its DataVaultRA migration key.

The source WordPress site sends the selected backup archive directly to the administrator-selected destination over WordPress HTTP.

The destination may receive the source IP address, archive filename, file size, migration-key header and archive bytes required for the transfer.

DataVaultRA does not route direct-transfer backup data through a DataVaultRA vendor service.

== Installation ==

1. In WordPress, go to Plugins > Add New Plugin > Upload Plugin.
2. Upload the DataVaultRA ZIP package.
3. Activate DataVaultRA Backup & Migration.
4. Open DataVaultRA from the WordPress admin menu.
5. Create a first local backup before testing restore, migration, automation or staging.
6. To use Google Drive, open the Google Drive settings and follow the displayed OAuth setup instructions.
7. Before restoring a production website, test the restore workflow on a staging or disposable WordPress installation.

== Frequently Asked Questions ==

= Where are local backups stored? =

Local backup packages are stored in the protected `wp-content/datavaultra-backups` directory.

= Can I restore a DataVaultRA backup on another WordPress site? =

Yes. Install DataVaultRA on the destination WordPress site, upload a valid DataVaultRA backup package, allow the plugin to validate it, and then start the restore operation.

= Can I migrate to a different domain or hosting provider? =

Yes. Create a full package on the source website and restore it on the destination. DataVaultRA rewrites WordPress site URLs, paths and supported serialized values for the destination environment.

= Can I send a backup directly from one WordPress site to another? =

Yes. Direct Transfer lets an administrator generate a destination migration key and transfer a selected backup package directly from the source WordPress site to that destination.

= Does Google Drive require setup? =

Yes. An administrator must create or use a Google Cloud OAuth web client, enable the Google Drive API, enter the required OAuth credentials in DataVaultRA, register the exact redirect URI displayed by the plugin, and authorize a Google account.

= Does DataVaultRA require a cloud account? =

No. Local backup, restore, migration and staging features do not require a DataVaultRA cloud account.

= Does DataVaultRA automatically send my website data somewhere? =

No. Local operations remain on the WordPress installation. Data is sent externally only when an administrator explicitly connects and uses Google Drive or initiates a direct site-to-site transfer.

= What should I do before restoring a website? =

Create a current backup first and, whenever possible, test the restore package on a staging or disposable WordPress installation before restoring a production website.

= Will DataVaultRA leave WordPress stuck in maintenance mode after restore? =

The current restore workflow uses a frontend restore lock instead of WordPress core maintenance mode so WordPress administration and AJAX remain available during recovery.

== Screenshots ==

1. DataVaultRA dashboard overview with quick access to backup, restore, migration, staging, automation and storage tools.
2. Backup & Restore workspace for creating full, files-only or database-only WordPress backups.
3. Backup upload and restore workflow with chunked upload, package validation and restore controls.
4. Restore progress interface showing server-reported validation, file, database and finalization progress.
5. Google Drive settings with OAuth configuration, account connection and cloud-backup controls.
6. Existing backup packages with download, restore and storage actions.
7. Migration workspace for uploading packages or transferring a backup directly to another WordPress site.
8. Staging tools for creating an isolated clone of a WordPress website.
9. Automatic backup scheduling, retention and advanced large-site controls.
10. DataVaultRA diagnostic logs and operation information for troubleshooting backup and restore tasks.

== License ==

DataVaultRA Backup & Migration is free software licensed under the GNU General Public License, version 2 or any later version.

Copyright (C) 2026 SmartWP Tools

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

A copy of the license is included in `LICENSE.txt`.

== Changelog ==

= 1.2.5 =
* Added a standalone GPLv2-or-later LICENSE.txt and source-code license notice.
* Refreshed the WordPress.org description, privacy information, FAQ and screenshot captions.
* Updated release metadata for the 1.2.5 WordPress.org release.
* Preserved the DataVaultRA 1.2.x backup-package and restore workflow.

= 1.2.4 =
* Replaced WordPress core maintenance mode during restore with a safe frontend-only restore lock that never blocks wp-admin or AJAX.
* Added server-reported restore progress for package validation, files, database tables and finalization.
* Added restore status polling so a completed restore is recognized even if the main hosting connection closes.
* Added a successful restore screen, WordPress Admin button and automatic five-second redirect.
* Protected the active DataVaultRA restore engine from being overwritten by an older copy inside a backup.

= 1.2.3 =
* Fixed restore uploads rejected after WordPress changed the multi-extension `.dvr.zip` filename during sanitization.
* Added safe support for browser-renamed backup copies while retaining protected manifest validation.
* Hid the Google OAuth troubleshooting warning after Google Drive is successfully connected.

= 1.2.2 =
* Replaced the query-string OAuth callback with a dedicated WordPress admin-post callback.
* Prevented the callback marker from being sent to Google as an unrelated authorization parameter.
* Kept compatibility with authorization attempts started by version 1.2.1.

= 1.2.1 =
* Reduced browser upload chunks from 1 MB to hosting-safe 256 KB requests.
* Added precise errors for filename, server limits, missing upload data and invalid upload sessions.
* Forced Google's secure account chooser on every connection so a different signed-in email can be selected.
* Added redirect URI copy control and an in-plugin guide for resolving `redirect_uri_mismatch`.
* Added OAuth Client ID, Client Secret and preferred account validation.
* Reset old Google tokens safely when switching to a different OAuth Client ID.

= 1.2.0 =
* Renamed the main backup tab to Backup & Restore.
* Added chunked backup upload with exact progress, package validation and Restore Now or Restore Later choices.
* Moved local package storage to the dedicated protected `wp-content/datavaultra-backups` directory.
* Added automatic migration from the previous uploads-based storage location.
* Added the new DataVaultRA brand icon to the admin menu, header, dashboard, progress dialog and WordPress.org assets.

= 1.1.0 =
* Added full, files-only and database-only backup modes.
* Added protected recovery points and storage rescanning.
* Added 12-hour, fortnightly and monthly automatic schedules.
* Added secure chunked site-to-site package transfer with renewable destination keys.
* Added large-site controls for database batches, maximum file size and CPU priority.
* Added optimizer, verbose diagnostics, uninstall cleanup choice and dark professional interface.
* Added an icon-led storage provider bar and expanded migration workspace.

= 1.0.1 =
* Redesigned the backup control center with icon-led navigation and action cards.
* Fixed staging clone failures on `wp_posts` under strict MySQL modes.
* Added native bulk table cloning followed by serialized-safe URL rewriting.
* Added detailed MySQL errors for staging failures.
* Added a backup concurrency lock to prevent duplicate jobs from repeated clicks.
* Added an elapsed-time operation dialog and responsive backup option cards.

= 1.0.0 =
* Initial release with backup, restore, migration, Google Drive, schedules, retention, logs and staging clones.

== Upgrade Notice ==

= 1.2.5 =
Adds the GPL license file and refreshes the WordPress.org listing, screenshots and release metadata while preserving the existing DataVaultRA backup workflow.
