Applies to: Drupal 10, Drupal 11, Backup and Migrate 5.x

Problem

After installing or upgrading the Backup and Migrate module, the Quick Backup page shows an empty Backup Source or Backup Destination dropdown.

Typical symptoms include:

  • Backup Source is blank.
  • Backup Destination is blank or missing expected options.
  • Backup cannot be performed because no source is available.

drupal-11-backup-and-migrate-missing-backup-source-and-backup-destination

Example:

  • Backup Source: (empty)
  • Backup Destination: Download

or

  • Backup Source: (empty)
  • Backup Destination: (empty)

 

Cause

The Backup and Migrate module code and plugins are installed correctly, but the module’s default configuration was never imported into Drupal’s active configuration.

The source plugins exist, but the corresponding configuration entities do not, resulting in an empty dropdown.

Verify the issue

1. Verify the source plugins exist

Run:

drush php:eval '
$manager = \Drupal::service("plugin.manager.backup_migrate_source");
print_r(array_keys($manager->getDefinitions()));
'

Expected output:

Array
(
    [0] => DefaultDB
    [1] => DrupalFiles
    [2] => EntireSite
    [3] => FileDirectory
    [4] => MySQL
)

If you receive similar output, the module is installed correctly.


2. Check the active Backup and Migrate configuration

Run:

drush php:eval '
print_r(\Drupal::service("config.storage")->listAll("backup_migrate."));
'

If the output only contains something similar to:

Array
(
    [0] => backup_migrate.backup_migrate_schedule.weekly_database
)

then the default Backup and Migrate configuration has not been imported.


3. Verify the default configuration files exist

Run:

find modules/contrib/backup_migrate/config/install -type f

Example output:

modules/contrib/backup_migrate/config/install/backup_migrate.backup_migrate_destination.private_files.yml
modules/contrib/backup_migrate/config/install/backup_migrate.backup_migrate_schedule.daily_schedule.yml
modules/contrib/backup_migrate/config/install/backup_migrate.backup_migrate_source.default_db.yml
modules/contrib/backup_migrate/config/install/backup_migrate.backup_migrate_source.entire_site.yml
modules/contrib/backup_migrate/config/install/backup_migrate.backup_migrate_source.private_files.yml
modules/contrib/backup_migrate/config/install/backup_migrate.backup_migrate_source.public_files.yml

This confirms the module ships with the required configuration.


Solution

Import the module’s default configuration into Drupal.

drush config:import --partial --source=modules/contrib/backup_migrate/config/install

You should see output similar to:

Create backup_migrate.backup_migrate_destination.private_files
Create backup_migrate.backup_migrate_schedule.daily_schedule
Create backup_migrate.backup_migrate_source.default_db
Create backup_migrate.backup_migrate_source.entire_site
Create backup_migrate.backup_migrate_source.private_files
Create backup_migrate.backup_migrate_source.public_files

Confirm the import when prompted.


Rebuild Drupal

After the import completes successfully, run:

drush updb
drush cr

Expected output:

[success] No pending updates.
[success] Cache rebuild complete.

Verify the fix

Return to:

Administration → Configuration → Development → Backup and Migrate → Backup

The following options should now appear.

Backup Source

  • Default Drupal Database
  • Entire Site
  • Public Files
  • Private Files

Backup Destination

  • Download
  • Private Files (if configured)

The Quick Backup form should now function normally.


Why reinstalling the module did not help

Running:

composer remove drupal/backup_migrate
composer require drupal/backup_migrate

only reinstalls the module code.

It does not recreate missing active configuration if the module is already enabled or if the configuration was previously removed.


Troubleshooting

If the Backup Source is still empty after importing the configuration:

  • Verify the module version:
composer show drupal/backup_migrate
  • Verify the source plugins are discovered:
drush php:eval '
$manager = \Drupal::service("plugin.manager.backup_migrate_source");
print_r(array_keys($manager->getDefinitions()));
'
  • Clear caches:
drush cr

Environment tested

  • Drupal 11.2.5
  • Backup and Migrate 5.1.5
  • PHP 8.4
  • Installed via Composer

References