Setting up S3 remote storage is essential for MT Manager tenants with limited storage capacity and for ensuring redundancy in data backup. By using remote storage, we can safeguard data against local storage failures and maintain data integrity through regular backups. This approach provides an additional layer of protection and reliability for your data.

How to Set Up External Storage Providers

  1. Navigate to the External Storage Providers module
  • In the main menu, go to ADMIN > Admin > External Storage Providers.
  1. Add a Storage Provider:
  • Click on the “Add Storage Provider” button. A dialog will appear for setting up the storage provider parameters.
  • Enter a unique name for the storage provider.
  • Select the Type: Select between “S3 Generic” or “SFTP” as the storage provider
    • S3 Generic Option: This option can be used for both backups and call recording files.
    • SFTP Option: This option can be used for CDR file uploading as well as to store and retrieve backups.
  1. Configure the storage parameter, these parameters depend on the Type you selected.
  2. Test and Save:
  • Use the “Test Parameters” button to verify the entered settings. Once confirmed, click the “Add Storage Provider” button to save the configuration.

Example: Setting Up S3 Remote Storage for CPBX5

In this example, we configure S3 remote storage for backups using a Synology bucket. The offer from Synology we used is C2 Object Storage, where we have created a bucket and the corresponding access key. We set the bucket name as “cpbx5” and created an access key with read and write access and provided a description.

IP PBX Phone Provisioning

With this created bucket, we used the provided Access Key ID and Secret Key to set the External Storage Provider in CPBX5 by following these steps:

1. Set an External Storage Provider:

  • Go to ADMIN > Admin > External Storage Providers in CPBX5.
  • Click Add Storage Provider.

2. Configure the Storage Provider:

  • Name: Enter a unique name for the storage provider. For this example, use “CPBX5_External_Backup”.
  • Type: Select S3 Generic from the list.
  • Endpoint: Enter the URL for your Synology S3-compatible storage. For Synology, it would typically look like https://s3.synologyc2.net/
  • Bucket: Enter the name of the bucket you created, which is cpbx5 in this example.
  • Access Key ID: Enter the access key ID provided by Synology.
  • Access Key: Enter the access key (password) provided by Synology.
  • Region: You can leave this field empty if not required by your storage provider.
  • Allow to backups: Set this to Yes to enable backups to this storage provider.
  • Allow to call recording: Set this to Yes if you want to use this provider for call recordings as well.
IP PBX Phone Provisioning

3. Test and Save:

  • Click Test Parameters to verify that the connection to your Synology S3 storage is working correctly. If successful, you will see the message: “Test Passed”.
IP PBX Phone Provisioning
  • If the test is successful, click Add Storage Provider to save the configuration.

Example: Performing a Backup and Restore

In this example, we will perform a backup of the CPBX5 system data and configuration. We will use the previously configured Synology S3 bucket named “cpbx5” as the remote storage destination. The backup will include call recordings and CDR records. After completing the backup, we will demonstrate how to restore the backup file stored in the external storage provider.

  1. Go to ADMIN > Admin > Backup & Restore in CPBX5.
  2. Click the Backup button to save on the external storage provider “CPBX5_External_Backup”. You will see a prompt message that says: “Backup started successfully”.
IP PBX Phone Provisioning

3. You can check the backup on the Synology bucket “cpbx5” we created in this example. Inside the bucket, you will see the backup zip file, which is named using a specific format that includes the word “cpbx” followed by the CPBX5 version and a timestamp. For example, cpbx-X0001234_5_2_29_20240724_140850.zip.

IP PBX Phone Provisioning

4. Restoring a Backup:

  • To restore your backup on CPBX5 from the created backup stored on the configured Synology bucket:
    • Go to ADMIN > Admin > Backup & Restore, Restore
    • Select the backup from the List icon, in this case, the backup we made on the Synology bucket.
IP PBX Phone Provisioning
  • After the backup file is selected, you can choose which options you want to restore, including Faxes, Call Recordings, Voicemail, and CDR records.
IP PBX Phone Provisioning
  • Click the Restore button; a prompt will show up with the message “This action is irreversible,” and you can confirm to restore from the selected backup.
IP PBX Phone Provisioning

After confirming the restore, you will see the message “Backup restored successfully,” and you will have to press the reload button or the Apply Changes icon  in CPBX 5.2.30 and above to complete the configuration.

Notes:

  • Ensure that the bucket’s access permissions are correctly set to allow read and write operations.
  • Regularly verify that backups are being stored correctly and that you can access them as needed.

 

Example: Auto backup via task manager

In this example, we configure an automatic backup task using the Task Manager in CPBX5. Automating backups ensures regular data protection without manual intervention, maintaining system integrity and facilitating recovery processes.

Configuring an Automatic Backup Task:

1. Navigate to the Task Manager:

  • Go to ADMIN > System Settings > Task Manager in CPBX5.

2. Add a New Task:

  • Click on the Create Task

3. Configure Task Parameters:

  • Script: Select the pre-defined task Backup from the dropdown list. In this example, we choose the Automatic Backup script
  • Description: Enter a free-text description to identify the task. For this example, use “Daily Synology S3 Backup”.
  • Starting: Set the date and time when this task should be activated for the first time. You can either type the timestamp in the Starting field, or use the dialog that appears to choose a date and time. Click Done when finished to save the chosen data.
  • Every: Choose the frequency of the task. For this example, select Every day to ensure daily backups.
  • Randomize: Set this to Yes to randomize the start time of the task by up to 50% of the interval, with a maximum of ±30 minutes. This helps to avoid simultaneous task executions in multi-tenant environments.
  • Parameters: Add the necessary parameters for the task. In this case, use the following parameters to back up all data and store the backups in the Synology S3 external storage provider we set in the previous example:

-n DailyBackup -all -k 3 -type daily -r CPBX5_Backup

  • Here:
    • -n DailyBackup: Backup name.
    • -all: Full backup including recordings, voicemails, faxes, and CDRs.
    • -k 3: Keeps the latest 3 backups.
    • -type daily: Daily backup type.
    • -r CPBX5_Backup: Specifies the name of the external storage provider configured earlier.
IP PBX Phone Provisioning
  • Notes: Add any relevant notes regarding the task.

2. Save the Task:

  • Click on Save to add the new task to the Task Manager list.

Verify and Manage the Task:

1. View Configured Tasks:

  • Go to the Tasks tab to see a list of all configured tasks.

2. Manage the Task:

  • Use the icons at the end of each row to manage previously defined tasks:
    • Edit: Click the edit icon to modify the parameters of an existing task.
    • Delete: Click the delete icon to remove an existing task.
    • Execute: Click the execute icon to immediately run the selected task.

3. Enable/Disable Tasks:

  • You can disable existing tasks without needing to delete them by changing the state of the task from Enabled to Disabled.

Notes:

  • Ensure that the bucket’s access permissions are correctly set to allow read and write operations.
  • Regularly verify that backups are being stored correctly and that backup files are accessible.

By configuring an automatic backup task, you ensure that your CPBX5 configuration and data are regularly backed up, providing redundancy and peace of mind.

Example: Storing Call Recordings on an External Storage Provider

In this example, we will configure the CPBX5 system to store call recordings on an external storage provider, specifically using the previously configured Synology S3 bucket named “cpbx5.” This setup ensures that call recordings are securely stored in an external storage provider, freeing up space on the PBX, which is especially useful for MT Manager tenants.

  1. Navigate to the Call Recording module:
  • Go to SETTINGS > PBX Settings > Call Recording.
IP PBX Phone Provisioning
    • Configure General Settings:
      • Destination: Select CPBX5_External_Backup from the dropdown menu.
      • Delete Local File: Set to Yes to ensure that call recordings are only stored in the Synology S3 bucket and not on the local drive.
      • Upload Interval: Set to Every day to schedule the upload of call recordings daily.
    • Advanced Settings (Optional):
      • Recording Format: Choose the desired audio format for local recordings (WAV, WAV49, or GSM).
    • Save and Test Configuration:
      • Click Save to apply the configuration.

    Using the Remote Storage for Call Recordings

    • Recording Storage: Once configured, all new call recordings will be stored in the Synology S3 bucket named cpbx5.
    • Accessing Recordings: You can access these recordings through the CDR (REPORTS > CDR Reports > CDR), where the call records appear with a cloud icon. By clicking the cloud icon, you can listen to the call recordings stored in a folder called “recordings” of your Synology S3 bucket.
    IP PBX Phone Provisioning
      • Notes

        • Ensure that the Synology S3 bucket permissions are correctly set to allow read and write operations.
        • Regularly verify that call recordings are being stored correctly and that you can access them as needed.

        By following these steps, you can effectively manage and store call recordings on an external storage provider, enhancing the reliability and accessibility of your call data. This also helps to free up disk space on your PBX.