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.
I’ve experimented with Duplicati on Raspberry Pi (3, 4) but for larger volumes, Duplicati gets stalled (checked memory usage: low, checked i/o usage: low, progress drops to hundereds of bytes per second). What is your experience for >1TB backups?
Thanks Jura – It works for me but I gotta be honest, it is super SLOW.
One thing I’ve done to help prevent my Raspberry Pi flash media card from becoming corrupt is by moving my
~/.config/Duplicatidirectory to a location (like
/media/justin/archive/Duplicati) on an external hard drive. Then I symlinked that directory to
~/.config/Duplicati. I also set the
/media/justin/archive/Duplicati/tmpto get it off of my flash drive – it’s currently ~800MB and has filled up my flash drive in the past.
Then I tell Duplicati to ignore the
/media/justin/archive/Duplicatidirectory when making backups (since it’s on the same disk I’m backing up).
This avoids the hundreds of reads/writes that duplicati does to the sqlite db and log file.
There are two options I alluded to in the MacOS setup that I didn’t mention for Raspberry Pi:
log-filelocation will instruct Duplicati to write a plain-text log file rather than only logging via sqlite. I’ve found it’s easier to troubleshoot by doing
tail -f duplicati.logthan trying to query sqlite. You can adjust how much information is given by setting the
So it’s working, but slowly. Since I published this in July only 4 full backups have completed:
I’m planning on upgrading to a Pi4 soon to see if things speed up.