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
| Item | Requirement |
|---|---|
| PBX Firmware | Version 37.21.0.117 or later |
| PBX Plan | Enterprise Plan or Ultimate Plan |
Limitations
- 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:
- 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 Note: If you want old files to be automatically deleted from your Google Cloud Storage, make sure the service account also has file deletion permission.
- An access key to authenticate file archiving requests from PBX
- Full access to Google Cloud Storage resources to archive PBX
files
- A bucket to store archived PBX files
- A service account that meets the
requirements listed below:
- 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
- Log in to Google Cloud Console.
- On the project selector page, select or create a Google Cloud
project.

In this example, we create a new project "Yeastar".
- Create a service account.
- In the top search bar, search for and select Service
Accounts.

- In the top pane, click CREATE SERVICE
ACCOUNT.

- 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.

- 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.
- In the top search bar, search for and select Service
Accounts.
- Create an access key for the service account.
- 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.
- Click ADD KEY, then select Create
new key from the drop-down list.

- 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. - Click CLOSE to close the pop-up window.
- On the service accounts list, click
Step 2. Create a bucket on Google Cloud Storage
- In the top search bar, search for and select Cloud
Storage.

You are redirected to buckets configuration page.
- In the top pane, click CREATE.

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

- 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
- Log in to PBX web portal, go to .
- Under the Archive Task tab, click
Archive Server.

- Set up Google Cloud Storage bucket as an archive server.
- Click Add.
- 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. - Click Save.
The Google Cloud Storage bucket is added as an archive server and displayed on the archive server list.
- Click
to close the window.
Step 4. Create a task to archive files to Google Cloud Storage on PBX
- Under Archive Task tab, click Add.
- In the Task Configuration section, complete the basic
settings for the archive task.

Setting Description Name Enter a name to help you identify the task. File Type Select Recording Files or Backup Files as needed. Data Range 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.
Recording File Format Select the download format for recording files. Note:- This option is available only when you schedule to archive recording files.
- All recording files in the system will be downloaded and archived in the selected format.
- In the Storage Configuration section, select the
archive server and complete the related settings.
Setting Description 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. Skip archived files Optional. Specify whether to skip files that have already been archived. Note: This option is available only when you schedule to archive recording files.- If enabled, the system will NOT archive files that have already been archived.
- If disabled, the system will archive files even if they have been previously archived. The file's storage location will be updated, but the previous copy will NOT be deleted from the third-party server.
Delete local files after archiving Optional. Specify whether to delete local files after archiving. Note: This option is available only when you schedule to archive recording files.- If enabled, the local files will be deleted after archiving. They can still be played and downloaded from PBX admin portal and Linkus UC clients, but are NO longer available for playback and download on third-party server or Dynamics 365.
- If disabled, the local files are retained after archiving.
- Optional: Set retention policy for archived files.Note:
- This option is available only when you schedule to archive on a recurring basis.
- Ensure that the service account has permission to DELETE resources on the archive server.

Setting Description Retention Type Specify how archived files are retained.
- Retention by Quantity:
Retain files/folders in the archive server storage
path based on the maximum number allowed.
If you choose this option, enter the desired number in the Retention Limit (files/folders) field.
When the number of files/folders exceed the configured value, the system automatically deletes the oldest ones.
- Retention by Days: Retain
files/folders in the archive server storage path
based on the maximum retention period.
If you choose this option, enter the desired days in the Retention Limit (in days) field.
Files/folders that exceed the maximum retention period will be automatically deleted.
Note:- The retention period is calculated from the archive time on the archive server, not from the file creation time on PBX.
- Retention period is measured in exact 24-hour intervals, not calendar days.
Retention Limit Specify the maximum number of files/folders or the maximum retention days, depending on the selected retention type. Retention Unit Select the retention unit. - Folder: This indicates the folders created on the archive server upon archive.
- File: This indicates the individual files archived on the archive server.
- 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.
You can check the archive result in the following ways.
- Check the archive result on PBX
- On PBX web portal, go to . 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.
