Are you looking to safeguard your data with a reliable backup solution? Look no further! This guide will walk you through the process of how to install Duplicati backup client on Ubuntu 22.04, ensuring your critical information remains protected. Duplicati is primarily a backup client. It can be installed on your computer or server to manage and perform backup operations. It creates, compresses, encrypts, and deduplicates backup of your data and sends it to various storage locations, whether they’re local storage devices or cloud-based storage services.
Table of Contents
Installing Duplicati Backup Client on Ubuntu 22.04
Common Features of Duplicati Backup Client
Key features of Duplicati include:
- Cross-Platform: Duplicati is available for Windows, macOS, and various Linux distributions, making it suitable for a wide range of users.
- Encryption: Duplicati offers strong encryption to ensure that your data remains private and secure during both transmission and storage. It uses AES-256 encryption and supports both passphrase-based encryption and GPG encryption.
- Compression: Backups created by Duplicati are compressed before being stored, helping to reduce the amount of storage space required.
- Deduplication: Duplicati employs block-level deduplication, which means that only unique data blocks are stored in the backup. This helps save space, especially when backing up large amounts of data with repetitive content.
- Flexible Storage Options: Duplicati supports a variety of storage backends, including local drives, network shares, FTP, SFTP, Amazon S3, Google Drive, Dropbox, Microsoft OneDrive, and more. This allows users to choose the storage solution that best fits their needs.
- Automated Scheduling: Duplicati allows users to schedule automated backups, ensuring that backups are performed regularly without requiring manual intervention.
- Incremental Backups: Duplicati creates incremental backups by only backing up changes since the last backup. This further reduces backup time and storage requirements.
- Versioning: Duplicati supports versioning, allowing users to retain multiple versions of backed-up files. This can be helpful in case of accidental data loss or file corruption.
- Web-Based Interface: Duplicati provides a web-based interface that allows users to configure and monitor backups through a web browser.
- Command-Line Interface: For more advanced users, Duplicati offers a command-line interface for managing backups and performing tasks.
Install Duplicati Backup Client
Download Duplicate Backup Client Installer
Navigate to Duplicate downloads page and download the latest version of Duplicati for Ubuntu/Debian. Note that beta version is the most stable build and is recommended for most users.
You can simply grab the download link and pull it using curl or wget commands.
Replace the value of the VER variable below with the current release version of Duplicati;
VER=2.0.7.1
wget https://updates.duplicati.com/beta/duplicati_${VER}-1_all.deb
Installing Duplicati Backup Client
Once the download is complete, use APT package manager to install Duplicati on Ubuntu 22.04. This ensures that if there any package dependencies, they will be taken care of automatically. Thus;
sudo apt update
sudo apt install ./duplicati_${VER}-1_all.deb
Backup Linux System/Ubuntu 22.04 using Duplicati Client
Once the Duplicati client is installed, how can you use it to backup your system to remote backup server?
Duplicati Supported Storage Providers
Duplicati supports various storage providers. These include;
- Local folder or drive
- FTP
- FTP (Alternative)
- OpenStack Object Storage / Swift
- S3 Compatible
- SFTP (SSH)
- WebDAV
- Azure blob
- B2 Cloud Storage
- Box.com
- Dropbox
- Google Cloud Storage
- Google Drive
- HubiC
- Jottacloud
- Mega.nz
- Microsoft Office 365 Group (Microsoft Graph API)
- Microsoft SharePoint v2 (Microsoft Graph API)
- Microsoft SharePoint (Microsoft.SharePoint.Client API)
- Microsoft OneDrive v2 (Microsoft Graph API)
- Microsoft OneDrive (LiveConnect API)
- Microsoft OneDrive for Business (Microsoft.SharePoint.Client API)
- Rackspace Cloudfiles
- Rclone
- Sia Decentralized Cloud
- Tahoe-LAFS
- Tardigrade Decentralized Cloud Storage
- Tencent COS
Read more on Duplicati storage providers page.
Backup Desktop Linux using Duplicati Client via SFTP(SSH)
In my environment, I have a local Linux server that has been setup as a storage/backup server. Considering that there is a ton of storage providers supported by Duplicati, we will use SFTP/SSH method in this guide to backup our system data into our Local backup server.
We already have configured our backup server with enough disk space to store our data.
So, how can I backup my desktop based Linux systems, which in this case may be used as user workstations?
Prepare Backup Server: Create Backup Account
Since we are using SSH/SFTP backup method, there are a few things I would recommend we do to ensure a secure and seamless Duplicati backup process.
Create backup user account on the backup server (note that I deliberately called this account backupuser
, it can be any name of your preference for you);
sudo useradd -s /bin/bash -m backupuser
Set the password for the backup user;
sudo passwd backupuser
If you are using a directory other than the backup user’s home directory to store your data, then ensure that the backup user has rights to write on the directory. For example, am creating a backup directory on our network mounted storage;
sudo mkdir /mnt/duplicati
Let’s ensure backup user can write to the backup path;
sudo chown -R backupuser: /mnt/duplicati
ls -ald /mnt/duplicati/
drwxr-xr-x 2 duplicati duplicati 4096 Aug 14 17:40 /mnt/duplicati/
Create Backup Client Account
Similarly, create a backup account on the client system you want to backup. We will deliberately call this account “duplicati“.
sudo useradd -s /bin/bash -m duplicati
Set the password for the client backup user;
sudo passwd duplicati
Generate Backup Client User SSH Keys on Backup Client System
We will be using ssh key-based authentication method to connect to our backup server and sent backup data via Duplicati. Thus, switch to backup user and generate passwordless SSH keys. Duplicati supports PEM key format.
su - duplicati
ssh-keygen -m pem
Generating public/private rsa key pair.
Enter file in which to save the key (/home/duplicati/.ssh/id_rsa):
Created directory '/home/duplicati/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/duplicati/.ssh/id_rsa
Your public key has been saved in /home/duplicati/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:8k5ad/lOrDiMdJeG+F4656mloeo6Y9nKkzCDoCDJhRU duplicati@ubuntu22
The key's randomart image is:
+---[RSA 3072]----+
| oE. |
| . . |
|... |
|=. |
|=. . S. . . |
|o + oo o +o |
| + + .+=oo= o |
| .B .=.o=O.= |
| .+B+.o.**+.o |
+----[SHA256]-----+
Copy the SSH keys to the backup server backup user account.
ssh-copy-id remotebackupuser@backup-server-IP
for example;
ssh-copy-id [email protected]
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/duplicati/.ssh/id_rsa.pub"
The authenticity of host '192.168.58.37 (192.168.58.37)' can't be established.
ED25519 key fingerprint is SHA256:KlhyOpe9EOfnsB7Lr7ebD58manowitNKrRN9vSbLb0Y.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]'s password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '[email protected]'"
and check to make sure that only the key(s) you wanted were added.
Login to Backup Server and ensure that the duplicati user cannot access PTY, or port or agent forwarding on the Backup server.
ssh '[email protected]'
vim .ssh/authorized_keys
Update the key to look like below. Replace backup-client-IP with your backup system client IP.
from="<backup-client-IP>",no-port-forwarding,no-pty,no-agent-forwarding ssh-rsa AAAAB3NzaC1yc2EAAAADA
You find our how to further secure your SSH connections.
Start Duplicati Web Server
To be able to backup other system user accounts data using Duplicati, it needs to be running as a system service.
Thus, start and enable Duplicati to run on system boot;
systemctl enable --now duplicati
Confirm status;
systemctl status duplicati.service
● duplicati.service - Duplicati web-server
Loaded: loaded (/lib/systemd/system/duplicati.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-08-14 21:45:14 CEST; 1s ago
Main PID: 13148 (mono)
Tasks: 13 (limit: 2265)
Memory: 40.7M
CPU: 757ms
CGroup: /system.slice/duplicati.service
├─13148 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe
└─13152 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe
Aug 14 21:45:14 ubuntu22 systemd[1]: Started Duplicati web-server.
It will open a web service on port 8200/tcp;
ss -altnp | grep 8200
LISTEN 0 50 127.0.0.1:8200 0.0.0.0:*
Login to Backup Client System as Backup User
Login into backup client system as backup user created above to configure backup services.
Configure Duplicati Client Backup
As a backup user, launch Duplicati from the applications menu on your Linux Desktop. We are using Ubuntu 22.04 desktop in this example guide.
Note that by default, Duplicati installs a web service that listens on port 8200/tcp localhost. Thus, when you launch it from the applications menu, it will open its user interface on the browser via localhost port 8200/tcp on browser.
It launches and prompts you whether to set the password for logging into it.
And of course, say yes and set the password!
I recommend you disable remote login, as well launching the app on login. If you choose to allow remote login, ensure firewall to restrict access to Duplicati client is setup in place.
Scroll down for other settings. We will the rest of them with default configs.
Click Ok to proceed to login to Duplicati web interface. Enter the password set above.
Duplicati web dashboard:
Click add backup to configure your system backup.
Go to next page and define the backup general settings:
- Name,
- Optional description,
- Encryption type and encryption passphrase.
Define backup destination:
- Storage type, which in this case is SFTP(SSH).
- The define the storage type settings like the following for SSH:
- Server and port
- Backup path on the server
- Backup user and credentials.
- Under Advanced settings, choose your preferred options. For SSH, we enable the use of SSH key authentication instead of password. We will use passwordless SSH keys in this demo.
Click Test connection to confirm the connection to the backup server. If connection is fine, you will be prompted to trust the host certificate. Ensure connection is Okay before you can proceed.
When all is good, proceed to configure the data to be backed up. Select all what you need to be backed up. Also, exclude what you don’t want to backup.
Click Next to setup the backup schedule. Define your own schedule.
Next, define the general options including the retention period.
Check Advanced options for more settings. For example, Configure Duplicati Backup Email Notifications.
We are using Gmail SMTP. Where password is required, use app password.
Configure Postfix to Use Gmail App Passwords
You can fine-tune and finally save the settings to complete backup configuration.
Backup Client System using Duplicati
Once you have completed backup configuration, you can start backup immediately or wait for the scheduled time. Click Run now to launch start full backup.
Backup Progress;
Backup complete;
Check logs on the client;
Remote logs;
Confirm on the backup server;
ls -1 /mnt/duplicati/
duplicati-20230814T213734Z.dlist.zip.aes
duplicati-bc322ff98eca641f4be62347c44b3e6c9.dblock.zip.aes
duplicati-i2b59182a59db4341909eaef4a01e0e10.dindex.zip.aes
Sample Email Notifications;
Backup Headless Linux Server using Duplicati Client via SFTP(SSH)
What if you are running an headless Linux server, how can you back it up with Duplicati using SFTP/SSH?
The command line backup syntax is;
duplicati-cli help backup
Usage: backup "" []
Makes a backup of and stores it in . The format
for is
protocol://username:password@hostname:port/path?backend_option1=value1&bac
kend_option2=value2.
Multiple source paths can be specified if they are separated by a space.
must not contain : and must not contain @. If they do,
specify username and password using --auth-username and --auth-password, or
url-encode them.
--auth-password=
The password that is required to authenticate with the server the backup
is stored on.
--auth-username=
The username that is required to authenticate with the server the backup
is stored on.
--no-encryption=
Use this to make an unencrypted backup.
--passphrase
This is the passphrase that is used to encrypt all data before it is
uploaded. If an empty passphrase is specified, the backup will not be
encrypted. This is the same as using --no-encryption.
--prefix=
Replaces the default "duplicati" with in the file names of the
backup files. It is required to specify different prefixes if multiple
backups are stored in the same target folder.
Note that it is much easier to configure backup from the GUI/web interface as compared to just manually typing the Duplicati backup command. Actually, instead of composing the complete backup command yourself, including all advanced options, just allow access to your server Duplicati web service via port forwarding and you can create a backup job in the Graphical User Interface, without scheduling it. Once completed, you can export the backup job, including all passwords, to the command line, resulting in a Duplicati.CommandLine.exe backup command with all settings that you specified in the wizard. You can paste this generated command in your favorite task scheduler.
For exmaple, to access the remote server Duplicati local service;
ssh -N -L 8200:127.0.0.1:8200 username@server-IP
Then access remote service via localhost on our system.
Sample command;
Go through all the steps above for setting up the backup and copy the command finally and execute on the terminal.
And that is it on how to install Duplicati backup client on Ubuntu 22.04.