# Contingency Plan

Hardening your phone system reduces risk, but no defense is perfect. A contingency plan keeps you ready to act fast if an attacker breaks through or the system goes down. Two policies do the heavy lifting: **Event Notification and Logging** keeps you informed of critical events as they happen, and **Backup and Archive** protects your data and configuration so you can recover from an outage or data loss.

## Event notification and logging

Cloud Voice can watch for system events, record them, and alert the right people the moment something noteworthy occurs. You decide which events to track, who gets contacted, how they are reached (email, a call to an extension, or a call to a mobile number), and what the message says.

:::tip
Set up at least one contact who is reached by phone (extension or mobile), not only by email. If an attacker has taken over the system or the mail server is down, a phone alert still gets through.
:::

1. Go to **System > Event Notification**.
2. On the **Event Type** tab, enable notifications for the events you care about. For each event you can set how serious it is (its level) and tailor the email template that gets sent.

   
   ![Cloud Voice, Event Type tab listing monitored system events with toggles and severity settings](/images/pbx/event-notification.png)

3. On the **Notification Contacts** tab, add the people who should receive event alerts.

   ![Notification Contacts tab where recipients for event alerts are added](/images/pbx/add-notification-contacts.png)

:::caution
Enabling an event is only half the job. If no notification contacts are added, Cloud Voice has nowhere to send alerts and critical warnings go unnoticed. Confirm at least one contact is listed here.
:::

Once an alert reaches you, open the web portal to review the full record at **System > Event Notification > Event Logs**.

![Event Logs page showing a history of recorded system events](/images/pbx/event-log.png)

:::note
Event Notification and Logging has its own detailed setup guidance in the administrator documentation, covering every event type and email template option in depth.
:::

## Backup and archive

Cloud Voice lets you back up the system's data and configuration, and go a step further by archiving those backup files to external storage. Together these reduce downtime and guard against data loss, helping your business stay running after a failure.

### Back up data and configuration

Run backups automatically on a schedule, or create one manually whenever you need it.

1. Go to **Maintenance > Backup and Restore**.
2. For automatic backups, click **Backup Schedule**, configure the task, and save it.

   ![Backup Schedule dialog for setting up recurring automatic backups](/images/pbx/schedule-backup-pce.png)

   :::tip
   Prefer a scheduled backup over a manual one. A schedule always leaves you a recent restore point without anyone having to remember to run it. Use a manual backup on top of that just before a big change (for example, before editing dial plans or trunks).
   :::

3. For a one-time backup, click **Backup**, select the data and configuration items to include, and save the task.

   ![Manual backup dialog with selectable data and configuration items](/images/pbx/manual-backup-pce.png)

:::note
For full details on backup options and behavior, see the backup and restore overview in the administrator documentation.
:::

### Archive backup files to an external server

For an added layer of protection, send your backups to third-party storage. Cloud Voice supports the following destinations:

- **FTP server** (File Transfer Protocol)
- **SFTP server** (SSH File Transfer Protocol, an encrypted version of FTP)
- **S3-compatible object storage** (works with Amazon S3, short for Simple Storage Service, and services that use the same API)
- **Google Cloud Storage bucket**
- **Microsoft SharePoint**

:::caution
Backup files contain sensitive configuration such as extension details and trunk credentials. Prefer an encrypted destination (SFTP, S3, Google Cloud Storage, or SharePoint) over plain FTP, which sends data unencrypted and can expose those secrets in transit.
:::

1. Go to **System > Archive**.
2. Click **Archive Server** to register a storage destination.

   ![Archive page with the control to add an archive server](/images/pbx/click-archive-server.png)

   :::tip
   Choose a destination that is not tied to the same infrastructure as your phone system. Keeping an offsite copy means a single failure, or a ransomware event, cannot take out both the system and its only backups.
   :::

3. Click **Add** to create and configure an archive task.

   ![Dialog for creating and configuring a new archive task](/images/pbx/add-archive-task.png)

   :::note
   These are two separate steps. Registering an archive server (step 2) only stores the connection details for the storage destination. The archive task (step 3) is what actually copies your backup files to that destination on a schedule, so backups are not sent anywhere until a task exists.
   :::
