Install and Use Duplicati to Back Up Files on Ubuntu 20.04

Duplicati is a free, open-source, and powerful utility for Linux and Windows operating systems. It has a web-based user interface that allows you to create and restore a backup from the web browser. It supports FTP, SSH, WebDAV, and cloud storage providers like Microsoft OneDrive, Amazon Cloud Drive, Google Drive, Dropbox, and more.

This guide will show you how to install and use Duplicati to backup and restore a file.

Table Of Contents

Requirements

  • A server running Ubuntu operating system.

  • A root password is set up on your server.

Install Duplicati

By default, Duplicati is not included in the Ubuntu default repository. So you will need to download it from the Duplicati official download page.

You can also download it from the command-line interface using the following command:

wget https://updates.duplicati.com/beta/duplicati_2.0.6.3-1_all.deb

Once the download is completed, you can install it using the following command:

apt install ./duplicati_2.0.6.3-1_all.deb

After the successful installation, you will also need to install the mono-complete package to prevent errors during backup operations.

apt install mono-complete -y

Next, start the Duplicati service and enable it to start at system reboot:

systemctl start duplicati systemctl enable duplicati

You can also verify the status of the Duplicati using the following command:

systemctl status duplicati

Output:

duplicati.service - Duplicati web-server Loaded: loaded (/lib/systemd/system/duplicati.service; disabled; vendor preset: enabled) Active: active (running) since Sat 2021-09-11 07:26:54 UTC; 6s ago Main PID: 8158 (mono) Tasks: 16 (limit: 2353) Memory: 34.9M CGroup: /system.slice/duplicati.service ├─8158 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe └─8173 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe Sep 11 07:26:54 duplicati systemd[1]: Started Duplicati web-server.

By default, Duplicati listens on localhost on port 8200. You can check it using the following command:

ss -antpl | grep 8200

Output:

LISTEN 0 50 127.0.0.1:8200 0.0.0.0:* users:(("mono-sgen",pid=8173,fd=9))

Configure Nginx as a Reverse Proxy for Duplicati

By default, Duplicati can be accessed only from the localhost. So you will need to install and configure Nginx as a reverse proxy to access the Duplicati from the remote location.

First, install the Nginx server with the following command:

apt install nginx -y

Once the Nginx is installed, create an Nginx virtual host configuration file for Duplicati:

nano /etc/nginx/conf.d/duplicati.conf

Add the following lines:

server { listen 80; server_name duplicati.example.com; access_log /var/log/nginx/duplicati_access.log; error_log /var/log/nginx/duplicati_error.log; location / { proxy_pass http://127.0.0.1:8200; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }

Save and close the file, then verify the Nginx configuration file using the following command:

nginx -t

Sample output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, reload the Nginx service to apply the changes.

systemctl reload nginx

Access Duplicati Web UI

Open your web browser and access the Duplicati web interface using the URL http://duplicati.example.com. You will be redirected to the following page:

Click on the Yes button to set a password to the Web interface. You should see the following page.

Provide your password and click on the OK button to set the password. You will be redirected to the Duplicati login page:

Provide your password and click on the Sign in button. You should see the Duplicati web interface:

Create a Backup Using Duplicati

This section will create a directory backup and store it on Dropbox.

On the Duplicati Dashboard, click on the Add backup in the left pane. You should see the following page:

Select "Configure a new backup" and click on the Next button. You should see the following page:

Here, define your backup name, description, encryption type, and password and click on the Next button. You should see the following page:

Select Dropbox for storage, define the path on the server and click the AuthID link to get Dropbox auth id and grant Duplicati permissions to send the data to your Dropbox account. Then, click on the Next button. You should see the following page:

Select the directory path that you want to make a backup of and click on the Next button. You should see the following page:

Here, you can set the schedule for the backup and click on the Next button. You should see the following page:

Set the volume size and backup retention, and click the Save button. You should see the following page:

Run Your First Backup

Now, click on the Run Now button to run your first backup. Once the backup has been completed, you should see the following page:

Click on the data-backup. You should see the following page:

You can easily export the configuration to restore the backup on another Duplicati instance.

Restore a Backup Using Duplicati

Duplicati allows you to restore a backup to the same computer or another computer running Duplicati.

Here, we will restore a backup on the same computer where Duplicati is installed.

On the Duplicati dashboard, click on the Restore button. You should see your last backup on the following page:

Select your backup and click on the Next button. You should see the following page:

Click on the Continue button. You will be asked to select the location where you want to restore a backup, as shown below:

Select the Original location, Overwrite and click on the Restore button. Once the backup is restored successfully, you should see the following page:

Features of Duplicati

  • Supports incremental backup and compression.

  • Supports local backup including USB, Samba shared folder, and NAS.

  • Provides both GUI and Command-line interface.

  • Can detect and notify broken backups.

  • Provides backup scheduler and auto-updater.

Conclusion

This post explained how to install and use Duplicati to backup and restore files on Ubuntu 20.04. You can now use Duplicati in the production environment to backup your data to a local drive, Dropbox, or other cloud storage providers.

How does Duplicati backup work?

For best performance, Duplicati gathers all files that need to be backed up, deduplicates, and compresses them before sending them in blocks or chunks to your backup location.

Does Duplicati do incremental backups?

The system is fully backed up when you execute a Duplicati backup job for the first time. Succeeding backup jobs send incremental backups of the updated files, further conserving your bandwidth.

Backup one server, database, or application for free forever.

No credit card required. Cancel anytime!
Was this page helpful?

Thank you for helping us improve!