Archive Files to Google Cloud Storage

Yeastar P-Series PBX System supports archiving the system's call recordings and backup files to Google Cloud Storage, either on a regular interval or at any time you want. This topic describes how to add Google Cloud Storage bucket as an archive server and schedule tasks to archive the desired files.

Requirements and restrictions

Requirements
  • PBX Firmware: Version 37.15.0.22 or later
  • PBX Plan: Enterprise Plan
Restrictions
  • Archive server: 10
  • Archive task: 200

Introduction

To archive PBX's call recordings and backup files to a specific bucket in Google Cloud Storage, you need to complete the followings:

  1. Prepare an eligible account and bucket on Google Cloud.
    • A service account that meets the requirements listed below:
      • Full access to Google Cloud Storage resources to archive PBX files
      • An access key to authenticate file archiving requests from PBX
    • A bucket to store archived PBX files
  2. Set up archive server and task on PBX.

When it is time to execute the archive task, PBX will use the access key of the service account to send file archiving requests to Google Cloud Storage. If the requests are considered authentic, the specified files will be archived to the designated bucket in Google Cloud Storage.

Step 1. Create a service account on Google Cloud

  1. Log in to Google Cloud Console.
  2. On the project selector page, select or create a Google Cloud project.

    In this example, we create a new project "Yeastar".

  3. Create a service account.
    1. In the top search bar, search for and select Service Accounts.

    2. In the top pane, click CREATE SERVICE ACCOUNT.

    3. In the Service account details section, enter a name in the Service account name field to help you identify the account, then click CREATE AND CONTINUE.

    4. In the Grant this service account access to project (optional) section, search and select Storage Admin from the Role drop-down list, then click DONE.

      The service account is created and displayed on the service accounts list.

  4. Create an access key for the service account.
    1. On the service accounts list, click beside the service account that you have created, then select Manage keys.

      You are redirected to the key configuration page.

    2. Click ADD KEY, then select Create new key from the drop-down list.

    3. Set Key type to JSON, then click CREATE.

      The access key is created and automatically downloaded to your computer as a JSON file.
      Note: Save the JSON file in a secure location, as you will need the file when setting up Google Cloud Storage bucket as archive server on PBX.
    4. Click CLOSE to close the pop-up window.

Step 2. Create a bucket on Google Cloud Storage

  1. In the top search bar, search for and select Cloud Storage.

    You are redirected to buckets configuration page.

  2. In the top pane, click CREATE.

  3. In the Name your bucket field, enter a name to help you identify the bucket, then click CONTINUE.

  4. In the Choose where to store your data section, select the region in which you want to create a bucket, then click CREATE.

    The bucket is created.

    Note: If you want to group the archived PBX files in Google Cloud Storage, you can create folders in the bucket. In this way, you can specify PBX files to be archived to the designated folder in the follow-up settings.

Step 3. Add Google Cloud Storage bucket as archive server on PBX

  1. Log in to PBX web portal, go to System > Archive.
  2. Under the Archive Task tab, click Archive Server.

  3. Set up Google Cloud Storage bucket as an archive server.
    1. Click Add.
    2. In the pop-up window, complete the following settings.

      Setting Description
      Name Enter a name to help you identify the server.
      Server Type Select Google Cloud Storage.
      Private Key(JSON type) Click Browse to browse and upload the JSON file that you have downloaded in Google Cloud.
    3. Click Save.

      The Google Cloud Storage bucket is added as an archive server and displayed on the archive server list.

  4. Click to close the window.

Step 4. Create a task to archive files to Google Cloud Storage on PBX

  1. Under Archive Task tab, click Add.
  2. Create a one-time or recurring archive task.

    Setting Description
    Name Enter a name to help you identify the task.
    File Type Select Recording Files or Backup Files as needed.
    Time Specify a time range of the files to be archived.
    Note: You can archive files for up to 31 days at a time.
    Sync Frequency Set how often to archive files to Google Cloud Storage.
    Note: As large amounts of data will consume PBX's CPU resources, we recommend that you schedule archive tasks during off-peak hours.
    • Once: If you choose the option, the system will archive files immediately after you save the task.
    • Daily: If you choose the option, select a time from the drop-down list. The system will archive files at this time of the day.
    • Weekly: If you choose the option, choose a day of week and select a time from the drop-down list. The system will archive files at this time of the week.
    • Monthly: If you choose the option, choose a day and select a time from the drop-down list. The system will archive files on this day and time of the month.

    Archive Server

    Select the Google Cloud Storage bucket that you have added.

    Select Folder/Path Select the bucket or the folder in which you want to store archived files.
  3. Click Save.

Result

The specified files will be archived to the designated bucket or folder in your Google Cloud Storage immediately or at the scheduled time.

Note: The system executes only one task at a time to avoid affecting system performance. If there are multiple tasks, they will be queued up one after another.

You can check the archive result in the following ways.

Check the archive result on PBX
On PBX web portal, go to System > Archive > Archival Logs. If the Result column shows Succeeded, it indicates that the specified files have been successfully archived to Google Cloud Storage.

Note: If the task is failed, the Failed to Archive File(s) event will be triggered; You can click to retry the task.

Check the archive result on Google Cloud Storage
On Google Cloud Console, go to the created bucket. If the specified files appear in the list, it indicates that the archive is successful.