Securely Backup Local Data From PC To Amazon S3 Using Duplicati

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.

Duplicati first run

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.

Duplicati web interface

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.

creating a bucket from Amazon S3 dashboard

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.

accessing AWS security credentials

Next, click Create New Access Key.

creating a new access key for Amazon S3

Now that the required information and backup bucket is ready at S3 end, local data can be backed up using Duplicati.

AWS ID and key generated

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.

adding a new backup instance in Duplicati

Fill in the essential fields like the name of backup, and set a passphrase.

setting a passphrase for backups in Duplicati

This passphrase will also be used to restore backups so make sure to store it somewhere accessible.

storing passphrase for Duplicati


As the data needs to be backed up to S3, change the Storage Type option to Proprietary > Amazon S3.

choosing backup destination as Amazon S3 in Duplicati

In the next window, enter the S3 related information from before.

configuring Duplicati to connect to Amazon S3

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.

testing connection from Duplicati to Amazon S3

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.

selecting local data to be backed up to Amazon S3 using Duplicati

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.

setting a backup schedule in Duplicati

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.

configuring backup retention settings in Duplicati

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.

backing up local data to Amazon S3 from Duplicati

When it is done, there will be a notification for the same.

backup notification in Duplicati

You can verify the data that is backed up to S3 by clicking on the bucket name.

backed up data using Duplicati stored in Amazon S3

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.

Restoring backups:

To restore the backup, choose Restore from the Duplicati interface.

restoring Duplicati backups

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.

restoring or deleting Duplicati backups

All done.

Happy backing up.

Comments are closed.