This article is a mirror article of machine translation, please click here to jump to the original article.

View: 38284|Reply: 1

[Source] .NET Core backs up data to Amazon S3 Glacier storage

[Copy link]
Posted on 9/12/2021 8:50:27 PM | | | |
About Amazon S3 Glacier:The hyperlink login is visible.

Amazon S3 Glacier and S3 Glacier Deep Archive are secure, durable, and extremely low-cost Amazon S3 cloud storage classes for data archiving and long-term backups. With 99.9999999999% durability and comprehensive security and compliance features, they can help meet the most stringent regulatory requirements. Customers can store data for as little as $1 per TB per month, significantly reducing costs compared to on-premises solutions. To keep costs low while meeting a variety of retrieval needs, Amazon S3 Glacier offers three options for accessing archives, ranging from minutes to hours; The S3 Glacier Deep Archive offers two access options, ranging from 12 to 48 hours for retrieval.

Its advantage is that the price is very cheap, suitable for storing long-term unused resources, such as: database backup files, archival materials, data archives, etc. However, if you retrieve the download data, you will have to wait for a very long time unless you purchase an acceleration service. The prices are also different for each region, taking the Tokyo area as an example:100G files (one month) = 0.5USD = 3.5 yuan

Pricing:The hyperlink login is visible.

One: Create an access key (access key ID and secret access key)

Address:The hyperlink login is visible.

Access keys (awsAccessKeyId, awsSecretAccessKey) are used when calling the AWS API interface, and the root user access key allows unlimited access to your entire AWS account. As shown below:


Here the created key is copied for later use.

2: Create an S3 Glacier file library

For example, in the Tokyo area, the website:The hyperlink login is visible., as shown in the figure below:



Amazon Region Names and Codes:The hyperlink login is visible.

Region name
code
US East (Ohio)
us-east-2
US East (N. Virginia)
us-east-1
US West (N. California)
us-west-1
US West (Oregon)
us-west-2
Africa (Cape Town)
af-south-1
Asia Pacific (Hong Kong)
ap-east-1
Asia Pacific (Mumbai)
ap-south-1
Asia Pacific (Osaka)
ap-northeast-3
Asia Pacific (Seoul)
ap-northeast-2
Asia Pacific (Singapore)
ap-southeast-1
Asia Pacific (Sydney)
ap-southeast-2
Asia Pacific (Tokyo)
ap-northeast-1
Canada (Central)
ca-central-1
China (Beijing)
cn-north-1
China (Ningxia)
cn-northwest-1
Europe (Frankfurt)
eu-central-1
Europe (Ireland)
eu-west-1
Europe (London)
eu-west-2
Europe (Milan)
eu-south-1
Europe (Paris)
eu-west-3
Europe (Stockholm)
eu-north-1
Middle East (Bahrain)
me-south-1
South America (São Paulo)
sa-east-1

3: Create a new ASP.NET Core program

To create a new ASP.NET Core program and call the AWS SDK to upload the file to the S3 Glacier file library, you need to use nuget to reference the following package:




Upload files

The code is as follows:

Download the file

Retrieving the download file from the S3 Glacier storage, you need to wait patiently for a while (Retrieval times range from minutes to hours, and even files that have just been uploaded have to wait so longWe can see that after we send a request to retrieve the file, the program will get the result through the message queue, as shown in the figure below:



The code is as follows:



Enable log output code:



I have developed an S3 Glacier backup service that only needs to call the controller interface to upload files to S3 Glacier, as shown in the figure below:




Source code download:The hyperlink login is visible.




Previous:Two tools are recommended for analyzing the Docker image layer
Next:Git restores files that have been committed for deletion
 Landlord| Posted on 4/4/2025 12:15:21 PM |
S3 Glacier Instant Retrieval— For archived data that requires immediate access, such as medical images, news media assets, or genomic data, choose the S3 Glacier Instant Retrieval storage class, an archive storage class that provides the lowest cost storage in milliseconds retrieval.

S3 Glacier Flexible Retrieval— For archived data that does not require immediate access but requires the flexibility to retrieve large datasets for free, such as backup or disaster recovery use cases, select the S3 Glacier Flexible Retrieval storage class for retrieval in minutes or free bulk retrieval within 12 hours.

S3 Glacier Deep Archive— To retain data for 7–10 years or more to meet customer needs and regulatory compliance requirements, such as financial services, healthcare, media and entertainment, and the public sector, choose the S3 Glacier Deep Archive storage class, which is the lowest-cost cloud storage that retrieves data within 12–48 hours.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com