What is a Database Backup?

A database backup is a copy of your database stored separately so it can be restored if something goes wrong. CloudSonic backs up all databases daily with one click restore included.

CloudSonic
CloudSonic
Last Updated September 10, 2026

TL;DR Database Backup

A database backup is a copy of your database captured at a specific point in time and stored separately from the live database so it can be restored if something goes wrong. Databases hold everything that makes your website dynamic, including posts, pages, user accounts, orders, settings, and plugin data. If your database is corrupted, accidentally deleted, or compromised by an attack, a recent backup is the difference between a quick recovery and losing everything. CloudSonic runs automated daily database backups for every hosted site, storing copies both on the platform and externally to Backblaze B2 for double redundancy. You can restore a database with one click from your dashboard without needing to touch a terminal or contact support.

Note A backup stored on the same server as your database is not a real backup, it will be lost in the same failure that destroys the original.

How a Database Backup Works

A database backup captures the complete state of a database at a specific point in time and writes it to a file that can be stored and later used to restore the database to that state. For relational databases like MySQL, MariaDB, and PostgreSQL, this is typically done using a dump utility that exports all tables, records, indexes, and relationships into a structured SQL file. This file can then be imported into a fresh database to recreate the original state exactly. Backups can be full, capturing everything, incremental, capturing only what has changed since the last backup, or differential, capturing what has changed since the last full backup. For most web hosting scenarios a daily full backup is the standard approach because it simplifies restoration. The backup file is then compressed and transferred to a separate storage location, ideally on entirely different infrastructure from the server being backed up, so that a server failure does not take the backup with it.


# Dump a single MySQL database
mysqldump -u dbuser -p mydatabase > mydatabase-$(date +%F).sql

# Dump and compress in one step
mysqldump -u dbuser -p mydatabase | gzip > mydatabase-$(date +%F).sql.gz

# Dump a PostgreSQL database
pg_dump -U dbuser -d mydatabase -F c -f mydatabase-$(date +%F).dump

# Restore a MySQL dump
mysql -u dbuser -p mydatabase < mydatabase-2026-09-01.sql

# Restore a PostgreSQL dump
pg_restore -U dbuser -d mydatabase -F c mydatabase-2026-09-01.dump

Why Database Backups Matter for Your Website

Your database is the most irreplaceable part of your website. The files, themes, and plugins can be reinstalled from scratch. The database cannot. It contains every post, page, comment, user account, order, and configuration setting your site has ever accumulated. A corrupted database, an accidental deletion, a botched plugin update, or a successful attack can destroy all of that in an instant. Without a recent backup, recovery from a database failure can mean starting from zero. With a recent backup, recovery is a matter of minutes. The backup frequency matters as much as the existence of backups. A backup from six months ago protects you from catastrophic loss but means losing six months of content and orders. A daily backup limits that loss to at most 24 hours. For ecommerce sites processing orders continuously, even that window has a cost, which is why CloudSonic's managed database backups run daily and are stored in two separate locations.

Frequently Asked Questions on Database Backup

How often should I back up my database?

Daily backups are the minimum for any active website. For ecommerce sites processing orders continuously, the question is how much data loss is acceptable. A daily backup means potentially losing up to 24 hours of orders in a worst case scenario. High-volume stores should consider more frequent backups or a replication setup that keeps a continuously updated copy of the database available.

Where should database backups be stored?

Never only on the same server as the database being backed up. A server failure that corrupts or destroys the database will take local backups with it. Backups should be stored on separate infrastructure, ideally in a different geographic location. CloudSonic stores backups both on the platform and externally to Backblaze B2 for exactly this reason.

How do I restore a database backup on CloudSonic?

From your CloudSonic dashboard you can restore a database backup with a single click without needing to use the command line or contact support. You can restore the full database, a specific database only, or individual files depending on what you need to recover. The restore process overwrites the current database with the selected backup point.

Does a database backup include my WordPress files?

A database backup contains only the database, which holds your content, settings, and user data. Your WordPress files including themes, plugins, uploads, and core files are separate. CloudSonic backs up both your database and your files as part of the daily backup so a full site restore is possible from a single backup point.