# Working with NetBox Cloud Database Backups (/docs/cloud/console-administration/working_with_database_backups)





















Data integrity and security is a primary focus at NetBox Labs, and with our robust NetBox database backup features, you can rest assured that your data remains secure and easily recoverable. Scheduled backups take place automatically and all backups are encrypted at rest and in transit to offsite storage. From within the NetBox Labs [Console](https://app.netboxlabs.com/), you can easily access and manage the backups of your NetBox Cloud database, and are able to perform the following actions:

* View a list of all available database backups
* Take an 'On Demand' backup at any time
* Download a local copy of a specific backup file
* Restore your NetBox Cloud instance from a database backup

## View a List of Available Database Backups [#view-a-list-of-available-database-backups]

1. Login to the NetBox Labs [Console](https://app.netboxlabs.com/) and navigate to the NetBox instance you wish to manage and click the **Settings** button in the top-right corner:

   <img alt="select netbox instance" src="__img0" />

2. From here navigate to the **Backup** tab. Here you can view a list of backups for that instance.

   <img alt="view list of backups" src="__img1" />

## Make an 'On Demand' Database Backup [#make-an-on-demand-database-backup]

1. From within the **Backup** tab, click on **Back up now**, on the right-hand side:

   <img alt="back up now" src="__img2" />

2. Select **Back up now** to confirm that you want to backup of the current version of NetBox Cloud

   <img alt="confirm backup" src="__img3" />

3. You will be notified that the back up has started, when complete the new back up will appear in the list:

   <img alt="on demand backup taken" src="__img4" />

## Download a Local Copy of a Backup File [#download-a-local-copy-of-a-backup-file]

1. From the **Backup** tab, click the the three dots next to the back up the backup file you wish to retrieve, and select the **Download** option:

   <img alt="download backup" src="__img5" />

2. Once the backup file has been prepared it will automatically be downloaded into the **Downloads** directory of your local computer's file system. Backup files are compressed using &#x2A;*zstandard (zst)** and will end in `.sql.custom.zst`.

## Restore From a Database Backup File [#restore-from-a-database-backup-file]

1. Identify the database backup you wish to restore from, click the three dots next to it and select the **Restore** option:

   <img alt="click restore" src="__img6" />

2. Select **Restore** to confirm the selection and begin the restore from the selected backup:

   <img alt="confirm restore" src="__img7" />

3. The restore process will take place in the background, and depending on the size of the database should take no longer than a few minutes to complete. Once the restore has completed, you can navigate to the on **Restore History** tab to view the list of database restores, and you will see your completed restore listed:

   <img alt="completed restore" src="__img8" />

4. Your database restore is now complete.

<Callout type="info">
  Once the database restore is complete your NetBox Cloud instance will restart, and you may briefly see a `503 - Service Unavailable` message when you browse to the Web interface. This is normal and will clear after a short while, after which you can log in again.

  Also, please be aware that the NetBox changelog will be empty when you first log in after a database restore.
</Callout>

## Working with Downloaded Backup Files [#working-with-downloaded-backup-files]

Downloaded backups are PostgreSQL custom-format dump files compressed with [zstandard (zstd)](https://facebook.github.io/zstd/). This format produces smaller, faster backups and is natively supported by `pg_restore`.

### Prerequisites [#prerequisites]

Ensure `zstd` is installed on your system before working with downloaded backups:

You will also need `pg_restore`, which is included with the [PostgreSQL client tools](https://www.postgresql.org/download/).

### Restoring a Backup Locally [#restoring-a-backup-locally]

Once you have downloaded a backup file (e.g. `backup.sql.custom.zst`), you can restore it to a local PostgreSQL instance using `pg_restore`:

`pg_restore --dbname=<database_name> backup.sql.custom.zst`

<Callout type="info">
  Unlike plain SQL archives, custom-format dumps cannot be restored with `psql`. Use `pg_restore` instead.
</Callout>

### Legacy Backup Format [#legacy-backup-format]

Backups created in the legacy approach using gzip-compressed plain SQL files ending in `.sql.gz` can be restored using `psql`:

### Example [#example]

`gunzip -c backup.sql.gz | psql <database_name>`

If you encounter any issues while working with database backups raise a support ticket by emailing the [NetBox Labs Support Team](mailto:support@netboxlabs.com)
