{"id":293011,"date":"2019-08-05T21:00:21","date_gmt":"2019-08-05T21:00:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293011"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293011","title":{"rendered":"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 windows \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 AWS"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0418\u043c\u0435\u0435\u043c windows \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 AWS \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0449\u0451 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b, \u0430 lifecycle \u0432 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442. \u041d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 AWS Backup \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0435\u0449\u0451 \u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u0438\u043b\u0438 \u044f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043a\u0430\u043a. \u041d\u0443 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0431\u044b \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u0435\u0437 \u043c\u043e\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u0438\u044f. <br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f<br \/>  1) Windows Server 2008 R2 \u0438\u043b\u0438 \u043d\u043e\u0432\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432 AWS<br \/>  2) SSM Agent version 2.2.58.0 \u0438\u043b\u0438 \u043d\u043e\u0432\u0435\u0435<br \/>  3) AWS Tools for Windows PowerShell 3.3.48.0 \u0438\u043b\u0438 \u043d\u043e\u0432\u0435\u0435<br \/>  4) AWS System manager<br \/>  5) IAM<br \/>  6) SNS<br \/>  7) Lambda<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0420\u043e\u043b\u044c \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c AWS SSM \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 EBS \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432.<\/p>\n<p>  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 IAM \u2192 Policies \u2192 Create policy. <br \/>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0443 JSON \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c<\/p>\n<pre><code class=\"json\">{     \"Version\": \"2012-10-17\",     \"Statement\": [         {             \"Effect\": \"Allow\",             \"Action\": \"ec2:CreateTags\",             \"Resource\": \"arn:aws:ec2:*::snapshot\/*\"         },         {             \"Effect\": \"Allow\",             \"Action\": [                 \"ec2:DescribeInstances\",                 \"ec2:CreateSnapshot\"             ],             \"Resource\": \"*\"         }     ] } <\/code><\/pre>\n<p>  \u0416\u043c\u0451\u043c Review policy \u0432 \u0418\u043c\u044f \u043f\u0438\u0448\u0435\u043c \u0447\u0442\u043e \u0442\u043e \u0442\u0438\u043f\u0430 VssSnapshotPolicy. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0440\u043e\u043b\u044c. <br \/>  IAM \u2192 Roles \u2192 Create Role <\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c AWS Service \u2192 EC2 \u0438 \u0438\u0434\u0451\u043c \u0432 Permissions.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c AmazonSSMManagedInstanceCore \u0434\u043b\u044f SMM \u0438 \u043d\u0430\u0448\u0443 \u043f\u043e\u043b\u0438\u0441\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0440\u0430\u043d\u043d\u0435 VssSnapshotPolicy. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0435\u043c \u0442\u0430\u0433 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0440\u043e\u043b\u0438 \u0438 \u0434\u0430\u0451\u043c \u0435\u0439 \u0438\u043c\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c VssSnapshotRole.<\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0451\u043c \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u044d\u0442\u0443 \u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. <\/p>\n<p>  \u0412\u0441\u0451 \u0442\u0435\u043f\u0435\u0440\u044c ssm \u043c\u043e\u0436\u0435\u0442 \u201c\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u201d \u044d\u0442\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c AWSVssComponents. \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c Run command \u0438 \u0436\u043c\u0451\u043c Run command \u0438\u0449\u0435\u043c AWS-ConfigureAWSPackage.<br \/>  \u0412 Command parameters \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c Install, Name \u2013 AwsVssComponents, \u0412\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f.<br \/>  \u0412 Target \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u0435\u043a\u0430\u043f\u0438\u0442\u044c. <br \/>  \u0416\u043c\u0451\u043c RUN. <\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u043a\u0430\u043f \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 SSM. <\/p>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c Run command, \u0438\u0449\u0435\u043c AWSEC2-CreateVssSnapshot. \u0412 Target \u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a Exclude Boot Volume, Copy Only \u0438 No Writers.<\/p>\n<p>  \u0416\u043c\u0451\u043c RUN. \u0423 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c\u0441\u044f \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043e \u0431\u0435\u043a\u0430\u043f\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c SNS Topic. \u0418 \u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c\u0441\u044f \u043d\u0430 \u043d\u0435\u0433\u043e. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443. <br \/>  \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0448\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u044c <\/p>\n<pre><code class=\"json\">{     \"Version\": \"2012-10-17\",     \"Statement\": [         {             \"Sid\": \"VisualEditor0\",             \"Effect\": \"Allow\",             \"Action\": \"sns:Publish\",             \"Resource\": \"arn:aws:sns:ap-northeast-1:Account ID:Topic Name\"         }     ] } <\/code><\/pre>\n<p>  \u0418 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0440\u043e\u043b\u044c \u0441 \u044d\u0442\u043e\u0439 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f SSM maintenance window. <br \/>  \u0416\u043c\u0451\u043c Create maintenance window. \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c Name, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c Schedule \u043a\u0430\u043a\u043e\u0439 \u0434\u0443\u0448\u0435 \u0443\u0433\u043e\u0434\u043d\u043e. <\/p>\n<p>  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 maintenance window \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Register RUN command task. \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0412 Tag \u044f \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0442\u0438\u043f \u0431\u0435\u043a\u0430\u043f\u0430 (TAG Key=SnapshotType,Value=). \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0442\u0440\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 Day, Week, Month \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0440\u0438 maintenance window. \u0421\u0442\u0430\u0432\u0438\u043c Enable SNS notifications \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0440\u043e\u043b\u044c \u0434\u043b\u044f sns \u0438 topic. <br \/>  \u0412\u0441\u0451 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e. <\/p>\n<p>  \u0418 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432 \u0443 \u043d\u0430\u0441 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u2013 \u0438\u0445 \u043d\u0430\u0434\u043e \u0447\u0438\u0441\u0442\u0438\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c AWS \u2013 Lambda. <\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u043e\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u043c\u0435\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b. <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 IAM \u0441\u043e\u0437\u0434\u0430\u0451\u043c policy <\/p>\n<pre><code class=\"json\">{     \"Version\": \"2012-10-17\",     \"Statement\": [         {             \"Sid\": \"VisualEditor0\",             \"Effect\": \"Allow\",             \"Action\": [                 \"logs:DeleteSubscriptionFilter\",                 \"ec2:DeleteSnapshot\",                 \"ec2:DescribeSnapshots\",                 \"logs:DeleteLogStream\",                 \"logs:CreateExportTask\",                 \"logs:DeleteResourcePolicy\",                 \"logs:CreateLogStream\",                 \"logs:DeleteMetricFilter\",                 \"logs:TagLogGroup\",                 \"logs:CancelExportTask\",                 \"ec2:DescribeVolumes\",                 \"logs:DeleteRetentionPolicy\",                 \"logs:DeleteLogDelivery\",                 \"logs:AssociateKmsKey\",                 \"logs:PutDestination\",                 \"logs:DisassociateKmsKey\",                 \"logs:UntagLogGroup\",                 \"logs:DeleteLogGroup\",                 \"logs:PutDestinationPolicy\",                 \"ec2:DescribeSnapshotAttribute\",                 \"logs:DeleteDestination\",                 \"logs:PutLogEvents\",                 \"logs:CreateLogGroup\",                 \"logs:PutMetricFilter\",                 \"logs:CreateLogDelivery\",                 \"logs:PutResourcePolicy\",                 \"logs:UpdateLogDelivery\",                 \"logs:PutSubscriptionFilter\",                 \"logs:PutRetentionPolicy\"             ],             \"Resource\": \"*\"         }     ] } <\/code><\/pre>\n<p>  \u0418 \u044d\u0442\u0443 policy \u0432\u0435\u0448\u0430\u0435\u043c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0440\u043e\u043b\u044c. <\/p>\n<p>  \u0418\u0434\u0451\u043c \u0432 lambda \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u043e\u0432\u0443\u044e python \u0444\u0443\u043d\u043a\u0446\u0438\u044e. <\/p>\n<pre><code class=\"python\">import datetime import sys import boto3   def get_volume_snapshots(client, volume_id, SnapshotType):         args = {                 \"Filters\": [                         { \"Name\": \"volume-id\", \"Values\": [volume_id] },                         { \"Name\": \"status\", \"Values\": [\"completed\"] },                         { \"Name\": \"tag-key\", \"Values\": [\"SnapshotType\"]},                         { \"Name\": \"tag-value\", \"Values\": [SnapshotType]},                 ],                 \"OwnerIds\": [\"self\"]          }         snapshots = []         while True:                 resp = client.describe_snapshots(**args)                 snapshots += resp.get(\"Snapshots\", [])                 if \"NextToken\" in resp:                         args[\"NextToken\"] = resp[\"NextToken\"]                 else:                         break          return snapshots     def delete_snapshot(client, snapshot_id):         wait_period = 5         retries = 5         while True:                 try:                         client.delete_snapshot(SnapshotId=snapshot_id)                         return True                 except Exception as ex:                         # As the list of snapshot is eventually consistent old snapshots might appear in listed snapshots                         if getattr(ex, \"response\", {}).get(\"Error\", {}).get(\"Code\", \"\") == \"'InvalidSnapshot.NotFound\":                                 return False                         # Throttling might occur when deleting snapshots too fast                         if \"throttling\" in ex.message.lower():                                 retries -= 1                                 if retries == 0:                                         raise ex                                 time.sleep(wait_period)                                 wait_period = min(wait_period + 10 , 30)                                 continue                         raise ex  def lambda_handler(event, context):         retentions = {\"Day\": 5, \"Week\": 3, \"Month\": 2}         client = boto3.client(\"ec2\")         vols = client.describe_volumes()         snapshots_deleted = []         for vol in vols['Volumes']:                 vol_id = vol['VolumeId']                 for SnapshotType, retention_count in retentions.items():                          snapshots_for_volume = sorted(get_volume_snapshots(client, vol_id, SnapshotType), key=lambda s: s[\"StartTime\"], reverse=True)                         snapshots_to_delete = []                         if retention_count &gt; 0:                                 snapshots_to_delete = [b[\"SnapshotId\"] for b in snapshots_for_volume[retention_count:]]                         for snapshot_id in snapshots_to_delete:                                 if delete_snapshot(client, snapshot_id):                                         snapshots_deleted.append(snapshot_id)         return {                 \"DeletedSnapshots\": snapshots_deleted         } <\/code><\/pre>\n<p>  \u0420\u043e\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c CloudWatch Event. <br \/>  \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0432\u0441\u0435\u043c volume, \u0438\u0449\u0435\u0442 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 volumes \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 completed, \u0442\u0435\u0433\u043e\u043c SnapshotType \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 snapshot retentions. \u0423 \u043c\u0435\u043d\u044f \u0445\u0440\u0430\u0438\u0442\u0441\u044f 5 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u043d\u0435\u0432\u043d\u044b\u0445, 3 \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0438 2 \u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0445 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/462601\/\"> https:\/\/habr.com\/ru\/post\/462601\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0418\u043c\u0435\u0435\u043c windows \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 AWS \u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0449\u0451 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438 \u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b, \u0430 lifecycle \u0432 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430\u0445 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442. \u041d\u043e\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 AWS Backup \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0435\u0449\u0451 \u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u044b \u0438\u043b\u0438 \u044f \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043a\u0430\u043a. \u041d\u0443 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0431\u044b \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0431\u0435\u0437 \u043c\u043e\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u0438\u044f.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-293011","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293011"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293011\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}