---
title: Restore
description: "Learn how to restore your databases in Dokploy, with options for restoring from S3 buckets."
---



## Restoring from S3 Buckets

To restore your database from an S3 bucket, navigate to the `Backup` tab and click on the `Restore` button within your Dokploy dashboard. Here’s what you’ll need to set up:

- **Select Source S3 Bucket**: Specify the S3 bucket where your backup files are stored.
- **Search for Backup File**: Enter the name of the backup file you want to restore(it will autocomplete based on the files in the bucket)
- **Database Name**: Enter the name of the database you want to restore to.
- **Restore Database**: Click the `Restore` button to start the restoration process.

If you previously used the backups generated by dokploy, it will automatically use the correct commands to restore your database.

Other formats are not guaranteed to work.

<Callout type="info">
    If you have nested folders in your S3 Bucket, you can start typing the folder name and it will autocomplete.

    eg. If you have a folder called `backups` and you have a backup file called `backup.sql.gz`, you can start typing `backups/` and it will autocomplete to `backups/backup.sql.gz`.
</Callout>





## Default Backup Commands

This are the default commands that Dokploy uses to generate the backups.

### Postgres

```bash
pg_dump -Fc --no-acl --no-owner -h localhost -U ${databaseUser} --no-password '${database}' | gzip"
```

### MySQL

```bash
mysqldump --default-character-set=utf8mb4 -u 'root' --password='${databaseRootPassword}' --single-transaction --no-tablespaces --quick '${database}' | gzip"
```

### MariaDB

```bash
mariadb-dump --user='${databaseUser}' --password='${databasePassword}' --databases ${database} | gzip"
```

### MongoDB

```bash
mongodump -d '${database}' -u '${databaseUser}' -p '${databasePassword}' --archive --authenticationDatabase=admin --gzip"
```

