Hosting with 20% off when you buy through the link

Backups

Ask for a full backup of a site, with files, database and uploads, downloaded to your computer. When to make one, how to restore it and how to keep it safe.

A backup is a copy of the whole site frozen at one moment and kept off the server: the files, a full copy of the database (a dump, the database written out as a single file) and the uploads, zipped and downloaded to your computer. It's your way back when something goes wrong, and the kit for moving a site to another host.

It isn't the local copy you work on (see Client sites). That copy gets refreshed and leaves out personal data and secrets. A backup has everything; you store it and don't touch it.

Ask the AI

Make a full backup of the live site of Aquarela School: files, database and uploads. Download it to ~/Backups/aquarela, tell me its size, and delete the temporary copy from the server afterwards.

The AI uses the SSH connection saved in the project (its secure access to the server): it builds the archive on the server and downloads that single file.

What's in the archive

PartWhy it matters
The database dumpEverything in the database: posts, pages, terms, media records, settings, admin users and, where the site has them, form submissions, members and orders. This is the content.
storage/The media files (storage/uploads/) and the files attached to form submissions. Without the uploads, every image breaks after a restore. The cache is left out: it rebuilds itself.
theme/The structure (site.json), the templates and the look.
.env, .htaccess, robots.txt, .velk-versionThe settings and the version marker. .env holds the database password and the site's keys.
The engineIt comes along, though it's the one part that could be downloaded again from releases.velkcms.com.
What the AI runs
# on the server, in the site's folder $ mysqldump -u USER -pPASS DBNAME > db-backup.sql $ zip -r /tmp/velk-backup.zip . -x './storage/cache/*' # from your computer $ scp user@host:/tmp/velk-backup.zip ./velk-backup-20261024.zip
The database details are read on the server, from the site's own .env. For a site on your computer, the AI runs the same dump and zip in the project folder.

Hosting without SSH

Without SSH the AI can't build the archive on the server, so the clicks are yours: export the database in phpMyAdmin (the database tool most hosting panels include), in SQL format, and download by FTP at least theme/, storage/uploads/ and .env. The AI can guide you through each step.

When to make one

  1. Before updating Velk

    The update replaces the engine and adjusts the database, and it doesn't back up anything itself.

  2. Before a big change in the structure

    New content types, renamed fields, a new home page.

  3. Before working straight on the server

    There, every mistake happens on the live site.

  4. Before moving to another host

    The backup is the moving kit.

  5. Every so often, for no reason

    So the latest backup is always a recent one.

Restoring

  1. Put the files on a host

    Any host with PHP 8.2 or newer and MySQL. Unzip the archive in the site's folder.

  2. Import the database

    Create a database and import the dump into it.

  3. Point .env at it

    Fill in the new database's details, and set APP_URL, the site's address, to where it now lives.

  4. Open the site

    The migrations (the steps that adjust the database to each version) are already applied in the dump, so there is nothing to re-run.

Ask the AI

Restore the backup velk-backup-20261024.zip on my computer, in a new database called aquarela_restore, so I can check that it works. Before I open it, switch off the tracking scripts and clear the form recipients in that copy.

A restored backup is a full copy of production: unlike the local copy, it comes with the form recipients and the client's tracking scripts.

Good to know

  • Files and database from the same moment. A database from today with an older site.json can point to fields the structure no longer declares. Back up both together.
  • Files alone don't bring a site back. The content lives in the database, and an installed site's files over an empty database don't rebuild it.
  • A large media library makes every archive large. Ask for storage/uploads/ to be backed up separately.
  • To automate it, ask the AI for a cron job (a task the server runs on a schedule) that dumps, zips and deletes old archives. Download one now and then: a backup that only lives on the server goes down with it.
  • “command not found” during a backup means the host keeps mysqldump somewhere unusual. Your hosting's support knows where.