我目前正在处理一项任务,该任务应该备份所有 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。