PHPackages                             richardhj/contao-backup-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. richardhj/contao-backup-manager

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

richardhj/contao-backup-manager
===============================

Wrapper extension for backup-manager.

2.2.3(4y ago)1312.9k2LGPL-3.0-or-laterPHPPHP &gt;=7.4

Since Apr 29Pushed 4y ago2 watchersCompare

[ Source](https://github.com/richardhj/contao-backup-manager)[ Packagist](https://packagist.org/packages/richardhj/contao-backup-manager)[ RSS](/packages/richardhj-contao-backup-manager/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (5)Versions (12)Used By (0)

contao-backup-manager
=====================

[](#contao-backup-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f6400afd57c779d74e1b976e7b1f8135fa55ee72e10a23e08fb7f4ee91be375f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696368617264686a2f636f6e74616f2d6261636b75702d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/richardhj/contao-backup-manager)[![Software License](https://camo.githubusercontent.com/2bc95db9d4d6b319fe40fe1a46431a18f9684b30d516775115c5d0df6aa3e9b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4c47504c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Dependency Status](https://camo.githubusercontent.com/ebccd4a7ce5875daed9e9158d5183ff9fc0ac649fda3c2e95b7f38e2428c57ae/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f72696368617264686a3a636f6e74616f2d6261636b75702d6d616e616765722f62616467652e7376673f7374796c653d666c61742d737175617265)](https://www.versioneye.com/php/richardhj:contao-backup-manager)

This is a wrapper extension for .

> ⚠️ With the new backup command introduced in Contao 4.13, this bundle will not be maintained anymore. Please refer to .
>
> **Upgrade path:**Run `php vendor/bin/contao-console contao:backup:create` instead of `php vendor/bin/contao-console backup-manager:backup contao local -c gzip --filename backup.sql`.
>
> **Upgrade path for using external storage:**
>
> 1. Install the Flysytem adapter of interest, e.g., `composer require league/flysystem-sftp:^3.0`.
> 2. Replace the backups storage in Contao as follows:
>     1. Create a DI extension that implements the `ConfigureFilesystemInterface`
>     2. Configure your extenal stoarge, e.g., SFTP storage:
>
> ```
>    public function configureFilesystem(FilesystemConfiguration $config): void
>    {
>        $config
>            ->mountAdapter('sftp', [
>                'host' => '%env(DB_STORAGE_HOST)%',
>                'port' => 22,
>                'username' => '%env(DB_STORAGE_USERNAME)%',
>                'password' => '%env(DB_STORAGE_PASSWORD)%',
>                'root' => '/db',
>                'timeout' => 10,
>            ], 'backups', 'backups')
>        ;
>    }
> ```
>
>
>
> 3. If you don't have an bundle nor extension, refer to  and replace the filesystem with `(new FilesystemConfig($container))->...`.
>
> **Upgrade path for using encrypted external storage:**
>
> - Configure an additional middleware flysystem adapter similar to [alextartan/flysystem-libsodium-adapter](https://github.com/alextartan/flysystem-libsodium-adapter) and use this filesystem as backup storage.

Install
-------

[](#install)

Via Composer

```
$ composer require richardhj/contao-backup-manager
```

Usage
-----

[](#usage)

### Commands

[](#commands)

#### Database backup

[](#database-backup)

Run `php vendor/bin/contao-console backup-manager:backup contao local -c gzip --filename backup.sql` to create a backup

The dump will be saved within the `/backups` folder in the website root.

#### Database restore

[](#database-restore)

Run `php vendor/bin/contao-console backup-manager:restore contao local backup.sql.gz -c gzip` to restore from a backup.

The database dump will be searched within the `/backups` folder in the website root.

### External storage

[](#external-storage)

You can define external storage for the database dump to upload to. An external SFTP storage, AWS, or many more storages are available. Please consult the documentation of [backup-manager](https://github.com/backup-manager/symfony) or see the example in the section below.

### File encryption

[](#file-encryption)

You can encrypt the database dump before it is uploaded on external storage. The encrypted file will be decrypted on-the-fly on restore.

**To use file encryption:**

- **Install `alextartan/flysystem-libsodium-adapter`**
- **Configure a `kernel.secret`**

Example configuration to write encrypted files on an external SFTP storage:

```
# /config/config.yml

contao_backup_manager:
  storage:
    hetzner_enc:
      type: Encrypted
      storage: hetzner
      encryption_key: '%env(DB_ENCRYPTION_KEY)%'
    hetzner:
      type: Sftp
      host: '%env(DB_STORAGE_HOST)%'
      username: '%env(DB_STORAGE_USERNAME)%'
      password: '%env(DB_STORAGE_PASSWORD)%'
      port: 22
      root: '/db'
      timeout: 10
```

```
# /.env.local

DB_STORAGE_HOST=storage.beispiel.de
DB_STORAGE_USERNAME=user
DB_STORAGE_PASSWORD=pass
DB_ENCRYPTION_KEY=aaabbbcccddd
```

```
php vendor/bin/contao-console backup-manager:backup contao hetzner_enc -c gzip
```

The filesystem utilizes [libsodium's Poly1305](https://libsodium.gitbook.io/doc/advanced/poly1305) algorithm to encrypt the files on-the-fly. The implementation is adopted from the [official documentation](https://libsodium.gitbook.io/doc/secret-key_cryptography/secretstream). To check the implementation, check the [source code](https://github.com/alextartan/flysystem-libsodium-adapter/blob/master/src/ChunkEncryption/Libsodium.php). To encrypt the files, we use a "password" (`'%env(DB_ENCRYPTION_KEY)%'`) and "salt" (`'%env(kernel.secret)%'`) to [derive a 32-byte encryption key from](https://github.com/richardhj/contao-backup-manager/blob/main/src/Filesystem/EncryptedFilesystem.php#L45). The encryption key must not change in order to be able to decrypt the files. As we use the kernel secret for salting the encryption key, please make sure you have the kernel.secret defined in your parameters.yml.

Note: The files can only be encrypted with the same secret, but the kernel secret should be rotated from time to time, so this feature is not recommended for long data retention.

### Data Retention

[](#data-retention)

You can configure the data retention:

```
# /config/config.yml

contao_backup_manager:
  purge:
    max_days: 14
    max_files: 4
```

With this config, older files will be deleted automatically on the backup process.

**Important:** There must not be any other files in the configured backup folder, because the files get purged regardless of their file type.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~93 days

Recently: every ~100 days

Total

11

Last Release

1684d ago

Major Versions

v1.0.1 → v2.0.02020-03-17

PHP version history (3 changes)v1.0.0PHP ^7.1

v2.1.0PHP ^7.4

2.2.3PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1284725?v=4)[Richard Henkenjohann](/maintainers/richardhj)[@richardhj](https://github.com/richardhj)

---

Top Contributors

[![richardhj](https://avatars.githubusercontent.com/u/1284725?v=4)](https://github.com/richardhj "richardhj (24 commits)")[![Toflar](https://avatars.githubusercontent.com/u/481937?v=4)](https://github.com/Toflar "Toflar (1 commits)")

### Embed Badge

![Health badge](/badges/richardhj-contao-backup-manager/health.svg)

```
[![Health](https://phpackages.com/badges/richardhj-contao-backup-manager/health.svg)](https://phpackages.com/packages/richardhj-contao-backup-manager)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
