Backup Storage
By default, all backups are stored in the Selectel S3 service bucket. You can create backup storage — an S3 bucket where you can save backups of your information base.
Using your own backup storage provides full access to backup files, allows you to configure replication to another pool, and enables you to download backups and move them to third-party infrastructure outside Selectel.
You can work with the backup storage in the Control panel or via the Cloud for 1C API. See how to work with S3 in the S3 product description.
How it works
You create backup storage based on an existing or new S3 bucket, after which you can save all new backups there.
S3 has a flat address structure — there are no folders or a hierarchy in the storage, but for ease of use, you can create and view simulated folders (directories). The folder name is a prefix in the object name. When connecting a bucket, you can specify a prefix and configure backups to be saved to a simulated folder.
There are three ways to connect S3:
- automatically — you can connect an existing bucket or create a new one. The service user and access policies for working with the bucket will be created automatically;
- manually — you can connect an existing bucket. You must create the service user and access policies yourself;
- using the API — you can connect a bucket from any projects the service user with the S3 User role has access to. You must create the service user and access policies yourself.
Bucket limitations and recommendations
Only buckets with Virtual-Hosted addressing can be connected to the backup storage. One bucket or simulated folder can be connected to only one storage in the selected pool and project.
The backup storage and information base must be in the same pool. The S3 bucket can be in any pool.
For optimal performance, we recommend choosing buckets that are:
- private;
- in a region where the information base is located.
A bucket is connected to the backup storage using a service user and bucket access policies. If you modify or delete the service user or bucket access policies:
- the backup storage will transition to the
ERRORED;status; - saving backups to the storage will be unavailable;
- the backup plan will be disabled for all linked information bases;
- downloading backups will only be available from S3.
Cost
Storing files in a bucket is paid for according to the S3 payment model and pricing.
When an information base is deleted, the backups in the linked bucket will be stored for another 30 days. When backup storage is deleted, the backup files are not deleted and continue to be billed — to stop the billing, delete the buckets.
Create backup storage automatically
When creating storage, the following will be created and configured by default:
- a service user
GO1C_SERVICE_USER; - an access policy for the service user
GO1C_UPLOAD_BACKUP_POLICY; - an access policy for the current user
ALL_OTHER.
An account owner and users with the following role combinations can connect a bucket automatically:
New bucket
Existing bucket
-
In the Control panel, on the top menu, click Products and select 1C Cloud.
-
Go to the Backups section.
-
Click Create backup storage.
-
Select the region and pool where the backup storage will be created. The pools of the information base and the backup storage must match.
-
Select the storage creation method — Automatically.
-
Select the region and pool where the bucket will be created. We recommend creating the bucket in the same region as the information base.
-
In the Bucket field, select New S3 bucket. A private bucket with Virtual-Hosted addressing and a standard storage class will be created.
-
In the Bucket name field, specify the name of the new bucket. For compatibility with the S3 API, the bucket name must be unique within S3 and comply with Amazon S3 bucket naming rules; learn more in the Bucket naming rules documentation from Amazon.
-
In the Prefix field, specify a prefix for the simulated folder (directory) where the backup files will be stored.
If you need to create a new folder, specify its name in accordance with the Amazon S3 bucket naming rules. The folder will be created when the backup storage is created.
If you want backup files to be stored in the root of the bucket, leave the field empty.
-
Click Create.
Create backup storage manually
1. Prepare the bucket for connection
Create a bucket
Prepare an existing bucket
-
Ensure you are in the project where the information base is located.
-
Create a service user with the S3 User role and access to the project where the bucket will be created.
-
Create a bucket in S3. Take bucket limitations and recommendations into account.
-
Open the page of the created bucket → Bucket Policy tab.
-
Click Create bucket policy.
-
Add a rule for the service user:
- in the Effect field, select Allow;
- in the Principals field, select Authorized and add the service user you created in step 2;
- in the Actions field, select Editor.
-
Add a rule for users:
- in the Effect field, select Allow;
- in the Users field, select Authorized and add the user who will connect the storage to the 1C cluster;
- in the Actions field, select All.
-
Click Save.
-
Issue S3 keys to the service user.
2. Create backup storage
-
In the control panel, from the top menu, click Products and select Cloud for 1С.
-
Go to the Backups section.
-
Click Create backup storage.
-
Select the region and pool where the backup storage will be created. The pools of the information base and the backup storage must match.
-
Select the storage creation method — Manually.
-
Select the region and pool where the bucket is located.
-
In the Bucket field, select the bucket you prepared earlier.
-
In the Prefix field, specify a prefix for the simulated folder (directory) where the backups will be stored.
If you need to create a new folder, specify its name in accordance with the bucket naming rules of Amazon S3. The folder will be created automatically when the backup storage is created.
If backups are to be stored in the root of the bucket, leave the field empty.
-
In the S3 keys block, enter the Access key and Secret key for the service user that you created when preparing the bucket.
-
Click Create.