Saturday, October 25, 2025

take S3 backups with DejaDup on Ubuntu 20.10


DejaDup is the default backup utility for Gnome. It’s a GUI for duplicity, focuses on simplicity, helps incremental encrypted backups and up till lately supported numerous cloud suppliers. Sadly as of model 42.0, all main cloud suppliers have been eliminated. Thus on condition that Ubuntu 20.10 ships with the particular model, any consumer who upgrades and has backups on Amazon S3 received’t be capable of entry them. On this weblog publish, we are going to present an answer that may can help you proceed taking backups on AWS S3 utilizing DejaDup.

The necessary rant (be happy to skip)

The removing of the cloud suppliers mustn’t come as a shock. I’m not precisely certain which model of DejaDup deprecated them but it surely was across the launch of Ubuntu 17.10 once they had been all hidden as an choice. So for 3 lengthy years, individuals who had backups on Amazon S3, Google Cloud Storage, Openstack Swift, Rackspace and so forth might nonetheless use the deprecated characteristic and put together for the inevitable removing.

So why complain you would possibly ask? Nicely, to start with, once you replace from an earlier model of Ubuntu to twenty.10, you don’t actually know that the all cloud suppliers are faraway from DejaDup. Therefore if one thing goes unsuitable through the replace, you received’t be capable of simply entry your backups and restore your system.

One other large downside is the dearth of storage choices on the final model of DejaDup. They determined to alter their coverage and assist solely “consumer-targeted cloud companies” however presently they solely assist Google Drive. So that they eradicated all the price environment friendly choices for mass storage and saved just one single very costly choice. I’m not likely certain how that is good for the customers of the applying. Linux was all the time about having a alternative (an excessive amount of of it in lots of instances), so why not preserve a number of storage choices to serve each the skilled and inexperienced customers? Fortunately as a result of we’re on Linux, we’ve got choice to repair this.

use Deja Dup v42+ with AWS S3

WARNING: I’ve not examined completely the next setup so use it at your personal threat. If the pc explodes in your face, you lose your knowledge, or your partner takes your youngsters and leaves you, don’t blame me.

Putting in s3fs fuse

With that out of the best way, let’s proceed to the repair. We’ll use s3fs fuse, a program that means that you can mount an S3 bucket by way of FUSE and successfully make it seem like a neighborhood disk. Fortunately you don’t must compile it from supply because it’s on Ubuntu’s repos. To put in it, sort the next in your terminal:

sudo apt set up s3fs

Establishing your AWS credentials file

Subsequent, we have to configure your credentials. The s3fs helps two strategies for authentication: an AWS credential file or a customized passwd file. On this tutorial we are going to use the primary methodology however if you’re for the latter be happy to view the s3fs documentation on Github. To setup your credentials ensure that the file ~/.aws/credentials comprises your AWS entry id and secret key. It ought to seem like this:


[default]
aws_access_key_id=YOUR_ACCESS_KEY_ID
aws_secret_access_key=YOUR_SECRET_ACCESS_KEY

Mounting your bucket to your native filesystem

As soon as your have your credentials file you’re able to mount your backup bucket. In case you don’t keep in mind the bucket identify you will discover it by visiting your AWS account. To mount and unmount the bucket to/from a particular location sort:


# mount
s3fs BUCKET_NAME /path/to/location

# unmount
fusermount -u /path/to/location

Mounting the bucket like that is solely momentary and won’t persist throughout reboots. You’ll be able to add it on /and so forth/fstab however I consider this solely works with the passwd file. If you wish to use your AWS credentials file a simple workaround it to create a shortcut in your Startup Purposes Preferences.

Word that you may add a small 10 sec delay to make sure that the WiFi is linked earlier than you attempt to mount the bucket. Web entry is clearly mandatory for mounting it efficiently. If you’re behind VPNs or produce other advanced setups, you can too create a bash script that makes the required checks earlier than you execute the mount command.

Configuring DejaDup

With the bucket mounted as a neighborhood drive, we will now simply configure DejaDup to make use of it. Initially we have to change the backend to native. This may be executed both by utilizing a program like dconfig or the console with the next command:

gsettings set org.gnome.DejaDup backend 'native'

Lastly we open DejaDup, go to preferences and level the storage location to the listing that has your S3 backup recordsdata. Be sure to choose the subdirectory that comprises the backup recordsdata; that is sometimes a subdirectory in your mount level that has identify equal to your laptop’s hostname. Final however not least, ensure that the S3 mount listing is excluded from DejaDup! To do that, verify the ignored folders in Preferences.

That’s it! Now go to your restore tab and DejaDup will be capable of learn your earlier backups. You can even take new ones.

Gotchas

There are some things to remember on this setup:

  1. Initially, you should be linked on the web once you mount the bucket. If you’re not the bucket received’t be mounted. So, I counsel you rather than simply calling the mount command, to jot down a bash script that does the required checks earlier than mounting (web connection is on, firewall permits exterior requests and so forth).
  2. Taking backups like that appears slower than utilizing the outdated native S3 assist and it’s more likely to generate extra community site visitors (thoughts AWS site visitors prices!). That is anticipated as a result of DejaDup thinks it’s accessing the native file-system, so there is no such thing as a want for aggressive caching or minimization of operations that trigger community site visitors.
  3. You need to anticipate stability points. As we stated earlier, DejaDup doesn’t understand it writes knowledge over the wire a lot of the functionalities that often exist in such setups (akin to retry-on-fail) are lacking. And clearly in the event you lose connection halfway of the backup you’ll have to delete it and begin a brand new one to keep away from corrupting your future backups.
  4. Lastly take into account that this can be a very experimental setup and in the event you actually wish to have a dependable answer, you must do your personal analysis and choose one thing that meets your wants.

If in case you have a advice for an Open-Supply Backup answer that permits regionally encrypted incremental backups, helps S3 and has a simple to make use of UI please depart a remark as I’m very happy to offer it a strive.

Related Articles

Latest Articles