We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

18
833.592,15

Cart

Learn how to – Backup Linux, Mac, and Windows Systems using Duplicati

Learn how to – Backup Linux, Mac, and Windows Systems using Duplicati.

A backup is a process of creating a copy of data or information in case the original data is lost, corrupted, or destroyed. The purpose of creating a backup is to ensure that the data can be restored in case of a disaster or data loss. Backups can be made of any type of digital data, including documents, photos, videos, databases, applications, and operating systems.

There are several ways to create a backup, these are:

  • Full backup: this creates a complete copy of all data, files, and folders on a computer or storage device. Full backups are typically done periodically, such as weekly or monthly.
  • Incremental backup: this creates a backup of only the changes that have been made since the last backup. This type of backup is faster and takes up less storage space than a full backup.
  • Differential backup: A differential backup creates a backup of all changes made since the last full backup. This type of backup is faster than a full backup but slower than an incremental backup.
  • Cloud backup: this creates a copy of data on a remote server over the internet. This type of backup is secure, convenient, and can be accessed from anywhere with an internet connection.

Duplicati is a free and open-source backup client that provides an easy and secure way to backup files and folders to various cloud storage services, including HubiC, Amazon S3, Box, MEGA, Google Drive, Microsoft Azure, Dropbox, and more.

Duplicati is available for Windows, macOS, and Linux operating systems and provides a number of features, including:

  • Backup scheduling: Duplicati allows you to schedule backups to run at specific times, such as daily, weekly, or monthly.
  • Encryption: Duplicati uses AES-256 encryption (or GNU Privacy Guard) to secure all data before it is uploaded.
  • Deduplication: it uses block-level deduplication to reduce the amount of data that needs to be backed up. This helps to save storage space and reduce backup times.
  • Command-line interface: It provides a command-line interface (CLI) for advanced users who want to automate backup tasks or create custom backup scripts.
  • Incremental backups: Duplicati uploads a full backup initially and stores smaller, incremental updates afterwards to save bandwidth and storage space.
  • Multiple backup destinations: Duplicati supports backing up to multiple destinations, including local storage, cloud storage services, and FTP servers.
  • Easy restore: Duplicati makes it easy to restore backups. You can choose to restore individual files and folders or entire backups.
  • Compression: Duplicati compresses your backups to save storage space and reduce upload and download times.

This guide provides a detailed demonstration of how to back up Linux, Mac, and Windows Systems using Duplicati.

1. Install Duplicati on Linux, Mac, and Windows Systems

To be able to install Duplicati on Linux, Mac, and Windows Systems, we need to download the latest binaries from the releases page page.

##For Debian/Ubuntu
wget https://updates.duplicati.com/beta/duplicati_2.0.7.1-1_all.deb

##For Fedora/Rocky Linux/Alma Linux
wget https://updates.duplicati.com/beta/duplicati-2.0.7.1-2.0.7.1_beta_20230525.noarch.rpm

##For macOS/OS-X
wget https://updates.duplicati.com/beta/duplicati-2.0.7.1_beta_2023-05-25.dmg

##For Windows 64-bit
wget https://updates.duplicati.com/beta/duplicati-2.0.7.1_beta_2023-05-25-x64.msi

##For Windows 32-bit
wget https://updates.duplicati.com/beta/duplicati-2.0.7.1_beta_2023-05-25-x86.msi

Once downloaded, you can install Duplicati. On Mac and Windows systems, click on the downloaded file and follow through the installation.

For Linux, use the commands below to install Duplicati:

##On Debian/Ubuntu
sudo apt install ./duplicati_*.deb

##On Rocky Linux/Alma Linux
sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos8
sudo yum -y install mono-devel
sudo yum install libappindicator-gtk3 sqlite gtk-sharp2
sudo rpm -ivh --nodeps duplicati-*.rpm

2. Create a Duplicati System Service

Duplicati can be launched from the App Menu on your system after installation.

Once started, it will launch a web UI on your default browser with the URL http://localhost:8200

But to make the administration easier, we can configure a system service and configure automatic start on boot. On Windows, you can allow automatic start during the installation.

For Linux systems, you need to create a service file as shown:

sudo vim /etc/systemd/system/duplicati.service

In the file, add the below lines:

[Unit]
Description=Duplicati web-server
After=network.target

[Service]
Nice=19
IOSchedulingClass=idle
EnvironmentFile=-/etc/default/duplicati
ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS
Restart=always

[Install]
WantedBy=multi-user.target

Next, we need to create an environment file:

sudo vim /etc/default/duplicati

Add the below lines to define the Duplicati DAEMON_OPTS:

# Defaults for duplicati initscript
# sourced by /etc/init.d/duplicati
# installed at /etc/default/duplicati by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Additional options that are passed to the Daemon.
DAEMON_OPTS="--webservice-interface=any --webservice-port=8200 --portable-mode"

Save the file, and reload the system daemon:

sudo systemctl daemon-reload

Start and enable the service:

sudo systemctl enable --now duplicati  

Check the status of the service:

$ systemctl status duplicati
 duplicati.service - Duplicati web-server
   Loaded: loaded (/etc/systemd/system/duplicati.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-05-05 07:05:26 EDT; 1s ago
 Main PID: 38853 (mono)
    Tasks: 12 (limit: 23505)
   Memory: 53.1M
   CGroup: /system.slice/duplicati.service
           ├─38853 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe --webservice-interface=any --webservice-port=8200 --portable-mode
           └─38857 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe --webservice-interface=any --webservice-port=8200 --portable-mode

May 05 07:05:26 localhost.localdomain systemd[1]: duplicati.service: Service RestartSec=100ms expired, scheduling restart.
May 05 07:05:26 localhost.localdomain systemd[1]: duplicati.service: Scheduled restart job, restart counter is at 2.
May 05 07:05:26 localhost.localdomain systemd[1]: Stopped Duplicati web-server.
May 05 07:05:26 localhost.localdomain systemd[1]: Started Duplicati web-server.

Once started, allow the service through the firewall:

##For UFW
sudo ufw allow 8200/tcp

##For Firewalld
sudo firewall-cmd --add-port=8200/tcp --permanent
sudo firewall-cmd --reload

3. Use Duplicati on Linux, Mac, and Windows Systems

Once started, you can access Duplicati using your browser with the URL http://localhost:8200 or http://IP_address:8200

Duplicati will start with the above page, you have the option to set a password if you are running in a multi-user environment.

a. Create a new Backup using Duplicati

Once the prerequisites have been performed, you can now create your first backup on Duplicati by clicking on Add backup.

Next, we need to provide the backup details. In the general tab, set the backup name, description and encryption as shown:

Next, you need to select the destination path to which you want the backup to be stored. For this guide, we have a dedicated local directory at /duplicati created with the right permissions:

You can also use some other preferred storage supported by Duplicati. Once provided, test the connection to the storage.

Next, you select the source of the data to be backed up.

You can also add the desired filters and exceptions as shown above. Now schedule the backups. For this guide, we will allow the backup to run after each hour daily

Finally, set the limit of individual backup volumes in your storage destination.

Now we have our first backup created.

You can run the backup immediately after configuring it.

Once backed up, you will see the available backups:

b. Restore Files using Duplicati

Another vital thing after taking backups is how to restore them in case anything happens to the original file. To restore backups on Duplicati, navigate to the Restore tab.

Here there are several options, they include:

  • Direct restore from backup files: Point to your backup files and restore from there
  • Restore from configuration: Load destination from an exported job or a storage provider
  • Restore your backup automatically using the available backup

For this guide, we will restore automatically from the last backup made.

Select the desired files to restore, you can also restore everything.

Select where you want the files to be restored. Here, we will restore them to their original location.

Once the restore is complete, you will see this:

c. Secure Duplicati Web Interface

To ensure that your backups are safe, you need to secure the web interface. This can be made by navigating to the settings tab and ensuring that a password is set for the user interface.

You can also configure your other preferences such as the allowed hostnames, theme, hibernation time etc. Once the changes have been made, save them and refresh the page.

Now you need to provide a password to be logged in.

Recommended Linux Books  to read:

Final Thoughts

Today we have learned how to back up Linux, Mac, and Windows Systems using Duplicati. Duplicati can be a very important and versatile backup solution, it provides many useful features for individuals and organizations looking for a secure and reliable backup solution.

18
833.592,15

Cart