Schedule snapshot with scripts

mevans's Avatar


03 Mar, 2016 04:30 AM

Is it possible to schedule snapshots to be taken for volumes but also run a script before and after the snapshot is created to allow us to stop and then start services on the instance that the volume is mounted on to allow for the applications to stop writing to the disk?

  1. Support Staff 1 Posted by Ylastic on 03 Mar, 2016 01:32 PM

    Ylastic's Avatar

    Could you please clarify this use case some more? How do you foresee the scripts being run on the instance, as you cannot run a script on an instance via the EC2 API.


  2. 2 Posted by matt on 03 Mar, 2016 10:17 PM

    matt's Avatar

    Ideally we want to schedule consistent EBS volume snaphots for our windows instances. Is this something that ylastic offers?

    We can do this by stopping some high IO services on the instance before taking the snapshot. We could do this by running SSM Document commands, or running powershell scripts on the instances in some other way, but it needs to be part of the scheduled task, e.g. stop services, start the snapshot, then start the services again.

  3. Support Staff 3 Posted by Ylastic on 04 Mar, 2016 05:55 PM

    Ylastic's Avatar

    We would love to do something like this, but the issue here is how to hook into running something on an instance from outside the instance, via the API.

  4. 4 Posted by matt on 05 Mar, 2016 01:52 AM

    matt's Avatar

    Does the api that you use support SSM SendCommand?

  5. Ylastic closed this discussion on 01 Sep, 2016 08:21 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac