How to Backup Files with Déjà Dup and Duplicity on Ubuntu 18.04 LTS

Linux includes a number of tools nearly for every purpose. No matter what tool you need, you will find everything. Even for backups, it includes a built-in tool Déjà Dup. Déjà Dup is a very simple but powerful GUI tool for backup in Ubuntu. It uses Rsync for incremental backups, encryption, scheduling, and support for remote services. Déjà Dup is a graphical user interface of a file-based backup program Duplicity that itself uses Rsync.

You might be confused about Duplicity. Duplicity is actually a command line backup program that allows to backup directories by providing an encrypted and digitally signed version tar-format of the volumes that can be uploaded to a remote or local file server.

Let us come back towards Déjà Dup. It comes pre-installed in Ubuntu and includes nearly all necessary features that you would require in any backup tool. Some of its features are:

  • Local, remote or even cloud backup
  • Encryption and compression of data
  • Incremental backup
  • Backup scheduling
  • Restoring from any particular location

In this article, we will learn how to backup files and folders using Ubuntu default backup tool Déjà Dup. I will use Ubuntu 18.04 LTS for describing the procedure in this article.

Install Duplicity package

You will need to install some necessary packages to use Déjà Dup. To install them, run the following command:

$ sudo apt-get install duplicity

Install Duplicity

Then run the following command:

$sudo apt-get install --reinstall python-gi

Reinstall Python GI

Launch the Déjà Dup Backup tool

To launch the backup tool, open the Terminal by pressing Ctrl+Alt+T key combinations and then type déjà-dup. Alternatively, you can search for keyword déjà-dup from Ubuntu’s Dash menu search bar. Then from the search results that appear, click on the Backups application.

Déjà Dup Icon

When the application will launch, you will see the following screen. It will let you view the current status of the application.

Backup overview

Backup Configuration

To set up the configuration for the backup in Ubuntu, select Folders to save tab from the left pane of the application window. You can see it has Home folder added by default. To remove it, select the folder and then click on the [-] button.

Add folders in backup

To add specific files and folders for the purpose of backup, click on the [+] button as shown in the following screen.

Add new backup

It will open another screen. From that screen, you can navigate to the folders you wish to backup. Once you have selected the required folder, click on the Add button.

Choose Folders

Once you have added them, you will see them listed in Folders to save tab.

Exclude folders from being backed up

For instance, you have selected a whole directory for backup and it includes some folders that you do not want to back up because that contains unimportant stuff. There is an option to exclude them. Select Folders to ignore tab from the left pane, then click on the + button.

Exclude folders

From the window that appears, choose the folders you want to exclude, then click on Add button.

Choose Folders to be excluded from backup

Once you add them, you will see them listed in Folders to ignore tab.

Choose Backup location

Once you have chosen the data for backup, click on Storage location to choose the location for storing the backup. On the left pane, click on Storage location tab. You will on the right pane, there is an option to choose the storage location. You can choose to store on a local folder, network server, Next cloud service, or a Google drive. After selecting this option, choose a folder on the above selected location.

Choose Backup Location

Start Backup

Once you are done with the backup configuration, select the Overview tab. Then click on Back up now option to start back up.

Start the Backup now

A screen will be prompted for encryption. Enter a password if you want to password protect your files, and click Forward. If you select this option, it will require for the password whenever you want to restore your files.

Otherwise, you can ignore this option by selecting the Allow restoring without a password.

Protect backup with a password

Now the backup will start and you can see its progress from the progress bar.

Backup progress

Schedule Backups

In case you do not want to run the back at the current time, you can use the scheduling option that will run the backup automatically at the time you specify. Select the Scheduling tab. In the right pane, you will see the options from which you can choose to run backup daily or weekly.

Here you can also select the time for how long you want to keep the backups. From the options, you can choose to keep backups for six months, a year, or forever. To turn on scheduling, slide the Automatic backup toggle to ON position.

Schedule Backups

Restore Files or Folders from Backup

Now you can restore your backup in case of any data loss. To restore data, select the Overview tab. Then click on the Restore option.

Restore Files or Folders from Backup

From the Restore window, choose the location where you have saved the backup, then select the folder that contains the backup. Then click Forward.

Select location to restore the backup

Then it will give you the options to restore from a certain time. You can choose the default option to restore from the most recent backup. When you click Forward, it will take you to the next screen asking where to restore the data. You can choose to restore to the original location or to another location. While restoring, it will ask for the password if you have set during the creation of the backup.

That’s all there is to it. Hence, we can conclude that Déjà Dup is a great and powerful tool in Ubuntu for creating and restoring password-protected backups. You can get a piece of mind by creating backups of your important files so that you have something to fall back on in case of any disaster.