Home › Documentation › Restores › Database restore
Database restore
Database restores are started from the console under Restore › Databases or from the command line on the database server.
SQL Server
| Option | Description |
|---|---|
| Restore point | Any full or differential backup |
| Point in time | Any moment covered by an unbroken log chain |
| Destination | Original database, a new database name, or another instance |
| Recovery state | RECOVERY (ready to use) or NORECOVERY (to apply further logs yourself) |
cbk sqlserver restore --database Sales --to-time "2026-09-28 14:35:00" --as Sales_Restore
Restoring over an existing database requires --replace. The agent takes a tail-log backup first unless --no-tail is given.
A database can be restored to the same or a later version of SQL Server, not an earlier one. If point-in-time restore reports a broken chain, see KB-1057.
PostgreSQL
Logical backups restore a single database with pg_restore:
sudo cbk postgresql restore --database sales --point 2026-09-28 --as sales_restore
The target database is created if it does not exist. Roles must exist first; restore globals with --globals if needed.
Physical backups restore the whole cluster to a point in time:
sudo systemctl stop postgresql
sudo cbk postgresql restore --cluster --to-time "2026-09-28 14:35:00+01" --data-dir /var/lib/postgresql/16/main
sudo systemctl start postgresql
The agent restores the base backup, writes recovery settings and makes the WAL available. PostgreSQL replays WAL on start-up until the target time. The data directory must be empty.
MySQL and MariaDB
sudo cbk mysql restore --database sales --point 2026-09-28 --as sales_restore
With binary log capture enabled, add --to-time to replay binary logs up to a moment. Replay applies to the whole server's binary log filtered to the database, so it is slower than the dump restore itself.
Restoring to a different server
Install the agent on the destination server, register it in the same tenant, and choose the original server as the source in the console's restore wizard. The destination must have the application agent enabled.
Downloading a backup instead
SQL Server backups can be downloaded as .bak files and logical PostgreSQL and MySQL backups as dump files, from Restore › Databases › Download.
Testing
A restored copy under a different name is the simplest test. Run your application's consistency checks against it (DBCC CHECKDB for SQL Server).