By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Recovering files from Lightsail snapshot running Windows Server 2019

0

This Windows Server instance is a single applications server and domain controller (a domain controller only since forced to do so to allow user CALs to be acquired for remote desktop access). Since I only want to retrieve lost files, I was hoping I could simply restore snapshot to new instance, access the instance via RDP and retrieve the files, then delete that instance.

Since both instances will have the same SID, do I need to stop the 'production' instance prior to restoring the snapshot to the new instance? I'm guessing that having both instances running at the same time could present a problem(?).

asked 5 months ago386 views
4 Answers
2

If you only need files from the machine, you could try exporting it as an AMI into EC2. Instead of launching it as a running server and risking the kinds of conflicts you're describing, you could simply create EBS volumes from the snapshots in the AMI and attach the resulting EBS volumes as secondary volumes to any regular EC2 instance. Mounting the file systems/drive letters would give you access to the file contents.

https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-exporting-snapshots-to-amazon-ec2.html

EXPERT
answered 5 months ago
profile picture
EXPERT
reviewed 4 months ago
profile pictureAWS
EXPERT
reviewed 4 months ago
0
Accepted Answer

Finally have the solution. I was really close last time, but unfortunately, I had chosen 'Windows Server Core Basic' instead of 'Windows Server Basic'. 'Core Basic' has no GUI, nothing. 'Basic' has the essentials, including the Explorer shell and access to the clipboard. Once I created the correct instance type (didn't choose 1gb RAM 'free tier', chose t3 (cpu type) and g3 (SSD type) and since this instance is only temporary to restore data from the snapshot volume, who cares about slight cost), I was easily able to extract the SQL database from the attached volume, then detach the volume and then delete the instance.

Also, since I may need to restore data from snapshots in the future, I created an 'instance template' consisting of all the steps needed to create another instance. Next time I need to restore data from a snapshot, all I'll need to do is 'create instance from template' and in a couple of clicks, the instance will be ready to use. Of course, I'll need export the image from Lightsail to EC2, then create and EBS volume, then attach the volume to the instance.

This is far safer than risking a production Lightsail instance running Windows 2019 because of the potential SID conflict. Still not sure if using Lightsail to 'create instance from Snapshot' is safe, even if the original instance is stopped while the 'copy' instance is running. It's possible that software licenses could become invalidated.

answered 4 months ago
0

OK, I finally found the correct reference: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-creating-ebs-volumes-from-exported-snapshots.html and now there's a volume. Now, I guess I need to create a Windows EC2 instance and attach the volume/mount. Is it possible to attach this volume to a new Lightsail instance as a secondary volume (I'm guessing it will be much easier than creating an Windows EC2 instance)?

answered 4 months ago
  • Now that I have a volume created, there's no option anywhere to simply create an EC2 instance, then attach that volume. Also, there's no option to not encrypt the volume. My guess is because it's forced to be encrypted, when I try to 'attach volume', the LIghtsail instance is not available in the list of available instances. I guess this is done deliberately by Amazon to keep the process as artificially complex as possible (?!)

    The only option is to create an instance from the AMI that was imported. This defeats the purpose - it's the same thing as the Lightsail option to 'create instance from snapshot', which is what I originally posted about.

  • I have to 'launch instance' to be able to actually create a new instance (?!) Now I have a Window instance with the EBS volume attached. When I launch this instance, it's completely crippled, no UI, no explorer shell, even the CD command is completely crippled (command line switches disabled). Used DiskPart to put the volume online as D:, but with no explorer shell and no way to utilize the clipboard, how will I transfer files out of the RDP session?

  • Hi,

    It was unfortunate you received the earlier suggestion to move to EC2. Please instead try recovery within Lightsail itself by creating a snapshot of the instance's root disk and then using a disk created from that snapshot as an attached disk on a new instance for data recovery. Please find steps in https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-create-an-instance-root-volume-snapshot.html . For the step 1 and 2 from that guide, you can instead use AWS CloudShell from the browser itself in place of AWS CLI. Please find CloudShell usage details in https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-cloudshell.html#lightsail-cloudshell-launch-and-use

    Thanks

0

I can't create a new snapshot of the root disk. I need to access data from an earlier snapshot, since the current instance is missing this essential data.

answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions