×


Install Duplicity on Ubuntu 20.04 - Best Method ?

Backing up data is among the most crucial duties for a system administrator who is in charge of managing servers. So, you must be knowledgeable in backup programs to make your work easier. One of the most vital backup tools is duplicity. Duplicity is a command-line backup application that allows you to backup directories by creating encryption and password-protected tar-format versions of the volumes that you can post to a distant or local file server.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related data Backing up and restoration queries on Debian Systems.

In this context, we shall look into the installation of duplicity on the Ubuntu 20.04 system.


How to Install Duplicity on Ubuntu 20.04 ?

To begin, you will need to upgrade your package to the most recent version before you proceed. With the following instructions, you can update the packages:

$ sudo apt-get update -y

Now after updating the packages, you are ready to install duplicity on your system. So, execute the below-listed command in the terminal:

$ sudo apt install duplicity

As soon as the installation is completed, you can easily check its version by executing the following command in the terminal:

$ duplicity --version

This command will display the version of duplicity that is installed on your system.


How to Configure SSH Authentication without a Password ?

The next step is to create an RSA 2048 bit protected SSH key that you may use to securely authenticate with the remote machine without requiring to provide a password. To begin, use the following cited command to generate an RSA key:

$ ssh-keygen -t rsa -m PEM

Next, use the following cited command to copy the created RSA key to a remote backup server:

$ ssh-copy-id root@102.200.12.190


How to Create GPG keys ?

Then, before we upload the data to the remote backup server, you’ll need to produce GPG keys to secure it. GPG keys are used to add an extra layer of protection and encryption to data being sent between servers. On the Duplicity server, run the following cited command to generate a GPG key:

$ gpg --gen-key

If you forgot the track of your GPG key, use the following cited command to retrieve it:

$ gpg --list-keys


How to Generate backup directory ?

After that, you'll need to establish a backup directory on the backup server. Run the following cited command to build a backup directory:

$ mkdir –p /linuxapt/duplicity


How to Launch the duplicity backup tool ?

The Ubuntu application interface search bar can be used to look for keyword backups. Then, from the list of search results, select the Backups application.

You will see a windows where you will see the application's current state. Click the [+] button. Here you can add specific files and directories for backup.

This will bring up a new window. You can go to the folders you want to back up from that screen. Tap the Add button after you've selected the appropriate folder.

You'll see them displayed in the Folders to save menu once you’ve added them.


How to Eliminate folders that will not be backed up ?

Suppose, you've chosen to back up a whole directory, which includes some folders that you don't want to back up since they contain unimportant information. It is possible to exclude them. From the left sidebar, select the Folders.


How to Choose Backup location ?

After you've carefully chosen the data to back up, click Storage location to select a storage place for the backup. Select the Storage location tab in the left pane. On the right pane, you'll see an option to select a storage place. You can save to a local folder, a network server, or the Next cloud service. Once you’ve chosen this option, select a folder on the above-mentioned location.

Choose the Overview tab once you've completed the backup configuration. Then select the Back up now option to begin the backup process.

Encryption will be requested on a screen. If you want to password shield your files, type a password and then tap on "Forward". If you pick this option, the password will be compulsory whenever you try to restore your data. Conversely, if you select Allow restoring without a password, you can skip this option.

The backup will now begin, and the progress meter will show you how far it has progressed.


[Need to fix Linux System issues? We can help you. ]


Conclusion

This article covers the process to install duplicity on Ubuntu 20.04 and how to use it. Duplicity is an open-source tool that helps people create backups of their data. It basically just encrypts the user's data and stores it into a remote server. It's a very convenient and smart way to back up data, as it does not only store the data but also any changes made to it in the long run. This attribute makes Duplicity very space-efficient.


To Install Duplicity on Ubuntu 20.04 LTS,

1. Update the Package Repository:

$ sudo apt-get update -y

2. After updating the repository, consider running the following command to install duplicity:

$ sudo apt-get install -y duplicity

3. Verify the Installation:

$ apt-cache policy duplicity