docs: add database restoration guide and default backup commands

This commit is contained in:
Mauricio Siu 2025-03-16 21:51:00 -06:00
parent b73344c3a1
commit b4d796935c
2 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,45 @@
---
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 `Restore` tab within your Dokploy dashboard. Heres what youll 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, they should work, other formats are not guaranteed to work.
## Default Backup Commands
### 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"
```

View File

@ -4,7 +4,7 @@ import { useId } from "react";
import NumberTicker from "./ui/number-ticker";
const statsValues = {
githubStars: 17500,
githubStars: 18100,
dockerDownloads: 1000000,
contributors: 135,
sponsors: 45,