You can easily back up your data to a number of third party storage services through RunCloud. However, you should keep in mind that all RunCloud plans come with a built-in backup storage that is easier and more convenient to use.
RunCloud Basic, Pro, and Business plans come with 2GB, 10GB, and 30GB of storage respectively. You can also get more storage if needed (up to 3TB) at affordable prices.
However, if you choose to use AWS S3, you will be charged separately by Amazon for the storage and bandwidth usage. Please read the billing documents carefully before proceeding.
Here are the step-by-step instructions for storing RunCloud backup data to AWS S3 storage:
- Log in to your RunCloud dashboard and go to the Settings > Integrations tab. You will see a list of available integrations for backup storage. Select Amazon S3 from the list and click on the Add Integration button.
- Open a new browser tab to log in to your Amazon Cloud console and then create a new S3 bucket. Give it a descriptive name and choose a region that is close to your server location.
You can leave the rest of the settings as default, and click Create bucket at the bottom of the page.
- After creating the bucket, you will be able to see it in your AWS dashboard instantly. Enter the name of the bucket (written in bold at the top) in your RunCloud integration tab from step 1.
In the following example, the name of the bucket isruncloud-backups-62623
.
- After creating the bucket, create a separate user for the RunCloud backup agent. Go to the IAM section in your AWS dashboard and create a new user account.
- Give it a descriptive name such as runcloud-backup-bot and since access to the dashboard will only be via CLI, there is no need to provide user access to the AWS Management Console.
- On the next screen, we will limit the permissions of this account so it can only access the specified bucket. Click on the “Attach policies directly” option, and then click on the Create policy button to create a new policy that will grant read and write access to the bucket that you created earlier. This will ensure that RunCloud can only access this bucket and not any other resources in your AWS account.
- When you click create policy, it will open the policy editor. Switch to the JSON tab and paste the following code:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListObjectsInBucket",
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": ["arn:aws:s3:::bucket-name"]
},
{
"Sid": "AllObjectActions",
"Effect": "Allow",
"Action": "s3:*Object",
"Resource": ["arn:aws:s3:::bucket-name/*"]
}
]
}
- Make sure to replace the bucket-name with the name of your bucket in both places. Click Next, and give it a suitable name such as runcloud-s3-policy.
Click Create policy to save it.
- After creating the policy, go back to the User Creation tab and click on the Refresh icon next to the Create policy button. Enter the name of the policy that you just created in the search bar and select it. Click Next.
- Review the details of the user account and click Create user. After the user account has been created, we will need to generate its access keys so that RunCloud can start using this account.
- After creating the user, go back to the users tab in your AWS dashboard and click on the user that we just created. On this screen, click on the Security credentials tab.
- On this page, scroll down until you see the Access Keys tab and click on Create access key.
- On the next screen, AWS will ask you the purpose for creating this access key. Click on Other, and then hit Next.
- You will be asked to set a description tag for this key. You can either enter a description, or leave it blank. Finally, click on Create access key.
- You will see the access key ID and secret access key for this user. Copy and paste them into the RunCloud integration form from step 1.
Also, enter the name and region of your bucket that we created in step 2. If you don’t enter the bucket name, you will get an error due to the policy that we defined earlier.
Click Test Integration – and if everything is fine, click Save Integration
You have successfully configured the AWS S3 integration for RunCloud backup. You can now use this integration to back up your web applications and data.
After performing the backup, you can confirm that RunCloud is storing the backup files in the correct AWS bucket.
Note: If you are storing large amounts of data in AWS S3, you can consider using Lifecycle Policies to automatically delete or move backup files to a cheaper storage class after a certain period of time.