All-in-One WP Migration Backblaze B2 Extension WP CLI Integration
Backblaze B2 Extension for All-in-One WordPress Migration includes integration with WP-CLI, allowing you to run migrations from the command line. It adds backup and restore commands that can be executed from the command line.
Backup
Creates a new backup file.
Example: wp ai1wm b2 backup.
OPTION | DESCRIPTION | EXAMPLE |
---|---|---|
[--sites] | Create a new backup file for WP Multisite (Sub-Sites/Subdomain-Sites). | wp ai1wm b2 backup --sites |
[--exclude-spam-comments] | Creates a backup file without spam comments. | wp ai1wm b2 backup --exclude-spam-comments |
[--exclude-post-revisions] | Creates a backup file without post revisions. | wp ai1wm b2 backup --exclude-post-revisions |
[--exclude-media] | Creates a backup file without media library files. | wp ai1wm b2 backup --exclude-media |
[--exclude-themes] | Creates a backup file without any themes. | wp ai1wm b2 backup --exclude-themes |
[--exclude-inactive-themes] | Creates a backup file without currently inactive themes. | wp ai1wm b2 backup --exclude-inactive-themes |
[--exclude-muplugins] | Creates a backup file without must-use plugins. | wp ai1wm b2 backup --exclude-muplugins |
[--exclude-plugins] | Creates a backup file without plugins. | wp ai1wm b2 backup --exclude-plugins |
[--exclude-inactive-plugins] | Creates a backup file without currently inactive plugins. | wp ai1wm b2 backup --exclude-inactive-plugins |
[--exclude-cache] | Creates a backup file without cache files. | wp ai1wm b2 backup --exclude-cache |
[--exclude-database] | Creates a backup file without the database. | wp ai1wm b2 backup --exclude-database |
[--exclude-email-replace] | Creates a backup file without replacing email domain. | wp ai1wm b2 backup --exclude-email-replace |
[--replace "find" "replace"] | Finds and replaces text in the database. Use --replace flag before each pair for replacement. | wp ai1wm b2 backup --replace "wordpress" "WordPress" |
SIMULTANEOUS USE | All options be used simultaneously except --list can. Replace option could be used between other options. | wp ai1wm b2 backup --exclude-inactive-themes --replace "find" "replace" --exclude-cache --replace "old text" "new text" |
List backups
List backup files from Backblaze B2.
Example: wp ai1wm b2 list-backups.
OPTION | DESCRIPTION | EXAMPLE |
---|---|---|
[--folder-path= | List backups in a specific folder. (Bucket name is specified in the extension settings). | wp ai1wm b2 list-backups --folder-path=ugyen |
Restore backup
Restore a backup from Backblaze B2.
Example: wp ai1wm b2 restore migration-wp-20170913-095743-939.wpress.
OPTION | DESCRIPTION | EXAMPLE |
---|---|---|
[--folder-path= | Download a backup from a specific folder inside a bucket. (Bucket name is specified in the extension settings). | wp ai1wm b2 restore migration-wp-20170913-095743-939.wpress --folder-path=ugyen |
[--yes] | Auto-confirm the backup on restore. | wp ai1wm b2 restore migration-wp-20170913-095743-939.wpress --yes |
Retention settings
To keep the most recent backup: wp option update ai1wmae_b2_backups 1.
To limit the size of backup: wp option update ai1wmae_b2_total 1GB.
Note: You can change the number of recent backups and the size of the backup as your needs dictate.