# Plesk servers

> Back up Plesk subscriptions one by one, restore them, and give your customers a Backups page in Plesk.

On a Plesk server, Clokeep backs up each hosting account the way Plesk knows it: as a subscription.

## Prerequisites

- The agent installed on the Plesk server. The [install command](/docs/servers/install-agent) runs it as root, as Plesk requires.
- Plesk support, which Clokeep switches on for your [client](/docs/access/users-roles). Without it, the tab, the sync action and the plan type below do not appear.

## What Clokeep detects

A server whose **Control panel** is **None** switches to **Plesk** when its agent checks in. A server set to another panel keeps its setting and shows **Control panel mismatch**, with a **Set to Plesk** button for an Admin or Operator.

## The subscriptions list

Open the server's page and choose the **Plesk Subscriptions** tab. Each row shows a subscription, its **Status** and the plans that cover it.

<Frame caption="The Plesk Subscriptions tab of a test server.">
![The Plesk Subscriptions tab with two subscriptions, both in Plesk and covered by one plan](/images/docs/plesk-subscriptions.png)
</Frame>

The agent reads the subscriptions from Plesk when it starts, then every hour. As an Admin or Operator, to read them now, click **More actions** > **Sync Plesk subscriptions** on the server's page. The server must be **Online**.

Rows that a sync reported are read-only, because the next sync would overwrite an edit and bring back a deleted row. Only a row added by hand can be edited or deleted, by an Admin or Operator.

When a subscription is deleted from Plesk, its row stays. **In Plesk** shows a cross, and plans stop backing it up. A sync never deletes backups.

### Removed subscriptions

The last backup of a deleted subscription is kept for 90 days, then the plan's retention applies to it. See [Removed hosting accounts](/docs/backups/schedules-retention#removed-hosting-accounts).

The **Last backup** column says where each deleted subscription stands:

- "Removed from the server on" a date, then "Last backup kept until" a date.
- "Last backup kept forever."
- "The plan keeps all backups." when no plan holding its backups has **Keep backups for** or **Keep at most** set. No alert is sent for it.
- "Its backups now follow the plan's retention." once the time has run out.

To keep the last backup for good, click **Keep forever** on the subscription's row, as an Admin or Operator. The dialog reads "The last backup of this removed account is never released to the plan's retention. You can change this later." Click **Keep forever**.

To undo it, click **Stop keeping forever**. The dialog reads "The last backup is kept until the end of the grace period, and at least a week after a new notice. Then the plan's retention applies to it." Both changes are recorded in the **Audit Log**.

## Back up subscriptions

<Steps>
<Step title="Create a Plesk server plan">
Open **Plans** and click **New plan**. Choose the Plesk server, then set **Type** to **Plesk server**.
</Step>
<Step title="Choose the subscriptions">
Under **Back up**, pick **All subscriptions**, which includes subscriptions added later with all four components. Or pick **Selected subscriptions**, click **Add subscription** for each one and tick its components.
</Step>
<Step title="Choose how it is stored">
**Separate archive per component** stores one archive per component. With **Incremental** on, files and mail are incremental, and databases and settings are included in full every run.
</Step>
</Steps>

The four components:

- **Files**: the subscription's folder, without its `logs` folder.
- **Databases**: a dump of each database on the server's own MySQL or MariaDB. Others are skipped with a warning in the run log.
- **Mail**: each mailbox of the subscription, also one created since the last sync. If Plesk cannot be asked, the run log says a newer mailbox may be missing.
- **Settings**: the subscription's configuration, saved with Plesk's own backup tool. Its passwords are protected with a backup password that Clokeep keeps for the server. If the tool fails, the run log says so and a readable export is saved instead, which cannot be applied or recreate the subscription.

## Restore a subscription

As an Admin or Operator, in **Browse Backups**, pick a backup and click **Restore selected backup**, then tick the components to restore. What each component overwrites, and how to restore one mailbox, are on [Restore a Plesk or cPanel account](/docs/restores/hosting-account). On their own, **Settings** are only placed on the server, and the restore log gives the Plesk command to apply them.

In **Browse Backups**, **Apply the settings to the server** sets **Restore databases** to restore over the original databases only when the subscription was missing from Plesk at the last sync. A subscription that was still there keeps the choice you made, and a line under **Restore databases** says which case applies. See [Restore a Plesk or cPanel account](/docs/restores/hosting-account).

<Warning>
Restoring over the original databases empties each one first, also for a subscription that still exists. In [**Restore accounts**](/docs/restores/bulk-restore), which restores many at once, the switch selects **Decide for each account**: over the originals only for a subscription that was missing at the last sync, into new databases for the others.
</Warning>

### Bring back a deleted subscription

Tick **Settings** and switch on **Apply the settings to the server**. If Plesk no longer has the subscription, the agent creates it again from the backup, with its mailboxes, databases, database users, DNS records and original passwords. Then it restores the components you ticked into it.

- If its system user or folder is still on the server, the restore fails and names them. Remove them first.
- If its customer was deleted too, it comes back under the Plesk administrator, and the restore log says so.
- Without a free place in the Plesk licence, the restore fails with Plesk's message.

Without that switch, a missing subscription cannot get back files into its folder, mail, mailboxes or databases under their original names. Other folders and new database names work.

### Roll back a subscription that still exists

**Apply the settings to the server** leaves the settings of a subscription that Plesk still has unchanged, and the restore log says so. The components you ticked are still restored. To roll its settings back, also switch on **Also roll back a subscription that still exists**.

<Warning>
The rollback puts the subscription's settings (hosting and PHP options, DNS records, mail accounts) and every password (FTP, mailboxes, database users) back to the backup. Anything changed since that backup is lost.
</Warning>

## A Backups page for your customers

When Clokeep has switched the Backups page on for your client, your customers browse their own backups in Plesk and download files, folders, database dumps and mailboxes. They cannot restore, and settings are never included.

On the server's page, under **Backups plugin for customers**, switch on **On for this server** and click **Save changes**. If the note under the switch says it has no effect, the plugin is not switched on for your client. The status reads **Waiting** until the agent first reports, then **Installing**, then **Installed in Plesk**. **Failed** shows the reason, and the agent tries again every 10 minutes. Switch it off and the agent removes it. The extension needs Plesk 18.0.55 or later.

Customers find **Backups** under **Websites & Domains**. Downloads work while backup downloads are switched on for your client. Each link works once, for 10 minutes, and the file comes from your storage through the Clokeep panel. Encrypted backups cannot be downloaded there. To hide it from some customers, untick **Backups (Clokeep)** in a service plan's or subscription's permissions in Plesk.

## Next steps

<CardGroup cols="2">
<Card title="cPanel servers" href="/docs/servers/cpanel" icon="layers">
The same features on a cPanel server.
</Card>
<Card title="Agent updates" href="/docs/servers/agent-updates" icon="term">
See which agent version a server runs, and how it updates.
</Card>
</CardGroup>
