Duplicati is an open source, block based backup client that can be used to backup/restore data to online storage services like Amazon S3 and others.Â (Amazon Simple Storage Service [S3] is a flexible online storage service that can be used to backup data by storing it in the form of buckets. )
Duplicati can create backup of local data from Windows, Linux and Mac platforms. (To directly backup data from Linux command line to S3, refer to this earlier article here).
A key difference when using Duplicati to backup data as compared to other backup clients is that it isn’t a file synchronization service or a disk imaging solution.
Instead, what it does is split the existing data into blocks, compress and encrypt them using AES-256 encryption and then backs up to local/remote storage. Also, it needs to be installed on the source machine from where data is to be backed up.
Download and install Duplicati from here.
Depending on the user environment, during first run it is recommended to set a password.
You can skip this if you are the only user or choose Yes and set one.
It has a web interface which makes it useful to install and run from even headless systems that are assigned for storage.
Configuring Amazon S3 service to store backups:
Before starting with backups to Amazon S3, there are a couple of things needed :
- An Amazon S3 bucket for storing backup data
- AWS access ID and access key
To do this :
Login to AWS S3 console and Create bucket.
Next, an AWS Access key and ID will be required for Duplicati to connect to this S3 bucket. This can be generated from AWS console too. Click on your username and choose My Security Credentials.
Next, click Create New Access Key.
Now that the required information and backup bucket is ready at S3 end, local data can be backed up using Duplicati.
Configuring and executing backups:
From the Duplicati web interface, click on Add Backup. As this will be a new backup, choose Configure a new backup and hit Next.
Fill in the essential fields like the name of backup, and set a passphrase.
This passphrase will also be used to restore backups so make sure to store it somewhere accessible.
As the data needs to be backed up to S3, change the Storage Type option to Proprietary > Amazon S3.
In the next window, enter the S3 related information from before.
This will include the name of the S3 bucket to which the data will be backed up to, region, AWS Access ID and Access key.
To make sure Duplicati can connect with S3 bucket, click on Test Connection. When prompted to rename the S3 bucket, choose No.
If all goes well, the connection will be validated and now backups can be done.
Click Next and from Source Data, choose the local files and folders to be backed up to S3.
Finally, from the Schedule section, you can either make this backup as a one time instance or schedule it to run automatically as needed. Click Next.
Backups performed can either be deleted starting with the oldest, be kept or can be set as a custom retention policy. Click Save after setting a retention policy.
Once the backup instance is all set, you can either manually run it immediately by clicking on Run now or let it execute as per schedule.
When it is done, there will be a notification for the same.
You can verify the data that is backed up to S3 by clicking on the bucket name.
It will include files with the prefix duplicati. Once again, as Duplicati is a block based backup solution, the files backed up won’t be stored as they are originally but as compressed, encrypted blocks making these backups a lot more secure.
To restore the backup, choose Restore from the Duplicati interface.
Choose the backup name that needs to be restored and click Next.
There will be a range of options for the chosen backup. It can either be deleted, have the configuration exported or restored. If you choose to delete, the remote backup files can also be marked for deletion so choose accordingly.
Happy backing up.