Installing Duplicati on Linux (Arch / Manjaro)


#1

Well, newer here but I feel I’ve got some things to talk about regarding installing and configuring Duplicati on Manjaro Linux. Pro tip - arch repo is a powerful tool, Manjaro certainly is a good blend between UI/user experience and accessing these packages.

None the less, here’s a week with linux and figuring out this duplicati instance.

Problem: Installed Duplicati, navigated to local host and tried every stupid command online to run as “root”, no dice. Spent a week figuring out how this could be done.
Solution:
Installing Duplicati on Manjaro is more difficult than the deb file for example online. However, accept the defaults and run the duplicati2-beta package, you can find that here or via Octopi and Yaourt installed.
https://aur.archlinux.org/packages/duplicati2-beta/

Installing it was easy, getting the service to be running was automatic. Problem was with the inability for me to save or backup /home/tech for example, it was locked and I didn’t have permission to read these directories, rather useless.

I read online how to start and stop the service and to even go the length of making it start when the computer boots, all of that. Still, every single time that you went and tried to configure the backup I was in the same position.

Finally, I came across a guide that indicated that duplicati is staring as the user too quick and despite me setting it as sudo and running it as root, it was useless as it always defaulted.

Solution:

Modify the file /usr/lib/systemd/system/duplicati.service so it DOESN’T contain a username or password. By default the username and password are duplicati and duplicati. Removing those two entries and saving the file, stopping the service and starting it again, allowed me to navigate to /home/tech and save the data. To be honest I don’t recall if there was just a username entry or both but remove both if you see two, user and pass.

[Unit]
Description=Duplicati Backup software

[Service]
ExecStart=/usr/bin/mono /usr/lib/duplicati/Duplicati.Server.exe
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target

Hopefully this helps someone out.


Running Duplicati beta in Manjaro
#2

Thanks for starting this @Erik_Carlin_Technica! Hopefully this can help others with less Manjaro experience than you. :slight_smile:

Disclaimer: I’m not a normal Manjarao / Arch user but this is what worked for me in Manjaro 18 (Illyria) with XFCE.

(Note that I’ve made this a Wiki so feel free to use the image button in the lower right below the post to make any additions you feel might be useful to others.)


Installing Duplicati via XFCE GUI (mostly):

  1. Run “Add/Remove Software” (aka Pamac)
    a. If you don’t see AUR in the left column then make sure “yaourt” (no quotes) is installed. If not, go ahead and install it (there’s no need to include any of the optional dependencies).
    Enabling yaourt

    b. Enable AUR using the 3-dots “hamburger” menu (upper right). Enabling AUR

  2. Select AUR from the left column as the package source, search for Duplicati, and install it! (Be sure to include “gtk-sharp-2” and/or “mono” if prompted.)

Note that I don’t yet know how to get the tray icon running or add anything to the Manjaro menu (such as Xfce) so for now you’ll need to use a terminal window…

Running Duplicati as root / changing server parameters

To run Duplicati as another user or change server parameters:

  1. Open a terminal window and run sudo nano /usr/lib/systemd/system/duplicati.service
  2. Change any service parms on the “ExecStart” line as needed.
  3. Change the “User” and “Group” lines to run as a different user (or remove them completely to run as root).
  4. Press ctrl-x, then Y, then enter to save the file.
    Note: If Duplicati was already running, be sure to run systemctl restart duplicati to restart it with the new settings.

Starting/Stopping Duplicati

To start/stop/restart/auto-start Duplicati:

  1. Open a terminal window (sorry, I don’t know how to add items to the menu) and type systemctl start duplicati. Note that this will start it but NOT make it auto-start.
    a. To run Duplicati as a service (whether you log in or not) type systemctl enable duplicati. Note that this ENABLES the service, but doesn’t start it until next reboot.
    b. To stop Duplicati type systemctl stop duplicati
    c. To restart Duplicati type systemctl restart duplicati
    d. To check if Duplicati is running type systemctl status duplicati

Remember - Duplicati uses a web interface so once running you’ll want to go to http://localhost:8200 (if using defaults) to get to the GUI.


Removing Duplicati

To uninstall / remove Duplicati:

  1. Once installed with the above, you should be able to use the default “Add/Remove Software” GUI (like Pacman) to find and uninstall Duplicati.

    Note: Uninstalling Duplicati will NOT remove the backup jobs, destination files, and update files. If you are SURE you no longer want those jobs or backups, delete them from within Duplicati (this process CAN also remove the destination files) or as manually (by deleting the .sqlite files from your Duplicati folder and the files from the destination folder).

#3

Hey @JonMikelV! Thanks for continuing to help with this Wiki. Perhaps you can modify the wiki with the current information that I will post now.

Duplicati2-beta is not the latest version that is now in the AUR, there is a package called duplicati-latest in the repo as well. Here’s a link to the AUR package, for reference. Duplicati-latest

So I don’t mind your way of installing it I guess but there’s a way better way to install this software than trying to download the package from the web. IMO, the aur website is for information and nothing more.

Manjaro linux has the benefit of accessing the AUR, along with all the other ARCH distros… IE arch itself, Antergos etc. They are all arch base and the appeal is that they have access to the AUR, packages that are built and maintained by the public.

Now with KDE Manjaro, Octopi is the package installer - on other flavours it is another package installer but it serves the same purpose. So what Jon said is right, however, IMO there’s even an easier way to do this.

Simply install duplicati-latest via the package installer and you’re good to go, after modifying the /etc/…file and doing the other steps to enable it on start up etc. KDE by default requires that you install yaourt.

sudo pacman -S yaourt

I know that the Cinnamon version of Manjaro has it by default but the KDE version isn’t - either way you need to install Yaourt and then enable it in your package maintainer and then you simply need to search the repo via the GUI.

Thought maybe that would be an easier way to do it - and this now works for ALL packages in the AUR. Just bypasses trying to download this and run this - one simple point click select install process.

@JonMikelV, what do you think? :slight_smile:


#4

Would it be helpful if I made a video regarding this process - I think it would be beneficial to new users? I know that it would help me. The default install doesn’t allow duplicati to work the way it needs to… by showcasing the install and modifications required I feel that you would get more traction and user base. The installer could also be modified with the one file as well? That is worth a thought as well… still need to modify the install after with a symlink so it starts up every reboot but yeah. Thoughts @JonMikelV


#5

I didn’t realize there were so many differences between Manjaro editions!

I actually tried installing via your initial post but found too many gaps in my knowledge to follow all the steps. I think going with AUR is great, but filling in some of the holes (like with your previous post) is good.

Of course I could be the odd one and most Manjaro users already know about having to install yaourt if using XFCE or KDE. :slight_smile:

I’m not opposed to a video - some people prefer them to having to read all the words I end up stuffing into a post. :crazy_face:


#6

Does the systemctl enable duplicati option not work for you?


#7

Definitely, they all have their own nuances. :slight_smile:

systemctl enable duplicati works my friend, the issue is with the following file:

/usr/lib/systemd/system/duplicati.service

Using your text editor, nano, etc… modify this entry to look exactly like the above:
[Unit]
Description=Duplicati Backup software

[Service]
ExecStart=/usr/bin/mono /usr/lib/duplicati/Duplicati.Server.exe
Restart=on-failure
RestartSec=30

user=duplicati
group=duplicati

[Install]
WantedBy=multi-user.target

You have to remove the two lines for user duplicati and group duplicati.. IF you do not, duplicati will never run as root and therefore be unable to backup your system. For example, duplicati is installed but does not have access to the /home/tech folder, tech being my user account. However, after removing those two lines of code that are there by default, and restarting the service su root systemctl start duplicati … THEN and ONLY then does duplicati run as root and therefore have access to the ENTIRE disk.


#8

Ahh - that makes more sense now. I assumed that once it was auto-starting it HAD to have been running as root, but I never tested it.

BTW - I poked around a bit more and think I understand what you’re saying about installing form AUR.

For XFCE the “Add/Remove Software” Package Manager is Pamac. By default it does’t seem to have AUR enabled but I turned on by using the 3-dots “hamburger” menu (upper right), selecting the AUR tab then enabling the “Enable AUR support” option. I then used the 'hamburger" menu again and selected “Update databases”.

I tried this with “Check for updates from AUR” both enabled and disabled, but I’m still not finding Duplicati when I search.
image


#9

Glad we are seeing the same thing and you understand what I mean - trust me I’ve spent about 15 hours with the initial install to make it work and now I can make it work in five minutes on a clean install on KDE and Cinnamon, at least. I haven’t done it with XFCE but you get the idea.

I haven’t got into XFCE but you might want to enable the AUR. I understand the AUR button might be toggled but you might have to run the command below to actually install it in your system. THEN that button should mean something and your search will come up with the results.

sudo pacman -S yaourt

^^that line did have to be run in the terminal to enable AUR searching in KDE, Cinnamon it seemed to work without it. Perhaps XFCE is like KDE that way.

Let me know?


#10

Thanks for all the tips - I’ve updated my post above (Installing Duplicati on Linux (Arch / Manjaro)) how’s it look?


#11

Looks good my friend - I’ll see about screen recording the steps above too and upload that as well. Might be nice to have that as well for our new Linux users.