PHPackages                             grossberger-georg/typo3-snapshot - 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. [Database &amp; ORM](/categories/database)
4. /
5. grossberger-georg/typo3-snapshot

ActiveTypo3-cms-extension[Database &amp; ORM](/categories/database)

grossberger-georg/typo3-snapshot
================================

Create and restore database and fileadmin snapshots

v1.2.1(5y ago)31.7k[2 issues](https://github.com/garfieldius/typo3-snapshot/issues)[2 PRs](https://github.com/garfieldius/typo3-snapshot/pulls)Apache-2.0PHP

Since Jun 11Pushed 3y agoCompare

[ Source](https://github.com/garfieldius/typo3-snapshot)[ Packagist](https://packagist.org/packages/grossberger-georg/typo3-snapshot)[ RSS](/packages/grossberger-georg-typo3-snapshot/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (7)Versions (10)Used By (0)

TYPO3 snapshot
==============

[](#typo3-snapshot)

This is a TYPO3 extension for creating snapshots of the current installation on the CLI. It can create and restore them, make stubs for bigger file assets and anonymize DB data.

**IMPORTANT**: Currently this works with MySQL or compatibles only!

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

[](#installation)

Use composer to add it `composer require grossberger-georg/typo3-snapshot` or load from TER and install it in the Extension Manager.

The programs `tar` and `gzip` must be available in `$PATH` / `%PATH%`.

Usage
-----

[](#usage)

The extension will add two new commands: `snapshot:create` and `snapshot:restore`. They can be invoked using the TYPO3 CLI script: `./vendor/bin/typo3 snapshot:create|restore`. If the bin-dir setting is changed in the composer.json manifest, the commands listed here must be run accordingly.

### Creating a snapshot

[](#creating-a-snapshot)

Running `snapshot:create` will create a snapshot inside the folder `snapshot/`, which is inside `ROOT_PATH/var` or `DOCUMENT_ROOT/typo3temp/var`, depending on the setup. A snapshot has a name, which is determined by the name of the folder its data is in.

The command takes an optional argument: the name of the snapshot to create. If no name is given, the current timestamp will be used and printed to stdout:

```
# Will create a snapshot in var/snapshot/dev/
vendor/bin/typo3 snapshot:create dev

# Will create a snapshot in var/snapshot/YYYYMMDDHHMMSS/
vendor/bin/typo3 snapshot:create
```

There are three additional switches:

FullShortDescription--files-fAdd data of local storage drivers to the snapshot. By default, this is the fileadmin--small-sEnsure a small snapshot by creating stubs and only saving referenced files--anonymize-aAnonymize data in user tables. Defaults to sys\_log, be\_users, fe\_users and tt\_address#### The `--files` switch

[](#the---files-switch)

For each FAL storage using the Local Driver, a tar archive is created, containing all files inside it. In a typical installation, this is the content of the folder *fileadmin/*. Only the directory *\_processed\_* is excluded.

It will create a file named `[STORAGE_UID]--[STORAGE_NAME].tar.gz` for each storage using the Local driver. For the fileadmin, a snapshot will contain its content in the archive file `1--fileadmin.tar.gz`.

#### The `--small` switch

[](#the---small-switch)

This is an addition to `--files`. Adding the switch `--small` has no effect without `--files`.

It reduces the size of a snapshot via two simple measures:

**1. Creating stubs:**

This will reduce the size of files which are larger than 100KB.

In case of images in a web format (gif, png, jpg and webp), as well as PDF files, a placeholder is generated, containing only the file name as text. Images will be the same dimensions as their originals. PDFs will have only one page.

Other filetypes, like binary downloads, will have their content replaced with the MD5 checksum of the original content. Their size will be reduced to a fixed 16 bytes. This means that files like ZIPs or executables will not work anymore!

**2. Only adding referenced files**

The table `sys_file_reference` is checked if a file in a storage is actually used on the page. If it is not, it is not added to the snapshot.

#### The `--anonymize` switch

[](#the---anonymize-switch)

This will anonymize possibly sensitive data in the exported records by pseudonymization and removal of certain pieces of information.

Currently, it works out of the box with `sys_log`, `fe_user`, `be_users` and `tt_address`. Only fields with not-empty values will be processed, empty fields are are left empty.

In case of login information (fe\_users and be\_users), the fields containing the username and the password are not changed. This is because this information is functional and cannot be changed without possible side effects. Also internal fields, like the UID, will not be changed.

### Restoring a snapshot

[](#restoring-a-snapshot)

This will restore a snapshot inside the folder var/snapshot by importing the database and, if enabled via the switch, unpacking the files into the root of their storages:

```
# Restore latest snapshot, including files
vendor/bin/typo3 snapshot:restore --files

# Restore snapshot "dev" without files, database only
vendor/bin/typo3 snapshot:restore dev
```

In case the `name` argument is not set, the snapshot is determined by using the first entry of an alphabetically sorted list of available snapshots. By default, snapshots are named using a timestamp, so the latest will be used.

Without the switch `--files`, only the database is restored.

Credits
-------

[](#credits)

The anonymizer uses the following static data sets for its operations:

- Personal names are based on the docker names-generator:
- Company names are taken from the Fortune 500 List (2018):
- Hosts are the main domain names of the 100 biggest websites.
- Countries is the list of english country names from EXT:static\_info\_tables v6.7.4
- Cities is the list of country capitals from EXT:static\_info\_tables v6.7.4

License
-------

[](#license)

[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~86 days

Recently: every ~128 days

Total

7

Last Release

2009d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/705480?v=4)[garfieldius](/maintainers/garfieldius)[@garfieldius](https://github.com/garfieldius)

---

Top Contributors

[![garfieldius](https://avatars.githubusercontent.com/u/705480?v=4)](https://github.com/garfieldius "garfieldius (54 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/grossberger-georg-typo3-snapshot/health.svg)

```
[![Health](https://phpackages.com/badges/grossberger-georg-typo3-snapshot/health.svg)](https://phpackages.com/packages/grossberger-georg-typo3-snapshot)
```

###  Alternatives

[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[mautic/mautic-typo3

Add-on TYPO3 extension that enhances the "EXT:marketing\_automation" TYPO3 extension by connecting it to the Mautic Marketing Automation platform: Determine "Persona" from Mautic segments. Also provides additional services e.g. language synchronisation between Mautic and TYPO3.

236.3k](/packages/mautic-mautic-typo3)[stefanfroemken/mysqlreport

Analyze and profile your TYPO3 databases queries

1314.9k](/packages/stefanfroemken-mysqlreport)

PHPackages © 2026

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