Skip to content

feat!: remove the backup export/import - #6733

Merged
gharlan merged 4 commits into
6.xfrom
backups
Oct 9, 2026
Merged

gharlan merged 4 commits into
6.xfrom
backups

Conversation

@gharlan

@gharlan gharlan commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Removes the backup export/import from the core without replacement.

Why

  • Backups are runtime data, but the core isn't a backup tool: a PHP dumper running in a web request (timeouts, upload/memory limits, no consistency between DB and files, half-imported databases on failure) suggests a safety it can't deliver. mariadb-dump/mysqldump, hosting backups, phpMyAdmin/Adminer and tar/rsync do this better.
  • The file import extracted an uploaded tar into the project directory — a backend feature writing arbitrary files into the code base, the very thing 6.x moved away from by taking templates/modules out of the backend.
  • The DB import insisted on a dump of the same major version, while with console migrate a dump from any earlier state is no problem at all.
  • It can be recreated as addon, but should not be part of the core

Replacement

Import a dump with the database client, then run console migrate:

mysql <db> < dump.sql
php bin/console migrate

Removed

  • Backend page Backup (export, upload/server import) and the backup[export] permission
  • Redaxo\Core\Backup\Backup, Tar, FileCompressor and the extension points BACKUP_BEFORE_DB_IMPORT/BACKUP_AFTER_DB_IMPORT
  • The cronjob type ExportType; existing jobs of that type show up as invalid in the cronjob list
  • console setup --db-setup=import and --db-import
  • splitbrain/php-archive
  • The now unused SQL dump helpers Database\Util::importDump()/splitSqlFile() and Sql::showCreateTable() (separate commit)

Other

  • Visual tests: the second setup run (only there to import the fixture) is gone. The instance installed via the migrate endpoint gets the fixture through the mysql client; core.lang moved into the fixture, as it was the only thing the second setup added.
  • merge-5x removes redaxo/src/addons/backup/ wholesale on merges from 5.x, like the former install addon.
  • Leftover backup files in var/data/core/backup/ of existing instances are not cleaned up.

Backing up and restoring the database or the files is left to the
tools built for it (`mariadb-dump`/`mysqldump`, hosting backups,
phpMyAdmin/Adminer, `tar`/`rsync`). To bring a dump into an instance,
import it with the database client and run `console migrate`
afterwards, which converges the schema from whatever state the dump
was taken in.

Removed: the backup backend page and its `backup[export]` permission,
`Redaxo\Core\Backup` (incl. the tar/gzip helpers and the
`BACKUP_BEFORE_DB_IMPORT`/`BACKUP_AFTER_DB_IMPORT` extension points),
the export cronjob type and the `import` mode of `console setup`
(`--db-setup=import`, `--db-import`). `splitbrain/php-archive` is no
longer required.

The visual tests import their fixture with the mysql client into the
instance installed via the migrate endpoint.
@gharlan gharlan added this to the REDAXO 6.0 milestone Oct 9, 2026
@rex-bot rex-bot added breaking feature Additional functionality labels Oct 9, 2026
gharlan and others added 3 commits October 9, 2026 10:31
Removes `Util::importDump()` and `Util::splitSqlFile()` (unused since the backup import and the addon `install.sql` files are gone) as well as `Sql::showCreateTable()` (only used by the backup export). Schemas are described and dumped via `Table`/`SchemaDumper` instead.
@gharlan
gharlan merged commit 042d804 into 6.x Oct 9, 2026
17 checks passed
@gharlan
gharlan deleted the backups branch October 9, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking feature Additional functionality

Development

Successfully merging this pull request may close these issues.

2 participants