Doing VM Backup in AWS
Here is the full, step-by-step guide to automate backups of your finmars-platform-vm, including both its EC2 settings (AMI) and its disk (EBS volumes), all in one place:
- Sign in to AWS
- Open your browser and go to console.aws.amazon.com.
- Enter your AWS username and password.
- Open AWS Backup
- In the top search box, type Backup.
- Click AWS Backup when it appears.
- Create a new backup plan
- In the left menu, click Backup plans.
- Click Create backup plan.
- Choose Build a new plan.
- Give the plan a name, for example finmars-daily.
- Under Backup rule, set:
- Frequency: Daily
- Time: 01:00
- Retention: e.g. keep for 7 days
- Click Create plan.
- Edit the rule to back up both EC2 and EBS
- Under your new plan, find the Backup rule you just made.
- Click the three-dot menu next to it and choose Edit rule.
- Scroll to Resource selection.
- For Resource type, pick Amazon EC2.
- This makes AWS Backup create an AMI of your instance.
- Click Add another resource type.
- Pick Amazon EBS.
- This makes AWS Backup snapshot your volumes.
- Click Update rule.
- Assign your VM and its volumes
- In your plan, click Assign resources.
- Give the assignment a name, like finmars-vm-and-volumes.
- Under Select resource IDs, choose:
- Your finmars-platform-vm instance ID
- The IDs of its EBS volumes (usually listed under the instance)
- Click Assign backup.
- Check your automated backups
- In the left menu, click Backup vaults to see where backups are stored.
- Click Protected resources to confirm your VM and volumes are listed.
- Change or stop the plan
- To change schedule or retention, go to Backup plans, select finmars-daily, then edit the rule.
- To stop backups, select the plan and click Delete.
🎉 Now AWS Backup will run every day at 01:00. It will:
- Create an AMI of your EC2 instance (so you can launch a new server with all settings intact)
- Snapshot your EBS volumes (so your data and files are safe)