PHPackages                             muckiware/facility-plugin - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. muckiware/facility-plugin

ActiveShopware-platform-plugin[File &amp; Storage](/categories/file-storage)

muckiware/facility-plugin
=========================

Muckiware Facility Plugin for Shopware 6

v0.6.1(3mo ago)0825↓100%[9 issues](https://github.com/muckiware/MuckiFacilityPlugin/issues)MITPHPPHP &gt;= 8.1CI passing

Since Dec 24Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/muckiware/MuckiFacilityPlugin)[ Packagist](https://packagist.org/packages/muckiware/facility-plugin)[ RSS](/packages/muckiware-facility-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (12)Used By (0)

MuckiFacilityPlugin
===================

[](#muckifacilityplugin)

Muckiware Facility Plugin for Shopware 6 Web shops for to maintenance and backup of the database.

- The plugin provides a backup functionality for the database.
- Creates a backup of folders and files by an individual configuration into repository database. The plugin use the restic backup tool for to create the backups.
- The backups will be encrypted by a password.
- Cleanups tables like cart, if the database table grow up in too large.

Requirements
------------

[](#requirements)

- Shopware 6.6.x
- PHP 8.2.x or greater
- restic 0.15.x or greater

Installation
------------

[](#installation)

```
composer require muckiware/facility-plugin
bin/console plugin:install -a MuckiFacilityPlugin
```

General Configuration
---------------------

[](#general-configuration)

Plugin configuration under:
Settings -&gt; Extensions -&gt; My extensions -&gt; MuckiFacilityPlugin -&gt; Configure

OptionDescGlobal settings - ActiveTurn plugin on/off globalGlobal backup settings -&gt; Active database backupTurn backup database on/off global, for cli command `bin/console muckiware:db:dump `Global backup settings -&gt; Compress database backup fileTurn on/off compressen for db dump, for cli command `bin/console muckiware:db:dump `Global backup settings -&gt; Use own restic pathTurn on/off own resticGlobal backup settings -&gt; Own path to binary of resticEnter the absolut path to binary file of restic. Example input: `/var/www/html/bin/restic_0.17.3_linux_386`Respoitory Configuration
------------------------

[](#respoitory-configuration)

First you will need a repository configuration for the backup. The repository configuration is the base for the backup process. The repository configuration contains the backup source and the backup target. The backup source is the path to the folder or file which should be backuped. The backup target is the path to the repository where the backup data should be restored.

Settings -&gt; Extensions -&gt; Backup Repositories -&gt; Add Repository
for to create a new repository configuration.

### General Configuration Setup

[](#general-configuration-setup)

OptionDescActiveTurn repository on/offTechnical NameFree choose as a technical name, is just for better to organize the backup configurationsDatabase dump typeChoose the typ of database dump backup. As separate dump files for each table, only one dump file for the complete database, or none database dump.Repository PathAbsolute path to the backup repository folder. **Note that this path cannot be changed after creation!**HostnameClient hostname for the backup snapshots, default hostname is *muwa-facility-client*Repository PasswordThe backup repository will be encryped by a password. Remembering this password is very important! If you lose it, you won’t be able to get access to the data stored in the repository outside of the shop functionality. **Note that this password cannot be changed after creation!**Restore PathEnter here the absolute path for the target of the restored data.### Backup Paths

[](#backup-paths)

Use the **Add backup path**-button for to define the files and folders which should be backup. You can choose a complete folder, or a single file.
[![backup_paths_config.png](img%2Fbackup_paths_config.png)](img%2Fbackup_paths_config.png)
You can define for each path item a compress option. If the compress option is active, the backup data will be compressed by gzip. For folders which containing mainly compressed image files, additional compression during backup would make less sense.

### Delete of snapshots

[](#delete-of-snapshots)

You can remove old snapshots of a repository with the command.

```
bin/console muckiware:backup:snapshots --delete
```

This setup defines the daily, weekly, month or yearly values for this remove process. More details about the keep-parameters you can find in the restic documentation [https://restic.readthedocs.io/en/latest/060\_forget.html#removing-snapshots-according-to-a-policy](https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy)

### Initial Backup

[](#initial-backup)

Finally, click on the **Create new Repository**-button, for to create a new backup repository. This action creates then a configuration item in the shop database. And it creates the backup repository folder which is defined in the **Repository Path** field.

like this:
[![backup-rep-folder.png](img%2Fbackup-rep-folder.png)](img%2Fbackup-rep-folder.png)

Create Backup
-------------

[](#create-backup)

### cli

[](#cli)

You can create a backup by the command line interface with the following command:

```
bin/console muckiware:backup:create
```

### Administration panel

[](#administration-panel)

You can also create a backup in the administration panel.

- Go into the list of backup configurations under Settings -&gt; Extensions -&gt; Backup Repositories
- Select the backup repository
- Click on the **Start backup**-button
    [![start_backup_progess.png](img%2Fstart_backup_progess.png)](img%2Fstart_backup_progess.png)

This action does not start the backup process immediately, it will be started as a background process. After a short while, you can see under the **checks**-tab the status of the backup checks, as well as the snapshots of each database and path item in the **Snapshots**-tab

Command Line Interface
----------------------

[](#command-line-interface)

CommandDesc`bin/console muckiware:backup:check `Checks a backup repository`bin/console muckiware:backup:create `Creates a new backup by backup repository configuration`bin/console muckiware:backup:forget `Removes snapshots of a backup repository by forget parameters`bin/console muckiware:backup:snapshots `Gets a list of snapshots in a backup repository id`bin/console muckiware:backup:restore  `Restore data by backup repository id and snapshot id`bin/console muckiware:db:dump `Creates just a database dump by global plugin setups### Cronjob

[](#cronjob)

You can create a cronjob for to create a backup automatically. This should be the usual configuration for creating backups. The cronjob should be executed by the user which is running the shopware instance. The following command is an example for the cronjob configuration:

```
* 3 * * * php /var/www/html/bin/console muckiware:backup:create
30 5 * * * php /var/www/html/bin/console muckiware:backup:forget
```

The first row creates a backup every day at 3:00 am. The second row removes old snapshots every day at 5:30 am.

Database dumps
--------------

[](#database-dumps)

Backups via command line interface are possible with the following commands:

```
bin/console muckiware:db:dump
```

Option backup typeDesccompleteDatabaseSingleFile (default)Backup the complete database as single file. The backup is stored in the directory `var/backup/db/` with the filename `YYYY-MM-DD_HH-MM-SS_db_backup.sql.gz`completeDatabaseSeparateFilesBackup the complete database as single file for each database table. The backup is stored in the directory `var/backup/YYYY-MM-DD` with the filename `YYYY-MM-DD_HH-MM-SS_tablename.sql.gz`This command execute a backup of the database. The backup is stored in the directory `var/backup/db/` with the filename `db_backup_YYYY-MM-DD_HH-MM-SS.sql.gz`

Restore
-------

[](#restore)

As long as the shopware instance is running, you can restore the backup data via cli like this:

```
bin/console muckiware:backup:restore 019403b49bed7109a1e238139fb759c5 8888ec40
```

Or you can choose the snapshot id from the list of snapshots in the administration panel.

- Settings -&gt; Extensions -&gt; Backup Repositories
- Select the backup repository
- Click on the Snapshots-tab
- And select in die list of snapshots the snapshot id for to restore the data. [![select_snapshot_for_restore.png](img%2Fselect_snapshot_for_restore.png)](img%2Fselect_snapshot_for_restore.png)This action will start the restore process of the backup data as a background process.

But if the shop instance is not running anymore, you can use the native restic commands for to restore the backup data.

```
restic -r /srv/restic-repo restore 79766175 --target /tmp/restore-workdir
```

Checkout the description of the restic command for more information. [https://restic.readthedocs.io/en/stable/050\_restore.html#](https://restic.readthedocs.io/en/stable/050_restore.html#)

Database cleanup
================

[](#database-cleanup)

This command offers a more effective option to clean up database tables as the origin Shopware function and free up more memory.

Cart Cleanup
------------

[](#cart-cleanup)

```
bin/console muckiware:table:cleanup cart
```

Example
-------

[](#example)

- Database table overview of cart before cleanup
    [![before_cart_cleanup.png](img%2Fbefore_cart_cleanup.png)](img%2Fbefore_cart_cleanup.png)
- Execute the cleanup command
    [![execute_table_cart_cleanup.png](img%2Fexecute_table_cart_cleanup.png)](img%2Fexecute_table_cart_cleanup.png)
- After the cleanup, the table cart has become correspondingly much smaller size as before.
    [![after_cart_cleanup.png](img%2Fafter_cart_cleanup.png)](img%2Fafter_cart_cleanup.png)The maximum number of days that should remain in the cart table can be set in the plugin configuration.

\## Log\_Entry Cleanup ```shell bin/console muckiware:table:cleanup log\_entry ``` Testing
=======

[](#testing)

phpstan
-------

[](#phpstan)

### Install

[](#install)

Install phpstan, if required

```
cd custom/plugin/MuckiFacilityPlugin
composer install
```

### Execute

[](#execute)

```
cd custom/plugins/MuckiFacilityPlugin
composer run-script phpstan
```

Unit test
---------

[](#unit-test)

### Execute first time

[](#execute-first-time)

```
./vendor/bin/phpunit --configuration="custom/plugins/MuckiFacilityPlugin" --testsuite "migration"
```

### Execute regular run

[](#execute-regular-run)

```
./vendor/bin/phpunit --configuration="custom/plugins/MuckiFacilityPlugin"
```

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance87

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.6% 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 ~184 days

Total

3

Last Release

118d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db36d57be24eeb9cf56e10da50642eaec93e26e1e25e5b6a4b37f8c05d662b4c?d=identicon)[tfreyda](/maintainers/tfreyda)

---

Top Contributors

[![tfreyda](https://avatars.githubusercontent.com/u/186907299?v=4)](https://github.com/tfreyda "tfreyda (39 commits)")[![torstenfreyda](https://avatars.githubusercontent.com/u/6287480?v=4)](https://github.com/torstenfreyda "torstenfreyda (10 commits)")

---

Tags

backupshopware6-pluginpluginsnapshotbackupstoragerepositoryrestoreshopware6restic

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/muckiware-facility-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/muckiware-facility-plugin/health.svg)](https://phpackages.com/packages/muckiware-facility-plugin)
```

###  Alternatives

[gliterd/backblaze-b2

PHP SDK for working with backblaze B2 cloud storage.

84263.3k8](/packages/gliterd-backblaze-b2)[cwhite92/b2-sdk-php

A SDK for working with B2 cloud storage.

74146.6k2](/packages/cwhite92-b2-sdk-php)[obregonco/backblaze-b2

An SDK for working with B2 cloud storage.

2732.9k](/packages/obregonco-backblaze-b2)[innoge/laravel-rclone

A sleek PHP wrapper around rclone with Laravel-style fluent API syntax

174.1k](/packages/innoge-laravel-rclone)

PHPackages © 2026

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