Backup Storage
By default, all backups are stored in a service bucket in Selectel S3. You can create a backup storage — a bucket in S3 where you can save infobase backups.
Using your own backup storage provides full access to backup files, allows you to configure replication to another pool, download backups, and migrate them to third-party infrastructure outside of Selectel.
You can work with backup storage in the Control Panel or via the Cloud for 1C API. See how to work with S3 in the instructions S3 Product Overview.
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 hierarchy in the storage, but for convenience, you can create and view simulated folders (directories). A folder name is a prefix in an object name. When connecting a bucket, you can specify a prefix and configure saving backups 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 API — you can connect a bucket from any project accessible to a service user with the S3 User role. You need to create the service user and access policies yourself.
Bucket limitations and recommendations
Only buckets with Virtual-Hosted addressing can be connected to backup storage. A single bucket or simulated folder can be connected to only one storage in the selected pool and project.
The backup storage and the information database 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 the region where the information database is located.
A bucket is connected to backup storage using a service user and bucket access policies. If you modify or delete the service user or bucket access policies:
- backup storage will switch to the
ERRORED;status; - saving backups to storage will be unavailable;
- the backup plan will be disabled for all related information databases;
- downloading backups will only be available from S3.
Pricing
Storing files in a bucket is charged according to the S3 payment model and prices.
When an information base is deleted, backups in the associated bucket are retained for another 30 days. When a backup storage is deleted, the backup files are not removed and continue to be billed—to stop billing, delete the buckets.
Create backup storage automatically
When creating storage, the following will be created and configured by default:
- service user
GO1C_SERVICE_USER; - access policy for the service user
GO1C_UPLOAD_BACKUP_POLICY; - access policy for the current user
ALL_OTHER.
A user with the role of Account Owner and users with role combinations can mount a bucket automatically:
New bucket
Existing bucket
-
In the control panel, on the top menu, click Products and select Managed 1C Cloud.
-
Go to the Backups section.
-
Click Create backup storage.
-
Select the region and pool where the backup storage will be created. The information database and backup storage pools 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 database.
-
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 S3 API compatibility, the bucket name must be unique within S3 and comply with Amazon S3 bucket naming rules, see more in the Bucket naming rules section of the Amazon documentation.
-
In the Prefix field, specify a prefix for the emulated folder (directory) where backup files will be stored.
If you need to create a new folder, specify its name according to Amazon S3 bucket naming rules. The folder will be created when you create the backup storage.
If you want the 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 new bucket
Prepare an existing bucket
-
Make sure you are in the project where the information database 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. Observe the bucket limitations and recommendations.
-
Open the page of the created bucket → Bucket Policy tab.
-
Click Create Bucket Policy.
-
Add a rule for the service user:
- in the Access field, select Allow;
- in the Users field, select Authorized and add the service user you created in step 2;
- in the Action set field, select Editor.
-
Add a rule for panel users:
- in the Access field, select Allow;
- in the Users field, select Authorized and add the user who will connect the storage to the 1C cluster;
- in the Action set field, select All.
-
Click Save.
-
Issue S3 keys to the service user.
2. Create backup storage
-
In the control panel, on the top menu, click Products and select Managed 1C Cloud.
-
Go to the Backups section.
-
Click Create backup storage.
-
Select the region and pool where the backup storage will be created. The information database and backup storage pools must match.
-
Select the storage creation method — Manually.
-
Select the region and the pool where the bucket is located.
-
In the Bucket field, select the bucket that you prepared earlier.
-
In the Prefix field, specify a prefix for the emulated folder (directory) where the backups 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 automatically when you create the backup storage.
If backups are to be stored in the bucket root, leave the field empty.
-
In the S3 keys block, specify the Access key and Secret key for the service user you created when preparing the bucket.
-
Click Create.