How to Back Up Amazon Lightsail Instances
Amazon Lightsail is a cost-effective and lightweight virtual server that can be used for various purposes: deploying applications, creating testing environments, launching websites and blogs, and more. Compared to the Amazon EC2 virtual cloud servers service, it is easier to start with.
And while it’s easy to set up Amazon Lightsail server and run applications inside it, this server still needs to be regularly backed up.
In this article, we’ll overview two methods of backing up your data in Amazon Lightsail: with the native AWS snapshot backup and with MSP360 Managed Backup.
Backing Up Your Data with Lightsail Tools
To enable the backup feature, switch on the Enable Automatic Snapshots option. You can do this while creating the Lightsail instance or, later, in the Snapshots tab.
These snapshots will be made daily at the time you specify and will be stored by Amazon Web Services. The storage billing for them is simple compared to other AWS services: you pay for each GB/month. If you have snapshotted the same Lightsail instance several times, after the first copy, Amazon charges you only for changed blocks.
Bear in mind that creating a backup with Lightsail tools might take several hours, even if the amount of data is not large.
You’ll be able to find the copies at the homepage of your Amazon Lightsail account, in the Snapshots tab. Here, you can also create a snapshot manually.
Please note: automatic snapshots allow you to back up your instance only once a day. Also, there’s no option to choose a storage location or create a file-level backup.
Now you know how to back up your Lightsail server with the built-in backup tool. Below, we’ll describe how to perform it with MSP360 Managed Backup and why you should choose our solution.
Backing Up Your Data with MSP360 Managed Backup
With MSP360 Managed Backup, it is easy to customize your backups according to your needs:
- choose your own destination;
- set up schedule more granularly;
- switch on file compression;
- protect the data with a password;
- configure the retention policy;
- and more.
You can test backing up your Lightsail instance in a free version of CloudBerry Backup or evaluate a trial of the fully fledged MSP360 Managed Backup solution, which can be upgraded to a commercial version to use at scale. Below, you’ll find a guide on how to back up the Amazon Lightsail server using the MSP360 Managed Backup console.
How to Back Up Your Lightsail Instance with MSP360 Managed Backup
To be able to back up your data, install MSP360 Managed Backup on your Lightsail instance, either while creating the instance or later.
Copy the appropriate script in the Downloads tab of your console and paste it to the Launch script field during configuration of the instance.
Our instance runs on Linux, so we’ve copied a bash script and added #/bin/bash at the very beginning to run the script.
You can also install it afterward on the running server.
Once booted, the Lightsail virtual machine will appear in your endpoints list, which can be found in the Remote Management section of the RMM tab. The machine will be named after your IP address.
To create a backup plan, click the gear icon, then Show Plans, and Create Plan. For Linux, it will be a file-level backup.
Name your plan and specify whether it should execute block-level backups or not.
Choose what to back up: the whole instance or just important files. In the latter case, choose the files or folders you need. Find them in the list or type in the Include Paths field.
Specify the backup destination.
Customize the advanced filter for backing up your files if necessary.
Compress the backup to make it take up less space and protect it with a password if needed.
Define the retention policy: how many versions to store and for how long. It is recommended to leave the Always keep the last version option enabled – to avoid losing vital data.
Set up a convenient schedule for your backup.
Add pre- or post-actions. These actions are scripts that perform some actions before the plan starts or after it finishes.
Switch on notifications if you want to get immediate information about how the plan’s going.
Click Save and you’ll see your new backup plan in the list.
That’s it! The plan will be run according to the schedule you’ve defined.
The native Amazon Lightsail backup has its advantages, such as simplicity, but it lacks flexibility. You can’t change the backup destination, the schedule configuration options are limited, and there’s no opportunity to compress or encrypt files. If having these options is important for you, it is worth choosing a third-party backup solution – such as MSP360 Managed Backup. If you have any questions, contact us.