# Backup and Restore

https://docs.wisecp.com/en/backup-and-restore

Back up the database, files and uploads on demand or on a schedule, and restore them when you need to.

## Opening the Screen

In the left menu, click **Settings**, then **Security**, then **Backup** in the tab row.

Address: `{admin}/settings/security?general=backup`

The screen has four sub-tabs: **Settings**, **Backups**, **Schedules**, **Remote Storage**. Add `&backup=backups`, `&backup=schedules` or `&backup=storage` to open one directly.

## What Is on the Screen

### Settings

**System Compatibility** checks the PHP features backups need and opens a details list if something is missing. **Disk Usage** shows free and used server space as a bar. Below them sit the **Backup Settings** card and a two-tab **Exclusions** card.

### Backups

Lists every backup with **Backup**, **Destination**, **Created** and **Status** columns. Each row badges its contents (Database/Files/Uploads), and a running backup shows a progress bar. The **Create Backup** button above starts one on demand.

### Schedules

Lists backups that run on their own, with **Name**, **Frequency**, **Destination**, **Next Run** and **Status** columns. The **Create Schedule** button above opens a new one.

### Remote Storage

Lists the destinations backups can upload to, with **Name**, **Type**, **Created** and **Status** columns. The **Add Destination** button above connects a new provider.

## Fields

### Settings Tab

- **Backup System**: Turns backups on or off. Turning it off asks for confirmation. While off, no backups run and existing ones stay.
- **Backup Directory**: A path relative to the installation root, empty defaults to `backups`. The box checks the path as you type.
- **Excluded Paths**: Check the folders and files to leave out of file backups from the tree.
- **Excluded Tables**: Check tables to leave out of database backups; structure stays, data does not. The list starts with the largest table, so the ones actually inflating your backup sit at the top.

### Create Backup Window

- **Remote Destination**: Defaults to **Local Only**. Only validated destinations appear in the list.
- **Contents**: **Database**, **Files**, **Uploads** cards, all checked by default. With Files selected, Uploads is bundled into it.
- **Keep local copy after upload**: Appears once you pick a remote destination. Turn it on and the file also stays on the server.

### Schedule Window

- **Name**: Required. Identifies the schedule in the list and in the backup history.
- **Enabled**: On by default. Off means it never runs; use Create Backup for a one-off.
- **Notify when finished**: On by default. Emails the default recipient — usually the oldest admin, not you. The finished backup also shows up in that admin's panel bell; its View button opens the Backups tab.
- **Remote Destination**: Defaults to **Local Only**; same list as the Create Backup window.
- **Frequency**: **Hourly**, **Daily**, **Weekly** or **Monthly**; fields below change with your choice.
- **Time**: Appears for every frequency except Hourly, defaults to 03:00.
- **Day of Week**: Appears for Weekly.
- **Day of Month**: Appears for Monthly, between 1 and 31.
- **Retention Count**: Required, at least 1, defaults to 7. Older copies beyond this number are removed automatically.
- **Keep local copy after upload**: Appears once you pick a remote destination; turn it on and the file also stays on the server.

### Add Destination Window

- **Provider**: FTP, SFTP, Google Drive, OneDrive, Yandex Disk or Bunny Storage; shown when adding, not when editing.
- **Name**: Required. Identifies the destination in the list and pickers.
- **Connection Details**: Vary by provider: host, username and password for FTP/SFTP, an authorization window for cloud providers.

### Restore Window

- **What to Restore**: Shows only the parts the backup holds, all checked by default.
- **Enter your account password to confirm**: Required. Confirms that you are the one starting this action.

## Tasks

### Turning On and Configuring Backups

1. On the **Settings** sub-tab, switch on **Backup System**.
2. Change **Backup Directory** if needed, and check paths or tables to skip under **Exclusions**.
3. Click **Save** below the card. Every backup after this uses these settings.

### Creating and Downloading a Backup

1. On the **Backups** sub-tab, click **Create Backup** — disabled if the system is off or busy.
2. Pick a **Remote Destination** if you want one, check the **Contents** cards, and click **Create Backup** below.
3. Once the row reaches **Ready**, open its menu and choose **Download**. Enter your password and click **Download** below it; it starts in a new tab.
4. If it fails instead, choose **Retry** from its row menu to try again.

### Restoring From a Backup

1. Open the menu of a **Ready** row and choose **Restore**.
2. Check what to restore, enter your password, and click **Restore** below it.
3. The request queues and starts on the next cron run; track it on the same row. Cancel one that has not started with **Cancel Restore** from the row menu.

### Creating a Schedule

1. On the **Schedules** sub-tab, click **Create Schedule**.
2. Enter a **Name** and pick a **Frequency**, filling the time/day fields it shows. Choose **Contents** and a **Remote Destination** if you want one.
3. Click **Create Schedule** below. To change one, choose **Edit schedule** from its row menu.

### Adding a Remote Storage Destination

1. On the **Remote Storage** sub-tab, click **Add Destination** and pick a provider.
2. Enter a **Name** and the connection details it asks for, then test them with **Validate**.
3. Once it passes, click the **Add Destination** button that opens. To change one, choose **Edit destination** from its row menu (only folder/path edits re-test it).
4. To re-check an existing destination later, choose **Validate** from its row menu.

### Deleting a Backup, Schedule or Destination

1. From the row menu, choose **Delete backup**, **Delete schedule** or **Delete destination**.
2. Enter your password and confirm. A running backup or an in-use destination cannot be deleted.

## Things to Watch

> **Restoring overwrites what is there now**
> 
> A safety backup is taken first, and the site stays in maintenance mode until the restore finishes. Restoring the database may end your session.

> **Deletion is permanent**
> 
> Deleting a backup, schedule or remote destination cannot be undone. Only active schedules block it — old backups can then lose their destination and Download.

> **Schedules depend on cron**
> 
> If cron is not running, scheduled backups do not start and queued restores stall.

## Required Privileges

Viewing the **Backup** tab and every action on it (create, download, restore, schedule, manage destinations) needs the **SECURITY_BACKUP** privilege.

## Related Articles

- [Security Settings Overview](https://docs.wisecp.com/en/security-settings-overview)
- [General Security Options](https://docs.wisecp.com/en/general-security-options)
