Contensio logo

Backups

Create, download, and restore full-site backups — database and media files — directly from the admin panel or the command line.

Go to Tools → Backups in the admin sidebar to manage backups.

A Contensio backup is a single ZIP file that contains:

  • Your entire database — all tables, all content, users, settings, everything.
  • Your media files — everything in storage/app/ — uploaded images, documents, and other files (optional).

Creating a backup

  1. Go to Tools → Backups.
  2. Choose whether to include media files (checked by default).
  3. Click Create backup.

The backup runs on the server and appears in the Stored backups list when it's done. Click Download to save it to your computer.

Backups are stored in storage/app/backups/ on your server. Download a copy and keep it somewhere safe — do not rely on a backup stored on the same server as your site.

Full backup vs database-only

Option What's included When to use
Full backup (default) Database + all media files Before a major upgrade or migration
Database only Database tables only Quick snapshot before a config change

Restoring a backup

Warning: Restoring overwrites your current database and replaces media files (for full backups). It cannot be undone. Create a fresh backup first if you're not sure.

  1. Go to Tools → Backups.
  2. In the Restore from file panel, upload a Contensio backup ZIP.
  3. Click Upload & validate — Contensio checks the file is a valid backup and shows you a summary.
  4. Review the backup details (site URL, date created, CMS version, table count).
  5. Enter your admin password to confirm.
  6. Click Restore now.

The restore runs immediately. When it completes you'll be redirected back to the Backups page with a confirmation message.

What gets restored

What Behaviour
Database All current tables are dropped and re-created from the backup's SQL dump
Media files Files in storage/app/ are overwritten with the backup's files (full backups only)
Config Not included — your .env and config/ files are never touched
PHP code Not included — core, theme, and plugin files are not changed

Stored backups

The Stored backups list shows every backup saved in storage/app/backups/. For each backup you can:

  • See the filename, size, creation date, CMS version, and type (Full / DB only).
  • Download the ZIP to your computer.
  • Delete it from the server (with a confirmation prompt).

Backups are listed newest first.


Command line

If you're comfortable with SSH, you can create and restore backups from the terminal. This is useful for automation, scheduled tasks, or large sites where a browser upload would time out.

Create a backup

# Full backup — database + media files
php artisan contensio:backup

# Database only
php artisan contensio:backup --no-files

The ZIP is saved to storage/app/backups/ and the path is printed on completion.

Restore a backup

php artisan contensio:restore storage/app/backups/backup-mysite-20260418-120000-full.zip

The command shows the backup details and asks for confirmation before proceeding. Use --force to skip the prompt (useful in deploy scripts):

php artisan contensio:restore backup.zip --force

Automating backups

Contensio doesn't schedule backups automatically, but it's straightforward to set one up using a cron job on your server:

# Run a full backup every day at 2 AM
0 2 * * * cd /var/www/mysite && php artisan contensio:backup >> /dev/null 2>&1

Then periodically download backups from the admin panel, or use a script to sync storage/app/backups/ to an off-site location (S3, Backblaze, etc.).


Frequently asked questions

How large will the backup be?

A database-only backup is typically a few megabytes. A full backup depends on how many media files you have — it can range from a few MB to several GB for media-heavy sites.

Can I restore a backup to a different server?

Yes. Upload the ZIP through the admin panel on the new server and restore it. The database and files will be replaced. Note that your .env settings (database connection, app URL, etc.) are not part of the backup — configure those separately on the new server before restoring.

Can I restore a backup from an older version of Contensio?

Generally yes — the SQL dump is plain SQL and restores regardless of CMS version. After restoring, run php artisan migrate to apply any migrations the older backup may be missing.

Where are backups stored?

In storage/app/backups/ inside your Contensio project directory. This path is excluded from future backups to prevent recursive growth.

The backup is taking a long time — is that normal?

For sites with large media libraries, yes. The backup compresses all files into a ZIP, which can take a few minutes. The admin panel backup runs synchronously (in the browser request), so very large sites are better handled via the command line where there's no HTTP timeout.