# Full Backups

A full backup contains a complete copy of a database.

## Make a Full Backup

To make a full backup, run the [BACKUP DATABASE](https://docs.singlestore.com/db/v9.1/reference/sql-reference/operational-commands/backup-database.md) command. Specify the name of the database to back up, followed by the directory on disk where the backup will reside. The following example makes a backup of `test_db` and stores it in the `/test_db_backups_week_1` directory.

```sql
BACKUP DATABASE test_db to "/test_db_backups_week_1";

```

`BACKUP DATABASE` outputs one row containing the `BACKUP_ID` column. This column contains the id of the backup that was just made.

You can view the history all of the backups made in the cluster by querying `information_schema.mv_backup_history`. The output of the following query assumes that only one backup was made.

```sql
SELECT backup_id, incr_backup_id, database_name, start_timestamp
    FROM information_schema.mv_backup_history
    ORDER BY backup_id;

```

```output

+-----------+----------------+-----------------+---------------------+
| backup_id | incr_backup_id | database_name   | start_timestamp     |
+-----------+----------------+-----------------+---------------------+
|         1 |           NULL | test_db         | 2019-08-04 00:00:00 |
+-----------+----------------+-----------------+---------------------+

```

You cannot save a full backup to a directory that already contains a full backup. Instead, save the full backup in a different directory or delete the contents in the original directory.

## Restore a Full Backup

> **📝 Note**: Release 6.8 and earlier backups cannot be restored into the 7.8 and later releases.

To restore a full backup, use the [RESTORE DATABASE](https://docs.singlestore.com/db/v9.1/reference/sql-reference/operational-commands/restore-database.md) command and specify the database name along with the directory where the backup is stored. The following example restores `test_db` from the `test_db_backups_week_1` directory.

```sql
RESTORE DATABASE 'test_db' FROM "/test_db_backups_week_1";

```

***

Modified at: July 13, 2023

Source: [/db/v9.1/manage-data/back-up-and-restore-data/types-of-backups/full-backups/](https://docs.singlestore.com/db/v9.1/manage-data/back-up-and-restore-data/types-of-backups/full-backups/)

(An index of the documentation is available at /llms.txt)
