| 开发者 | ozekihiroshi |
|---|---|
| 更新时间 | 2026年9月1日 13:37 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
mysqldump or mariadb-dump when available.<configured-prefix>/backups/database/YYYY/MM/DD/
The plugin prefers a native MySQL-compatible dump utility such as mysqldump or mariadb-dump when available.
When a suitable native dump utility or PHP process execution is unavailable, the plugin can use its PHP database dump backend instead.
Media backup
Media backup covers regular files below the current single-site WordPress uploads directory. It is separate from database backup and must be started explicitly.
Media jobs prepare a sorted file inventory and SHA-256 checksums in bounded background steps, upload files as individual S3 objects, and publish a completion marker only after the inventory and uploaded objects have been verified. Large files use S3 multipart upload.
Media objects are stored below:
<configured-prefix>/backups/media/<random-job-id>/
Before media backup can be started from WordPress administration, the server administrator must define ODBFS3_MEDIA_WORK_DIR in wp-config.php. Its value must be an existing persistent POSIX directory owned by the WordPress PHP user, with mode 0700, outside the web root, wp-content, and uploads. Do not use a publicly served path or a temporary directory that may be cleared while a job is running.
For example:
define('ODBFS3_MEDIA_WORK_DIR', '/private/persistent/wordpress-media-work');
Keep the uploads tree unchanged while a media backup runs. New, removed, renamed, or changed files or directories can stop the job safely. Media backup has no automatic schedule or retention in this release. A failed job must be inspected and its exact Job ID explicitly cleaned with WP-CLI before another media job is submitted.
This release does not provide a production media restore command. The S3 completion marker and inventory are intended to support independent restoration and full SHA-256 verification. A complete WordPress recovery requires both an appropriate database backup and the corresponding media backup.
Automatic database backups and WP-Cron
Automatic backups use WordPress WP-Cron.
WP-Cron is triggered by WordPress requests and is not a real-time operating system scheduler. A backup scheduled for a particular time may therefore run later if the site receives no requests around that time.
For environments where predictable execution is important, use an operating system scheduler to run WordPress Cron periodically.
For a standard WP-CLI installation, an example is:
*/5 * * * * cd /path/to/wordpress && wp cron event run --due-now --quiet
For a Docker Compose installation with a WP-CLI service, an example is:
*/5 * * * * cd /path/to/docker-project && docker compose run --rm wp-cli cron event run --due-now --quiet
These are examples only. Paths, users, container configuration, and execution permissions depend on your hosting environment.
Retention
Retention can be disabled or configured with any positive integer as the number of latest database backups to keep.
Retention operates only on database backup objects matching the plugin's expected backup naming structure below the configured S3 prefix.
Manual backups do not automatically apply retention.
Automatic backups and backups executed through the plugin's WP-CLI backup command apply the configured retention policy after a successful backup.
Uninstall behavior
Deactivating the plugin removes its scheduled database and media WordPress Cron events but keeps plugin settings, backup history, and media job state.
Uninstalling the plugin removes its local WordPress settings, backup history, current media job state, and archived media job metadata.
Uninstalling Ozeki Database Backup for S3 does NOT delete database or media backups stored in Amazon S3. It also does not automatically remove private media work directories or discover unknown incomplete multipart uploads.
This is intentional. Remote backups should not disappear merely because the WordPress plugin is removed.
ODBFS3_MEDIA_WORK_DIR in wp-config.php with that directory's absolute path.The plugin does not provide settings fields for long-lived AWS Access Key IDs or Secret Access Keys and does not intentionally store them in the WordPress database. AWS authentication is handled through the AWS SDK for PHP default credential provider chain.
No. An EC2 IAM role is the recommended authentication method when WordPress is hosted on Amazon EC2, but other credential sources supported by the AWS SDK default credential provider chain may also work.
The plugin uploads backups to Amazon S3 over the AWS SDK connection. Encryption at rest depends on the configuration of the destination S3 bucket and applicable AWS settings. Administrators should configure the S3 bucket according to their own security and compliance requirements.
No. S3 database backup objects are intentionally preserved when the plugin is uninstalled.
Not necessarily. The automatic backup uses WP-Cron, which depends on WordPress requests to trigger due events. For more predictable execution, configure a real operating system scheduler to periodically execute due WordPress Cron events.
The plugin can fall back to a PHP-based database dump implementation when a supported native dump utility or process execution is unavailable. The PHP fallback opens a separate database connection using the database constants already defined by WordPress. This keeps its consistent-snapshot transaction isolated from WordPress's shared database connection; it does not accept database connection values from an HTTP request or plugin setting.
It checks access to the configured S3 bucket, writes a temporary test object, reads it back, verifies the contents, and then deletes it.
It includes regular files under the current single-site WordPress uploads directory. It does not include the WordPress database, themes, plugins, wp-config.php, or other site files. Run a separate database backup for the corresponding database state.
Not in this release. A completed media backup contains a verified inventory, individual file objects, and a completion marker intended for an independently verified restore process. Test restoration procedures before relying on any backup system.
Not in this release. Media backup is started explicitly and is separate from the daily database schedule and database retention setting.