Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Synopsis

This module allows for any Flysystem filesystem to be used as a destination for Backup and Migrate files.

This module provides a custom Backup and Migrate Destination plugin ( FlysystemDestinationPlugin extends DestinationPluginBase) that updates most file write and directory operations with Flysystem API calls. Not all Flysystem filesystem adapters will make use of directories. File reads are still utilizing PHP's streams since Flysystem creates a PHP scheme out of each filesystem that is configured.

Requirements

Restrictions/Comments

S3, Backblaze, SFTP, and local schemes have been tested. Other Flysystem adapters should also work.

The Backup and Migrate Destination plugin that is implemented in this module makes use of BackupFileReadableInterface. This interface works because Flysystem filesystems/schemes become file streams in PHP. Future versions of this module may need to use only the native Flysystem API to work with more adapaters.

PLEASE test your backups in a safe environment before you rely on this for production backups.

Installation

  • Enable the module.
  • Enable supported Flysystem adapter module such as Flysystem - S3
  • Configure a $settings['flysystem'] array with one or more valid Flysystem configurations. See examples below.
  • Clear and rebuild your cache
  • Create a new Backup Destination in Backup and Migrate settings.

Example Configurations

These configurations go in your settings.php (or related files).

Amazon S3 Bucket

   $settings['flysystem']['s3-example'] = [
        'name' => 'S3 Example',
        'driver' => 's3',
        'config' => [
          'key'    => 'your_aws_key',
          'secret' => 'your_aws_key_secret',
          'region' => 'us-east-1',
          'bucket' => 'bucket-name',
          'protocol' => "https",
          'cname_is_bucket' => FALSE,
          'use_path_style_endpoint' => FALSE,
          'public' => FALSE,
          'prefix' => 'path/to/backups',
        ],
        'cache' => TRUE,
    ];

Backblaze B2 Cloud Storage

    // This array key can be changed as needed, it is how the module will
    // identify this backup destination.
    $settings['flysystem']['backblaze'] = [
      // This must be set to "s3" and the Flysystem S3 module must also be
      // installed.
      'driver' => 's3',
      'config' => [
        // Set this to the "keyID" value from Backblaze.
        'key' => 'MYKEYID',
        // Set this to the "applicationKey" value from Backblaze.
        'secret' => 'MYAPPLICATIONKEY',
        // The name of the bucket created in Backblaze.
        'bucket' => 'MYBUCKETNAME',
        // This should be taken from the hostname provided by Backblaze; it
        // might not need to be changed.
        'region' => 'us-west',
        // The hostname provided by Backblaze - make sure to prefix it with
        // "https://" otherwise the backups won't work.
        'endpoint' => 'https://s3.us-west-000.backblazeb2.com',
      ],
      // Creates a metadata cache to speed up lookups.
      'cache' => TRUE,
    ];

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
May 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
5.0.2 Stable Nov 21, 2023
5.0.1 Stable May 9, 2023