Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some Windows servers hosted on Amazon EC2. Some run Windows Server 2003 and other run Windows Server 2008. These are EBS-backed instances. Most of the instances also have some additional EBS-volumes attached.

We want to schedule a daily snapshot of the windows machines (and also the attached EBS-volumes) to S3 so that we have daily backups available.

One would think that this is a very common requirement and would be made available via the AWS Management Console, but alas, it is not. What approaches are available? How do I schedule daily snapshots on our Windows Servers?

There are several scripting examples available online for Linux, but not so much for windows. I have had a look at as well as Has anyone used one of these approaches and does it work?

I have also considered a service like Skeddly which seems inexpensive at first glance but when you look at using it for several servers the price soon escalates to such a point where it seems a better option to create your own solution as you can then apply it to new servers in the future. With Skeddly we'll pay for each server.

How do we schedule daily snapshots of our windows instances?

share|improve this question

Amazon Web Services recently announced PowerShell command line tools for Windows and it's packaged along with their AWS Tools for .NET SDK.

The AWS Powershell tools make it quite easy to create a snapshot:

New-EC2Snapshot "vol-371acd04" -Description "My Snapshot"

And you can query your snapshots like this:

PS C:\Program Files (x86)\AWS Tools\PowerShell> Get-EC2Snapshot | more

SnapshotId  : snap-18be2b28
VolumeId    : vol-371acd04
Status      : completed
StartTime   : 2012-12-28T08:17:00.000Z
Progress    : 100%
OwnerId     : 383816850479
VolumeSize  : 30
Description : My Snapshot
OwnerAlias  :
Tag         : {}

Make sure you have the AWS Powershell tools installed and just create a scheduled task that uses a powershell script similar to the snippet above to schedule your snapshots and you should be good.

Updated to query for attached EBS volumes:

To query for EBS volumes attached to your instance and then snapshot each of them you could do something like this:

# Find my instance ID from the EC2 metadata
$myInstanceID = (New-Object System.Net.WebClient).DownloadString("")

# Query for volumes that are attached to my Instance Id
$volumes = (Get-EC2Volume).Attachment | where {$_.InstanceId -eq $myInstanceID } | Select VolumeId

# Iterate through these volumes and snapshot each of them
foreach ($volume in $volumes)
    New-EC2Snapshot $volume.VolumeId -Description "My Snapshot"
share|improve this answer
Thank you very much. This seems to be what I am looking for. Please just clarify: it seems like the New-EC2Snapshot command will only take a snapshot of a specific volume. In my case I have the Instance and it also has some EBS-volumes attached. How would I take a full snapshot of the entire instance including the root device and the attached EBS volumes? – Stanley Jan 28 '13 at 9:42
@Stanley updated to query for the EBS volumes attached to your instance and snapshot each – Ameer Deen Jan 28 '13 at 11:36
I see thank you. That means that there will be separate snapshots for each volume. I just want to understand the implication of this: In case of failure, how would I bring up a replacement instance? The snapshots for the EBS root volume and the individual mounted EBS volumes will all be separate. How would I bring up a replacement instance with the mounted drives from the different snapshots? – Stanley Jan 28 '13 at 15:02
Why can you not set this up via the EC2 dashboard? For people who are not overly confident with the scripts? – leen3o Oct 4 '13 at 7:21

AutomatiCloud does exactly what you need. It is an easy to use windows tool where you can schedule backups for your EBS Volumes:

share|improve this answer
This looks really good! I'm going to download and give it a go later today. – leen3o Jul 10 '15 at 6:46
Is automaticloud free? Will it ask me for money after I use it for a while? – EricP Jul 16 '15 at 21:08
AutomatiCloud is free. Advanced features require registration. – Stephan Buhre Oct 13 '15 at 20:09

Jumping in on an old answer that started me off on my search. Kudos to Ameer Deen above for the scripts, btw.

Found this post which dives in much deeper to PowerShell scripts to fully automate the data-gathering and EBS snapshot process:

Then of course discovered that those were all written for the now-depreciated v1.0 of the AWS SDK, so I spent the last day fixing that and getting them all working with v2.0:


share|improve this answer

You can write a script that talks to the EC2 API to schedule those snapshots. It can be run on one of your existing instances or you could set up a small linux instance for this purpose on a t1.micro whose sole function is to kick off the snapshots for the Windows hosts. The script could be put on the linux host as a cron job to run daily at the time you choose.

The first link is an example of scripting that from a Windows host and it could easily be automated with Scheduled Tasks in Windows.

I have not used the application you linked on your second link.

share|improve this answer
Could you perhaps give some more detail? I realize that the solution would probably be for me to write some kind of script but this knowledge on it's own isn't sufficient for me to solve the problem, unfortunately. Do you perhaps have a link or sample of the scripts that you are referring to? – Stanley Nov 28 '12 at 14:49
The one you linked from your question will actually work fine. Are you familiar with the AWS API Command-Line tools at all? – Nathan V Nov 28 '12 at 15:07

The current EBS Snapshot capabilities for Windows Instances are explained here:

In order to get a consistent snapshot, you have to pause writes to the volume long enough for the snapshot to complete. Typically, this means you that you have to unmount the volume. The AWS doc does not discuss how to do this via commandline on Windows, but you can find out about that in this superuser thread:

To get a snapshot of the system boot volume, you need to stop your instance.

Hope that helps.

share|improve this answer

Follow the link below,

Hope this helps. :)

Note: This script is only for linux

share|improve this answer
This does not help. As mentioned in the question my question is for Windows. I even mention that I've seen some scripting examples in Linux but that these are not useful. I'd appreciate if you have some help for Windows please. – Stanley Nov 28 '12 at 14:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.