# Backups

> Back up a FeatherPanel server. File, database and full backups, ignored files, panel metadata, locking, restore with truncate, download, and FIFO rotation.

Source: https://featherpanel.com/docs/user/servers/backups/

Backups need `backup.read`; creating, restoring, downloading and deleting need `backup.create`, `backup.restore`,
`backup.download` and `backup.delete`. The page has two tabs: **Server backups** (archives made by
[FeatherWings](https://featherpanel.com/docs/wings/server-backups)) and **Database dumps**.

## Creating a backup

Create Backup, then pick a type:

| Type | Result | Counts toward the limit |
| --- | --- | --- |
| Server files | A Wings archive of the server files. | Yes |
| Databases | SQL dumps of all or selected databases written to `/.featherpanel-database-backups` on the server. | No |
| Full server | Dumps the databases and optional panel metadata, then archives everything. | Yes |

Options:

- **Ignored files:** gitignore-style patterns such as `*.log` or `logs/*`. Empty means the `.featherpanelignore` file
  in the server root is used.
- **Include panel metadata** (full backups): writes allocations, firewall rules, proxies, schedules, lifecycle hooks,
  subusers and more to `/.featherpanel-backup/`.
- **Include encrypted secrets:** adds decrypted custom variables, database passwords and proxy TLS keys to that
  metadata. Treat such a backup as sensitive.
- **Include activity log:** adds recent server activity.

## Managing backups

| Action | Notes |
| --- | --- |
| Restore | Overwrites files from the backup. Truncate Directory clears the server folder first. |
| Download | Download the archive. |
| Lock, Unlock | Locked backups cannot be deleted or restored. Bulk delete and FIFO rotation skip them. |
| Delete, Delete selected, Delete all | Delete all keeps locked backups. |
| Mark as interrupted | For a backup still creating after 24 hours. Marks it failed and unlocks it so you can delete it. |

## Limits and rotation

The maximum number of backups is set by your host and shown on the server's Settings page. When the limit is reached:

- **Hard limit:** new backups are refused until you delete one.
- **FIFO rolling:** the oldest unlocked backup is removed first.

If your host allows it, the Backup policy card in [Settings](https://featherpanel.com/docs/user/servers/startup-and-settings#settings) lets you
pick Inherit, Hard limit or FIFO. Pair FIFO with a [schedule](https://featherpanel.com/docs/user/servers/schedules) for a rolling window of
backups.

## Frequently asked questions

### How many backups can I keep?

Your host sets the limit. If FIFO rolling is on, the oldest unlocked backup is removed when you reach it, so new backups keep working.

### How do I exclude logs or caches?

Add gitignore-style patterns when creating the backup, or put them in a .featherpanelignore file in the server root. .pteroignore and .pelicanignore files are read too.

### Why can I not delete a backup?

It is locked. Unlock it first. Locked backups cannot be deleted or restored.
