How to setup automatic scheduled snapshots for each single AMI/EBS?

后端 未结 5 1774
天命终不由人
天命终不由人 2021-02-08 04:38

Does Amazon support any kind of automatic scheduled snapshots that can be configured for each single AMI/EBS?

my goal is to have each AMI backup itself regularly without

5条回答
  •  难免孤独
    2021-02-08 05:22

    I have created a small Perl program, https://github.com/sciclon/EBS_Snapshots

    Some features: * Program runs in daemon mode or script mode (crontab)

    • You can chose only local attached volumes or remotes as well

    • You can define log file

    • You can define for each volume quantity of snapshots

    • You can define for each volume the frequency among them

    • Frequency and quantity will work like a "round-robin" when it reaches the limit removing the oldest snapshot.

    • you can readjust in one step the quantity I mean if you have 6 snapshots and you modify the quantity in 3 the process will readjust it automatically.

    • You can define a "prescript" execution, You can add your code to execute before executing the snapshot, for example you would like to try to umount the volume or stop some service, or maybe to check the instance load. The parent process will wait for the exit code, "0" means success, you can define if continue or not depending on the exit code.

    • You can define a "postscript" execution to execute any scrip after taking the snapshot (for example a email telling you about it)

    • You can add "Protected Snapshots" to skip the snapshot you define, I mean they will be in "read only" and they will never been erased.

    • you can reconfigure the script "on the fly" when it is running in daemon mode, the script accepts signals and IPC.

    • It has a "local-cache" to avoid requesting the API several times. You can add or modify any configuration in the config file and reload without killing the process.

提交回复
热议问题