Back up to Amazon Simple Storage Service using ON-Bar and the PSM
You can use ON-Bar and the Primary Storage Manager to back up and restore data to or from the Amazon Simple Storage Service (S3). You are responsible for terms and any charges associated with your use of the Amazon Simple Storage Service.
Before you begin
Prerequisites:
- You must have an Amazon account to perform cloud storage backups. See the Amazon website for instructions about setting up an account.
About this task
Procedure
-
Create a group to access S3
The new group is created.
-
Create a User to Access S3
-
Assign the user to the group.
- Click the check box next to the user and select User Actions.
- Click Add User to Groups.
-
Create a bucket.
- Select Services tab and click Amazon S3.
- Click Create Bucket.
- Specify a bucket name and select the appropriate region.
-
Configure Primary Storage Manager to use the Bucket and Credentials you just created.
Create a device in PSM of type CLOUD using S3 as provider.
In this command line:onpsm -D add <name of device> -t CLOUD --creds <creds file> --max_part_size <size in KB>- name of the device, with the cloud type device, name of the device is url where
your backups will go. Bucket name is the part of the url.
e.g https://ifmx-s3-dev.s3.amazonaws.com, here ifmx-s3-dev is the bucket name.
- ‘-t CLOUD’, is the device type that enable PSM to store/retrieve the data to/from a CLOUD infrastructure.
- --creds <cred file>, is the the credential file. Credential file is created using "onkstore" utility. Use aws-bar as type to create credential file from "onkstore".
- —-max_part_size 25600 will fragment your objects in 25MB pieces, in the case of S3, size between 25 and 100 MB is recommended.
Example: 1. create the json file with credentials you created in above steps. { "Credentials" : { "Type" : "aws-bar", "AWS Key Id" : "xxxxxxxxxxxxxxx", "AWS Key Secret" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "AWS Region" : "xxxxxxxxxxxx", "AWS CMK Id" : "xxxxxxxxxxxxxxxxxx" } } Here "AWS Key Id" is the user and "AWS Key Secret" is the password you created. 2. Use "onkstore" to create credential file onkstore -create -file <file name> -credential <credential file> Here credential file is the path of json file created with all credentials. - name of the device, with the cloud type device, name of the device is url where
your backups will go. Bucket name is the part of the url.
-
Check the created device:
$ onpsm -D list Informix Primary Storage Manager Device List Type Prio Block/Size (MB) Pool Name Device Name CLOUD HIGHEST --/-- DBSPOOL S3_CLOUD_DEV CLOUD HIGHEST --/-- LOGPOOL S3_CLOUD_DEV -
Take a Level Zero Backup:
$ onbar -b -L 0 -w $ echo $? $ 0 - Check Backup Data in your Bucket using S3 management console.