### macOS LaunchAgent Setup Source: https://docs.duplicati.com/duplicati-programs/agent Installs the Duplicati Agent as a macOS launchagent, which starts automatically on user login. The agent assumes a desktop context and opens the registration URL in the default browser. For pre-authenticated URLs, use the specified method and restart the service. ```bash # The package registers a launchagent. # Agent opens registration URL in the default browser. # To use pre-authenticated URL: # Use method outlined above to register the machine, # then restart the service to pick up updated agent.json. ``` -------------------------------- ### Install Duplicati on Debian-based Linux (Ubuntu, Mint) Source: https://docs.duplicati.com/getting-started/installation Installs Duplicati on Debian-based Linux distributions using a .deb package. This command installs all necessary dependencies and places Duplicati in the default system location. Requires superuser privileges. ```sh sudo dpkg -i duplicati-version-arch.deb ``` -------------------------------- ### Install Duplicati on RedHat-based Linux (Fedora, SUSE) Source: https://docs.duplicati.com/getting-started/installation Installs Duplicati on RedHat-based Linux distributions using a .rpm package. This command installs all required dependencies and places Duplicati in the default system location. Requires superuser privileges. ```sh sudo yum -i duplicati-version-arch.rpm ``` -------------------------------- ### Starting Duplicati Server from Full Path on MacOS Source: https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-macos This command invokes the Duplicati server executable using its full path, which is necessary when Duplicati's binaries are not automatically symlinked into the system's PATH, such as after installing the GUI package. It ensures the server starts correctly from its application directory. ```bash /Applications/Duplicati.app/Contents/MacOS/duplicati-server ``` -------------------------------- ### Starting Duplicati Server from CLI on MacOS Source: https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-macos This command starts the Duplicati server when Duplicati binaries are symlinked into the system's PATH, typically after installation via CLI or Homebrew. It uses the default user's application support directory for configuration. ```bash duplicati-server ``` -------------------------------- ### Install Duplicati Windows Service Source: https://docs.duplicati.com/duplicati-programs/service Registers and installs the Duplicati executable as a Windows Service. Arguments passed to this command are forwarded to the Duplicati Server upon startup. The service is configured to automatically restart and start at login. This command will also start the service automatically on versions 2.1.1.0 and later. ```powershell Duplicati.WindowsService.exe INSTALL [arguments ...] ``` -------------------------------- ### Install Duplicati Windows Service with Options Source: https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-windows This command installs the Duplicati Windows Service and allows passing configuration options like the web service port and the data folder path. This is useful for customizing the service's behavior during installation. Ensure the specified path for the data folder is valid. ```batch C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe INSTALL --webservice-port=8100 --server-datafolder= ``` -------------------------------- ### Duplicati ServerUtil: Managing Backups Source: https://docs.duplicati.com/duplicati-programs/command-line-interface-cli-1/serverutil Provides examples for managing backup configurations using the ServerUtil. This includes listing available backups, running a specific backup, exporting backup configurations (with optional encryption), and importing previously exported configurations. ```bash duplicati-server-util list-backups duplicati-server-util run duplicati-server-util export --encryption-passphrase= duplicati-server-util export --export-passwords=true duplicati-server-util import ``` -------------------------------- ### Manage Duplicati Windows Service Source: https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-windows These commands demonstrate how to install and uninstall Duplicati as a Windows Service using the bundled service tool. Installing the service will also start it, and uninstalling it will stop it. Options can be passed to the INSTALL command to configure the service. ```batch C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe INSTALL C:\Program Files\Duplicati 2\Duplicati.WindowsService.exe UNINSTALL ``` -------------------------------- ### Enable and Start Duplicati Agent Service Source: https://docs.duplicati.com/detailed-descriptions/using-duplicati-with-linux Commands to manually enable and start the Duplicati Agent service, typically used after a manual installation or when systemd registration is not automatic. These commands ensure the agent is ready to be registered. ```sh sudo systemctl enable duplicati-agent.service sudo systemctl start duplicati-agent.service ``` -------------------------------- ### Linux Bash Script: Example for run-script-before/after Source: https://docs.duplicati.com/detailed-descriptions/scripts This Linux bash script provides an example of how to use scripts with Duplicati's --run-script-before and --run-script-after options. It outlines the available options and explains the meaning of different exit codes (0, 1, 2) that Duplicati uses to determine whether to proceed with a backup operation after a script has run. ```bash #!/bin/bash ############################################################################### # How to run scripts before or after backups ############################################################################### # Duplicati is able to run scripts before and after backups. This # functionality is available in the advanced options of any backup job (UI) or # as option (CLI). The (advanced) options to run scripts are # --run-script-before = # --run-script-before-required = # --run-script-timeout =