How To Use Deja Dup To Backup To Amazon S3

Deja Dup Amazon S3

Deja Dup is a backup program that supports local and remote / cloud backups, which compresses and encrypts the data. Most of the work is done by duplicity, a command line backup tool for which Deja Dup acts as a graphical wrapper.

[[Edit]] Backing up to Amazon S3 is no longer available with Deja Dup 42. At least up to version 40, it still works though (so it works on Ubuntu 20.04 LTS, but not on Ubuntu 20.10).

The application, which integrates tightly with the GNOME desktop, officially supports Google Drive and Nextcloud as cloud backup storage locations.

Unofficially though, Deja Dup also supports Amazon S3, Google Cloud Storage, Openstack Swift, and Rackspace Cloud Files services.

Backup to these cloud services has been marked as deprecated in Deja Dup, but there are no plans to drop support for them right now, and "for the foreseeable future, they are staying". They are, however, hidden by default.

Related: Securely And Efficiently Backup Data On Linux Or macOS With Vorta (BorgBackup GUI)

This article explains how to set up Deja Dup backup tool to take Linux desktop backups to Amazon S3.

If you don't already have Deja Dup installed (it's installed by default on quite a few GNOME Linux distributions), you should be able to find it in the repositories.

With Deja Dup installed but closed, it's time to change an option that's only available with Dconf, which unhides the Amazon S3 option from the Deja Dup storage location options. This can be done using Dconf Editor, by navigating to /org/gnome/deja-dup and changing the backend key to s3. This can also be done using a command:

gsettings set org.gnome.DejaDup backend s3

In the same way, you may also use gcs for Google Cloud Storage, openstack for Openstack Swift, and rackspace for Rackspace Cloud Files services. I have personally only tried backing up to Amazon S3 from these services though.

Now launch Deja Dup (it may be shown as "Backups" in your applications menu), and select the folders you want to backup, and those you want to ignore. Next, click on Storage location on the sidebar, and you'll be able to choose Amazon S3 as the storage location.

To authenticate Deja Dup with your Amazon S3 account, you'll need an Access Key ID and Secret Access Key, which you can get from your Amazon AWS Console: login, click on your name in the upper right-hand side corner of the screen, click My Security Credentials, then expand Access keys, create a new Access Key there, and save the Key ID and Secret Access Key somewhere safe.

Back in Deja Dup (on the Storage location tab), enter the Amazon S3 Access Key ID:

Deja Dup Amazon S3

Now you can create your first backup by clicking Overview in the Deja Dup sidebar, then clicking the Back Up Now button:

You'll be prompted to enter the Amazon S3 Secret Access Key, and later to enter an encryption password, which is used for encrypting your backups. You'll want to check the "Remember" box for both the Amazon S3 Secret Access Key and encryption password if you plan on scheduling automatic backups.

Want Deja Dup to save the backups in an already existing S3 bucket? There's a hidden setting for that too - use Dconf Editor and navigate to /org/gnome/deja-dup/s3/ and change the bucket key value to your bucket's name. Do it with a command instead of Dconf Editor, using:

gsettings set org.gnome.DejaDup.S3 bucket '<bucketname>'

Want to reset the Deja Dup backend key to default (only the officially supported cloud backup backends will be shown, so Amazon S3 will no longer be an option in Deja Dup after this)? You can do it with Dconf Editor by going to /org/gnome/deja-dup, and turning on the Use default value option for the backend key, or use:

gsettings reset org.gnome.DejaDup backend