1. Home
  2. Linux
  3. How to backup directly to mega on linux

How to backup directly to Mega on Linux

Mega is an excellent cloud storage option. With the free tier of the service, you get 20 GB of storage. This amount of storage, while not much, is an excellent place to store your Linux backups.

This guide will show you how to utilize Mega on Linux as the backend for backups using Duplicati. To get started, ensure you have a Mega account at Mega.nz.

Installing Duplicati on Linux

Duplicati needs to be installed before it can be used on Linux to create a backup. First, open a terminal window to set up Duplicati on your Linux PC. You can open up a terminal window by pressing Ctrl + Alt +T. Alternatively, search for “Terminal” in the app menu and launch it that way.

With the terminal window open and ready to use, you can install Duplicati. Follow the installation instructions below to set up Duplicati.

Ubuntu — installation instructions

To get Duplicati working on your Ubuntu system, you need to start by downloading the DEB package from the official Duplicati website. You can do this by running the following wget command.

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

After downloading the file to your computer, you can install the Duplicati DEB package. Using the apt install command below, set up Duplicati.

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

Please note if you are using Ubuntu 22.04 LTS, you will need to download the following package to fix errors with Duplicati.

wget http://debian.mirror.ac.za/debian/pool/main/o/openssl/libssl1.1_1.1.1o-1_amd64.deb
sudo apt install ./libssl1.1_1.1.1o-1_amd64.deb

Debian — installation instructions

To set Duplicati working on Debian, you first need to download the latest release of Duplicati for Debian. Using the wget download command below, grab the newest release of Duplicati.

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

After downloading the latest release of Duplicati from the official website, you can install it using the dpkg command. This command will load up the Duplicati DEB package.

sudo dpkg -i duplicati_2.0.6.3-1_all.deb

After installing the Duplicati package using the dpkg command, you must correct any dependencies that may not have occurred during the installation process. You can fix the issues with apt-get install -f.

sudo apt-get install -f

If you have issues using Duplicati, download and install the SSL package mentioned in the Ubuntu section.

Arch Linux — installation instructions

The latest version of Duplicati is available on the Arch Linux User Repository as an unofficial package. However, you’ll first need to set up the Trizen AUR helper to install it. You can do that by entering the commands below.

sudo pacman -S git base-devel
git clone https://aur.archlinux.org/trizen.git
cd trizen/
makepkg -sri

With the Trizen application up and running on your Arch Linux PC, use the trizen -S command to install the latest release of Duplicati.

trizen -S duplicati-latest

Fedora — installation instructions

Fedora Linux has an official RPM package for Duplicati. To download it to your computer, run the following wget download command. This command will place the Duplicati RPM directly in your home folder.

wget https://updates.duplicati.com/beta/duplicati-2.0.6.3-2.0.6.3_beta_20210617.noarch.rpm

After downloading the RPM package to Fedora, you can install Duplicati using the dnf install command.

sudo dnf install duplicati-2.0.6.3-2.0.6.3_beta_20210617.noarch.rpm

OpenSUSE — installation instructions

If you use OpenSUSE Linux on your computer, you’ll be able to download the official Duplicati RPM package using the wget download command.

wget https://updates.duplicati.com/beta/duplicati-2.0.6.3-2.0.6.3_beta_20210617.noarch.rpm

After downloading the RPM package to your OpenSUSE system, you can install the software using the following zypper install command.

sudo zypper install duplicati-2.0.6.3-2.0.6.3_beta_20210617.noarch.rpm

How to create a backup to Mega with Duplicati

Follow the steps below to backup to the Mega cloud service using Duplicati.

  1. On the sidebar in Duplicati, click on the “Add backup” button. Selecting this button will bring up the new backup creation wizard.
  2. Find the “Configure a new backup” box and check it. Then, select the “Next” option to move to the next page.
  3. Find the “Name” text box, and write your new Duplicati backup in the name. Then, find the “Description (optional)” section and describe your backup.
  4. Locate the “Encryption” section, and select a type of encryption. By default, AES-256 is selected.
  5. Find the Passphrase and Repeat Passphrase boxes, and enter a memorable password. Or, select the “Generate” button to create a strong one. Once you’ve chosen a password, click on the Next button to continue.
  6. You will be asked to choose your backup destination on the next page. Find Storage Type, and set it to “Mega.nz.” Then, find “Username” and fill out your username. Also, fill out your Mega password in the “Password” box.
  7. Leave the “Folder path” box blank, so it uploads to your account’s main Mega folder. Next, click the “Test connection” button to confirm your successful connection. If it is, select the “Next” button to continue.
  8. You must now select the files/folders you wish to backup. Use the file browser in the Source data area to check the boxes you want to upload to Mega via Duplicati. Select “Next” when done.
  9. On the next page, you’ll be asked to schedule backups. If you wish, schedule your backups using the Schedule section. Otherwise, disable it by unchecking “Automatically run backups.” Select the “Next” button when done to continue.
  10. You’ll need to choose your remote volume size on the last page. By default, it is “50 MB.” However, you can change the size by customizing the “Remote volume size” area. Click “Save” when done.
  11. When your new backup configuration is created in Duplicati, it will appear on the main backup page. Select the Run now button to execute your backup.

How to restore your backups

Restoring backups with Duplicati is very straightforward. First, select the “Restore” option in the Duplicati menu to do it. Then, under the “Where do you want to restore from?” Area, choose your backup configuration by checking the box next to it.

After selecting your backup configuration, click the “Next” button. Then, use the file browser to select the file(s) you wish to restore. Finally, under “Restore options,” choose where Duplicati should restore the files. Click “Restore” when done to restore your backup.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.