codebridge / ebs-snapshot-automation
自动为您的 AWS EBS 卷创建快照
v1.0
2016-05-15 19:10 UTC
Requires
- aws/aws-sdk-php: ^3.18
- illuminate/console: ^5.2
- mtdowling/cron-expression: ^1.1
- symfony/console: ^3.0
- vlucas/phpdotenv: ^2.2
This package is not auto-updated.
Last update: 2024-09-26 00:30:00 UTC
README
安装
composer require codebridge/ebs-snapshot-automation
设置
将 .env.example 复制到 .env,并使用您自己的 AWS 凭据进行编辑
登录 AWS 控制台,并使用适当的标签标记您想要快照的卷。您可以通过标记“Key”为“schedule”和有效的 CRON 表达式“Value”(例如 0 23 * * *)来为计划而标记卷。
使用方法
php ebs-php volumes:list (see all your volumes)
php ebs-php volumes:list --cache (save your volumes locally for snapshotting)
php ebs-php volumes:list --show-cached (show all volumes in the local cache)
php ebs-php scheduler:run (check if there are any commands that need to be ran right now and execute them)
CRON 作业
Check for volumes to snapshot every minute
* * * * * php /path/to/ebs-php volumes:snapshot >/dev/null 2>&1