---
title: "How do I set up database and file backups?"
url: "https://ploi.io/documentation/database/how-do-i-set-up-database-and-file-backups"
published: "2026-09-29"
last_updated: "2026-09-29"
---

# How do I set up database and file backups?

Ploi can back up your databases and site files on a schedule and upload the archive to storage you choose, such as S3, Google Drive or an SFTP server. Setting it up takes two steps. First you add a backup configuration, which is where the backups go. Then you create a backup for one or more databases or sites that uses it. Backups are part of the Pro and Unlimited plans. On a team, the plan of the team owner counts.

### 1. Add a backup configuration

Open your profile and go to **Backup configurations**. Pick a type, give it a label and fill in the credentials. Ploi stores them encrypted. These types are available:

- AWS S3, DigitalOcean Spaces and Custom S3. Custom S3 works for any S3 compatible storage, such as UpCloud, Wasabi or a MinIO storage server. You need an access key, a secret and a bucket, and for Spaces and Custom S3 also the endpoint. For Spaces that is the region endpoint without the bucket name, for example `https://fra1.digitaloceanspaces.com`.
- Dropbox and Google Drive. Link the account under **Integrations** in your profile first.
- SFTP, with an SSH key or a password, and FTP.
- Rclone, for any other storage rclone supports. You fill in the rclone flags and the remote destination, for example `:b2:mybucket/path`.
- Local, which keeps the archive on the server itself. That doesn't help when you lose the server, so use it next to a remote backup, not instead of one.

Step by step guides for some providers: [AWS](/documentation/database/how-to-add-aws-as-backup-provider), [DigitalOcean Spaces](/documentation/database/how-do-i-create-digitalocean-spaces-credentials-for-database-backups), [UpCloud](/documentation/database/how-do-i-configure-upcloud-object-storage-as-backup-provider), [MinIO](/documentation/storage-server/how-do-i-backup-to-my-minio-storage-server) and [the Google Drive folder ID](/documentation/database/where-do-i-get-google-drive-folder-id).

To use the same credentials with another bucket, click **Duplicate** on the configuration. You enter the new bucket, or the new remote for rclone, and Ploi copies the type and credentials over.

A configuration is shared by every backup that uses it. Changing its type changes it for all of those backups, and deleting the configuration deletes those backups too. The files already on your storage stay there.

On a team, backups always use the backup configurations of the team owner.

### 2. Create a backup

Click **Backups** in the sidebar. The page has a **Databases** tab and a **Sites** tab. Click **Create database backup** for databases, or create a site file backup from the Sites tab. The form asks for:

- The server and the backup configuration.
- The databases or sites to back up. You can select several at once. **Select all without backups** picks everything that doesn't have a backup yet.
- The interval. Database backups can run every night, every 10 to 60 minutes, every 2, 4, 8, 12 or 24 hours, weekly or monthly. File backups run every hour at most. Monthly means every 43,800 minutes, so the date moves a little each month.
- The start time of the first run, in the timezone of your profile. Every next run is the start time plus the interval.
- **Keep amount of backups**. With 7, Ploi deletes the oldest file on the storage when there are more than 7. With 0 it keeps every file.
- For a site, the path to back up. It starts as the site directory and you can narrow it to a folder inside it.

Optional settings are a path on the storage, tables to exclude for databases, folders and files to exclude for sites, such as `storage/*` or `node_modules/*`, a ZIP password, a custom file name, ZIP or TAR compression and whether to delete the local archive when the upload fails.

Click **Create**, or **Create and run** to make the first backup right away. That extra run doesn't change the schedule.

For FTP and Rclone, the create form doesn't show **Keep amount of backups**. Create the backup first and set it with **Edit**.

### What happens during a backup

Ploi checks every five minutes which backups are due, so a backup starts up to a few minutes after its scheduled time. A run that takes longer than 60 minutes is stopped.

For a database, Ploi makes a dump with `mysqldump` or `pg_dump` in `/home/ploi/.ploi` on the server. MySQL and MariaDB dumps use `--single-transaction`, so the tables stay writable during the backup. For a site, Ploi archives the files as the site's system user in that user's home directory. On a site with zero downtime deployment, the archive contains the deploy directory with its releases. Ploi then uploads the archive and removes it from the server.

Because the archive is built on the server first, the server needs enough free disk space to hold it.

### Good to know

- A file backup stops when the site's system user can't read some of the files. The error lists up to ten of those paths. Make them readable for the site user, for example with **Reset permissions** on the site's **Manage** page, and run the backup again.
- A ZIP password can't contain `&`, `@` or `$`, and you can't change it after you create the backup. Use **Request ZIP password** in the edit screen to get it by e-mail. TAR archives don't support a password, so pick ZIP when you need one.
- With a custom file name, every run uploads a file with that same name, so each backup replaces the previous one. Leave **Keep amount of backups** at 0 when you use a custom name.

### Failures and notifications

When a backup fails, the table shows **Failed** with the number of attempts. Click it to read the error. Ploi e-mails the server owner about the failure. After 5 failed runs in a row, Ploi pauses the backup. Fix the cause, then switch **Pause** off again, which also resets the attempt counter. A backup that waits in the queue for more than an hour is marked as stuck and paused as well.

To get messages in Slack, Discord or another channel, click **Notifications** on the backup. Pick a notification channel and an event: before the backup, after the backup or when it fails. When you add a channel for failed backups, it replaces the e-mail.

### Managing backups

Every backup in the table has **Run**, **Pause**, **Edit**, **Notifications** and **Delete**. You can filter the tables by server, status, backup configuration and interval. Deleting a backup removes the schedule in Ploi. The files on your storage stay where they are.

Database backups also have **Files**, which lists the stored backups and lets you restore one, see [How do I restore a database backup?](/documentation/database/how-do-i-restore-a-database-backup) Restoring from the panel isn't available for FTP and SFTP backups. Site file backups can't be restored from the panel, download the archive from your storage and extract it on the server.

### When a payment fails

When the payment for your subscription fails three times, Ploi stops starting automatic backups. Nothing is deleted. The backups start again on their own once the payment goes through.