Single-user vs service
Before you install Duplicati, there’s one question you need to ask:
Does this computer have multiple user logins (that you want to back-up), or is it primarily used by one user?
This is important because you can install Duplicati in one of two ways: to run as a single-user, or to run as a system service that is available to all users. By default Duplicati is installed for a single user, but if there is more than one user on the computer you want to be able to back-up, you’ll want to install it as a service.
If you don’t install it as a service, when Duplicati tries to read files that belong to the other users, it will get a permission denied error and won’t be able to back those files up. You don’t want to find out that your files weren’t backed up when it’s too late.
I’ve provided some MacOS specific configurations in that section for setting it up as a service.
Install Duplicati on a RasperryPi
To get Duplicati successfully installed on a RaspberryPi running Raspbian, you’ll likely have to also install some of the mono dependencies to avoid installation errors.
Follow the Raspbian 9 installation instructions on the mono-project site. No need to `sudo apt-get install mono-devel` – the dependencies for Duplicati will get automatically resolved.
Once that’s done you can (re)install Duplicati, hopefully without errors.
For my MacOS installation I needed to install it as a service. It’s my wife’s Macbook. I also use it for Fusion360, and I like my scroll settings different than she does. So it has two user accounts, both with files we want to back-up. Installing Duplicati as a service in this case is a must.
Both of the plist configuration files can be installed as any user as they’ll be going in a system-wide location which will run Duplicati as a system service.
$ sudo vi /Library/LaunchDaemons/com.duplicati.server.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.duplicati.server</string> <key>ProgramArguments</key> <array> <string>/Applications/Duplicati.app/Contents/MacOS/duplicati-server</string> <string>--webservice-port=8200</string> <string>--log-file=/Library/Logs/duplicati_server.log</string> <string>--log-level=Information</string> <string>--verbose=true</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>StandardOutPath</key> <string>/Library/Logs/duplicati_out.log</string> <key>StandardErrorPath></key> <string>/Library/Logs/duplicati_err.log</string> <key>Nice</key> <integer>20</integer> </dict> </plist>
$ sudo vi /Library/LaunchAgents/com.duplicati.app.launchagent.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"><dict> <key>Label</key> <string>com.duplicati.app.launchagent</string> <key>ProgramArguments</key> <array> <string>/usr/bin/open</string> <string>/Applications/Duplicati.app</string> <string>--args</string> <string>--hosturl="http://localhost:8200"</string> <string>--no-hosted-server</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
MacOS Configuration Confirmation
Once those two files are in place, the next time you reboot and log in, any and all users should have a Duplicati icon in the system tray. You can then configure a backup job to read all users’ files without issue.
Useful Duplicati Options (all platforms)
There are two settings to reduce Duplicati’s resource usage:
On my brand-new 2019 XPS13 developer system Duplicati was using 280% CPU.
In other words, three of the 8 available cores were dedicated to Duplicati, plus disk I/O. I recommend setting
use-background-io-priority to true and
thread-priority to something below “normal” to adjust the CPU usage to an acceptable level. You can find these under “Advanced options” on the last page of the Add/Edit Configuration page of a backup.
As always, test your configuration. I like to do a daily backup with “Smart backup retention” so my backup cloud disk usage doesn’t grow indeterminately.
Make sure your RaspberryPi backups are completing. It will take a while if you have a lot of data. For a 1TB backup from my RaspberryPi, it took a full week to complete because it is s-l-o-w. Once a full backup is made, the incremental updates shouldn’t take as long, but they may still take longer than a day to complete.