【发布时间】:2017-09-19 09:04:45
【问题描述】:
我目前正在处理一项任务,该任务应备份所有 AWS Codecommit 存储库(目前大约 60 个存储库)并将它们放在另一个 AWS 账户中的 S3 存储桶中。
我已经用谷歌搜索了它以找出与此相关的可能性,但没有找到最适合我的要求。
1.) 考虑使用代码管道:
We can configure AWS CodePipeline to use a branch in an AWS CodeCommit
repository as the source stage for our code. In this way, when you make
changes to your selected branch in CodePipeline, an archive of the
repository at the tip of that branch will be delivered to your CodePipeline
bucket.
But, I had to neglect this option as it could be applied only to a
particular branch of a repository whereas I want a backup for 60
repositories all at a time.
2.) 考虑使用克隆 git 的简单 git 命令执行此操作 存储库,将克隆的东西放入一个文件夹并将它们发送到 S3 存储在另一个帐户中。
I had to neglect this because it complicates my process when a new git
repository is created where I need to manually go to AWS account and get the
url of that repo to clone.
所以,我想知道是否有一个好的选项可以自动备份位于不同 AWS 账户的 S3 中的 Codecommit 存储库。如果任何 repos 中的某些内容发生更改,它应该会自动触发更改的部分并将其移动到 S3。
【问题讨论】:
标签: amazon-web-services amazon-s3 aws-lambda aws-codecommit