Déjà Dup is a free an open source program we can use to easily create incremental data backups on Linux. The program is basically a graphical frontend for Duplicity; its goal is to hide complexity, be simple and easy to use. Backups created with Déjà Dup can be encrypted and stored locally and remotely, even using storage space provided by services like Google Drive.
In this tutorial we see how to install Déjà Dup on some of the most used Linux distributions, how to create and restore data backups.
In this tutorial you will learn:
- How to install Déjà Dup on some of the most used Linux distributions
- How to create backups
- How to restore backups
- How to schedule backups
|Category||Requirements, Conventions or Software Version Used|
|Conventions||# – requires given linux-commands to be executed with root privileges either directly as a root user or by use of
There is more than one way we can install Déjà Dup. Since the software is completely open source and available in the repositories of the most used Linux-based systems, we can simply install it by using our favorite distribution native package manager.
On Debian and its derivatives, for example, we can use the
apt wrapper to perform the installation:
$ sudo apt install deja-dup
On Fedora, instead, we use
$ sudo dnf install deja-dup
Déjà Dup is also available in the Arch Linux “Community” repository. It can be installed with
$ sudo pacman -Sy deja-dup
Déjà Dup can also be installed as a flatpak or a snap package. Those installation methods have the advantage of providing the latest version of packages together with their dependencies, so to avoid any compatibility issue.
To install Déjà Dup as a flatpak, assuming the
flatpak binary to be installed and the flathub repository to be included among the available software sources (read this tutorial to know how to proceed), we need to run:
$ flatpak --user install flathub org.gnome.DejaDup
In the above example we used the
--user option in order to install the software only for the non-privileged user we running the command as. This let us avoid having to escalate privileges. Software installed as a flatpak have limited access to the system, since it runs in a sandbox; this is good for security.
To install Déjà Dup using the snap package manager (here I assume it is installed) we need to run:
$ sudo snap install --classic deja-dup
Snap packages can only be installed system-wide, therefore we usually need to invoke the
snap package manager with sudo to escalate privileges. As you can see, in the example above, we used the
--classic option when installing the package: this is needed since the package uses “classic” confinement (it basically has no sandbox). This type of installation requires the
/snap directory to exist on the system. It is usually created as a symlink which points to
$ sudo ln -s /var/lib/snapd/snap /snap
The first time we launch Déjà Dup, we are prompted to choose if we want to perform our first backup or restore one we previously made. In this case we want to perform the first action, therefore we click on the blue button:
The next thing we need to do is to decide what directories we want to backup and those we want to exclude. By default the whole Home is included, except for the Trash and the Download subdirectories:
Since I selected Google Drive as a destination, as a next step I need to grant the application access to the service. To do that I click on the “Grant Access” button:
Once we enter our credentials in the form and successfully login, we must confirm we want to allow the application to access our Google Drive space and let it create, edit and delete files:
Once we confirm our choice, we are redirected to the application interface, in order to choose whether to encrypt the backup or not. When we choose to store our backups on Google Drive or similar services, we definitely want to use encryption. In order to that we just select the “Password-protect your backup” option in the form, than provide and confirm an encryption password:
All is ready. As soon as we click on the “Forward” button, Déjà Dup will start creating our backup. The first backup in a row its always a full backup: since it will include all files in the source directory, the task could take a while to complete. Subsequential ones will be completed much faster, since they will include only changes happened after the previous backup was made.
Restoring a backup
To restore a backup we previously made using Déjà Dup, we need to select the “Restore” tab in the top application menu. Once we do, the application will scan for existing backups, and will show the files included in the most recent one, by default. We can use the dropdown menu in the bottom right corner of the window to choose a specific one, instead. Backups are reported by their creation date:
We select the files and directories we want to restore, than click on the “Restore” button in the bottom left corner. At this point we are prompted to choose whether to restore the files in their original position or somewhere else, and to provide the encryption password (if any), than the restoration process will start.
How to schedule backups
In this tutorial we created “on demand” backups. When using Déjà Dup, we also have the choice to choose a schedule for backups to be created automatically. In order to do that, we click on the application “hamburger” menu and than on the “Preferences” entry. In the “General” tab of the window that will be opened we enable automatic backups, than choose the backup frequency. The default is to create weekly backups:
In this tutorial we learned how to install and use Déjà Dup on some of the most used Linux distributions, and how to use the application to create and restore backups of our personal data. While Déjà Dup is really easy to use and let us create encrypted backups in a breeze, it cannot be used to create snapshots of the entire system. If that is what you are trying to do, you may want to use something like Timeshift, instead.