Archive Files to Amazon S3
Yeastar P-Series Cloud Edition supports archiving the system's call recordings and backup files to Amazon S3, either on a regular interval or at any time you want. This topic describes how to add Amazon S3 bucket as an archive server and schedule tasks to archive the desired files.
Requirements and restrictions
- Requirements
-
- PBX Firmware: Version 84.15.0.22 or later
- PBX Plan: Enterprise Plan (for self-managed phone system) or Ultimate Plan (for Yeastar hosted phone system)
- Restrictions
-
- Archive server: 10
- Archive task: 200
Introduction
To archive PBX's call recordings and backup files to a specific bucket in Amazon S3, you need to complete the followings:- Prepare an eligible account and bucket on AWS.
- An IAM User account that meets the
requirements listed below:
- Full access to Amazon S3 resources to archive PBX files
- An access key pair (including an access key ID and a secret access key) to authenticate file archiving requests from PBX
- An S3 bucket to store archived PBX files
- An IAM User 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 pair of the IAM user to send file archiving requests to Amazon S3. If the requests are considered authentic, the specified files will be archived to the designated bucket in Amazon S3.
Step 1. Create an IAM user with full access to Amazon S3 bucket on AWS
- Log in to AWS Management Console.
- At the top of the console, search for IAM service and select
Users.
You are redirected to the IAM users page.
- Create an IAM user and grant the user full access to Amazon S3 bucket.
- At the top-right corner, click Create user.
- On the Specify user details page, enter a name in the User name field to help you identify the IAM user, then click Next.
- On the Set permissions page, grant the user
full access to Amazon S3 buckets, then click
Next.Note: You can grant permission to the user by adding the user to an existing group, creating a new group, or attaching permission policy directly to the user.
In this example, we create a new group with full Amazon S3 access permission and add the user to the group, as the following figure shows.
- On the Review and create page, click
Create user.
The IAM user with full access to Amazon S3 bucket is created and displayed on the users list.
- Create an access key for the IAM user.
- On the users list, click on the newly created IAM user to enter the details page.
- In the Summary section, click Create access key.
- On the Access key best practices & alternatives page, select Third-party service, confirm your operation, then click Next.
- On the Set description tag - optional page, enter a description for the access key as needed, then click Create access key.
- In the Retrieve access keys
page, copy and note down the values of Access
key and Secret access key,
then click Done.Important: For Secret access key, the value is shown only ONCE, so make sure that you save the credential in a secure location before clicking Done to close the window. We recommend that you click Download .csv file to save the credential file to your computer.
The access key is created and displayed on the access key list.
Step 2. Create an Amazon S3 bucket on AWS
- On AWS Management Console, search for S3 service in the top-left search bar, then select Buckets.
- At the top-right corner, select the region in which you want to
create an S3 bucket.Note: To minimize latency and costs and address regulatory requirements, choose a region that is closest to your PBX server.
- Create an S3 bucket.
- On the right of the page, click Create bucket.
- Check the region where the bucket will be created and specify a name
for the bucket.
- AWS Region: Automatically show the region that you have selected.
- Bucket name: Enter a name to help you identify the bucket.
- Configure other settings according to your needs.
- At the bottom of the page, click Create
bucket.The S3 bucket is created and displayed on the buckets list.Note: If you want to group the archived PBX files in Amazon S3, 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 Amazon S3 bucket as archive server on PBX
- Log in to PBX web portal, go to .
- Under the Archive Task tab, click Archive Server.
- Set up Amazon S3 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 Amazon S3. Access Key ID Enter the access key that you have obtained from AWS. Secret Access Key Enter the secret access key that you have obtained from AWS. - Click Save.
The Amazon S3 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 Amazon S3 on PBX
- Under Archive Task tab, click Add.
- 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 Amazon S3. 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 Amazon S3 bucket that you have added. Select Folder/Path Select the bucket or the folder in which you want to store archived files. - Click Save.
Result
- Check the archive result on PBX
- On PBX web portal, go to Result column of the task shows Succeeded, it indicates that the specified files have been successfully archived to Amazon S3. . If the
- Check the archive result on AWS
- On AWS Management Console, go to the created S3 bucket. If the specified files appear in the list, it indicates that the archive is successful.