MainWP 6.4 - Backup excludes & more

Hello!

I am testing out the new built-in backups and noticed the following things:

1.) Files from these backup plugins are not excluded when “Known backup locations” is turned on:

  • wp-content/ai1wm-backups (All-in-One WP Migration)
  • wp-content/updraft (UpdraftPlus)
  • wp-content/duplicator-backups (Duplicator)

2.) Test Restore requires a DB grant

Test Restore seems to create a scratch database for every check. A usual setup where the dashboard DB user only has rights on its own database can’t do that, so Test Restore shows as not available. I got it to work by giving the DB user permissions on the scratch databases, but am not sure if that is the intended path.

Feedback:

Overall I am quite positive about the new built-in backups. This has the potential to be a killer feature if you take it further and tie it into the site update functions.

I know about “Require a backup before an update”, but that only checks whether a recent backup exists.
What I have in mind: click “Update” → a backup runs right before the update, backing up the DB plus whatever the update touches (core for core updates, the themes or plugins being updated), and then the site gets updated. UpdraftPlus Premium already does this, but this would finally run from the dashboard. One button, per site or globally: “Back up & Update”, ideally with a one-click rollback of that update.

If that is not feasible, it would be great to have scope options for backup tasks:

  • DB + core
  • DB + themes
  • DB + plugins

I typically do not need a backup of a gigantic media library when I am just updating 1-2 plugins. I understand that incremental backups reduce the size of repeat backups, but they still start from a full base and restore the whole site. Scope options would let a pre-update backup contain, and restore, only what the update changes.

Since backups and updates are such core features, I think this would be extremely valuable to have.

Edit: Additional info

3.) A test restore failed while building the safety backup on the site.
“Unexpected content found while reading the backup archive. The archive file may be corrupted.”

A potential cause could have been WP Rocket rebuilding its cache during the backup. The second try went through. With a large site on a slower host where a cache rebuild can take hours, this could become a blocker.

4.) Restores are slow at the “Sending files to the site” step: about 2.5 MB/s on a fully local 2.5G LAN test-setup.

5.) The download button is greyed out for backups that exist only on remote. Would be great if fetch from remote & download were a feature. Right now this seems to require fetching and assembling the pieces manually.

Hey @alexander

Thanks for the detailed feedback.

The missing backup-folder exclusions, archive error, and slow restore transfers deserve a closer look. Please open a support ticket and link this thread, and we’ll look into it.

For #3, please also clarify whether you started Test Restore or Restore. The automatic Test Restore runs on the Dashboard and doesn’t create a safety backup on the Child Site.

The scratch database requirement is currently expected. Test Restore needs permission to create its temporary database on the Dashboard host.

Please feel free to submit “Back up & Update,” scoped backups, and fetching remote backups for download on MainWP Voice. Those are feature suggestions, while the issues above belong in support.

Hello Bojan,

thank you for the reply.

#3 I should have worded this better, it was Restore of a local site i use for testing. Not the “Test restore” feature. The restore failed during the building of of the safetly backup on the site.

I’ll open a ticket and do the feature requests.

I might just be stating this a different way than @alexander but I would like suggest the addition of an option for a manual on-demand backup for a selected client child site rather than automating child site backups on a schedule.

Hey @FreshView

Yep, this is already available in MainWP 6.4. Open Backups > Snapshots & Restore (/wp-admin/admin.php?page=ManageBackupsSnapshots ), select the Child Site, and click Back Up Now . This creates a full backup without needing a scheduled task.

For any further feedback or feature suggestions, please feel free to submit them on MainWP Voice.

I’m running MainWP Dashboard 6.4.1 with Built-In Backups on shared hosting. Backups and offsite uploads work fine, but Test Restore stays off because the sandbox can’t create its temporary mainwp_tr_* database:

The DB_USER account needs permission to create and drop its own mainwp_tr_ temporary databases …

On many shared hosts (mine included), databases can only be created through the hosting control panel. The DB user can never get CREATE DATABASE, regardless of what support is willing to do. So Test Restore is permanently unavailable for everyone on this kind of hosting, even though it’s exactly where verified restores matter most.

Proposal: Let us point Test Restore at a dedicated, pre-created database via wp-config.php, for example:

php

define( 'MAINWP_TEST_RESTORE_DB_NAME', 'mainwp_restore_test' );
define( 'MAINWP_TEST_RESTORE_DB_USER', '...' );
define( 'MAINWP_TEST_RESTORE_DB_PASSWORD', '...' );
define( 'MAINWP_TEST_RESTORE_DB_HOST', 'localhost' );

When these are set, the sandbox could import into that database using a unique table prefix per run and drop those tables afterwards, instead of creating and dropping a whole database. As a safety net, it should refuse to run if the configured database is the Dashboard’s own DB_NAME.

That would make Test Restore usable on shared hosting without any special grants. Happy to test a beta.

Hi Dennis,

Thanks for explaining the hosting limitation. Test Restore currently needs to create and remove its own temporary database, so it stays unavailable on hosting plans that only allow database creation through the control panel.

Please feel free to submit your idea of using a dedicated, pre-created database on MainWP Voice.

Hi everyone,

A quick update on the issues reported here. MainWP Child 6.4.2 includes fixes for:

  • #1: “Known backup locations” now excludes the All-in-One WP Migration, UpdraftPlus, and Duplicator backup folders listed above.
  • #3: Pre-restore safety backups failing when cache files change during TAR archive creation.

Please update MainWP Child on the affected sites to receive these fixes.

Alexander has also confirmed that large restores now complete following the recent updates. The separate improvement for slow restore transfers is still awaiting release.