Ubuntu Tutorials

How To Backup Ubuntu 20.04 To Backblaze B2 Storage

In this tutorial I will be showing you how to install Duplicati Backup Software on Ubuntu 20.04 and then how to configure backups to store data into Backblaze B2 Storage. It is important to have backups of your Ubuntu 20.04 server because If your server gets hacked or corrupted you will lose everything. So it is best to install a 3rd party backup solution that transfers data to cloud storage.

In this tutorial we will be using the OS Ubuntu 20.04Duplicati Backup Software and BackBlaze B2 Cloud Storage.

1.  Lets get started  with installing Duplicati Backup Software onto Ubuntu 20.04 by using the following commands one at a time.

wget https://updates.duplicati.com/beta/duplicati_2.0.5.1-1_all.deb
sudo apt-get -f install -y
sudo dpkg -i duplicati_2.0.5.1-1_all.deb

2. Alright so Duplicati is now installed but there are a few more things we need to do to get it working properly. Lets configure webservice with the following command.

sudo nano /etc/default/duplicati

3. If you see anything in there you can delete and replace with the follow. Press [CTRL] + [x] to proceed with saving. If you have any other firewall management you will have to allow port 8200 traffic.

DAEMON_OPTS="--webservice-port=8200 --webservice-interface=any"

4. Now lets create a Duplicati service so the software runs are bootup. Lets open up Nano with the following command.

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

5. We will now copy whats provided into the Console. Press [CTRL] + [x] to proceed with saving. 

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

StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
EnvironmentFile=-/etc/default/duplicati
ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

6. Now we will move forward with enabling the Duplicati backup services. 

sudo systemctl enable duplicati
sudo systemctl start duplicati

7. Enable the port to pass through the ubuntu firewall.

ufw allow 8200

Well done, Duplicati is now installed on Ubuntu 20.04 and configured to run as a service. You can access it by going to port 8200 for the IP address assigned to your server. http://<IP-Address>:8200

Configure Duplicati to store backups in Backblaze B2 Cloud Storage

  1. Now we can move forward with creating your Backblaze account and create your Backblaze B2 Cloud Storage Bucket.

2. Locate App Keys section on the left in Backblaze we will create a new application key specifically to access this bucket for backups. One created make sure to save the application bucket keys somewhere.

3. Access your Duplicati backup software from http://<IP-Address>:8200
4. Click on settings and immediately configure a password for the portal.
5. From this point click Add Backup and configure Duplicati to backup all sources/data to the B2 storage destination. You will be required to provide those security B2 keys. It’s pretty self-explanatory from here.

If you happen to have any questions please feel free to contact me.


Discover more from Patrick Domingues

Subscribe to get the latest posts sent to your email.

author avatar
Patrick Domingues

3 Comments

  1. I want to use b2 backblaze as a backup drive for my 3 different apache server so this will work?how to configure for each if we need 3 different buckets i mean we have to configure once or everytime we have to do this for backup data.

  2. Thank you sir for your suggestion.
    Yes,creating seperate buckets for backup will be the better option.suppose I have to backup these services SickChill,Calibre-web,subsonic So can I configure each bucket’s backup seperately with your method?I mean with same configuration steps?guide me please or send any method

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.