Duplicati Environment Variables

I am told that Duplicati has environment variables that can be used in scripts. They are usually DUPLICATI_. Can someone point me in the direction of the Duplicati environment variables for Linux, in the documentation?

1 Like

Do you mean the PDF documentation that’s not quite done?

The variables should be the same in all environments and are basically DUPLICATI followed by the parameter name (as it would be used with a command line call) with any dashes replaced by underscores.

Some examples are:

  • if you want to access the --dbpath parameter you’d use DUPLICATI__dbpath
  • if you want to access the --dblock-size parameter you’d use DUPLICATI__dblock_size
  • if you want to access the --backup-name parameter you’d use DUPLICATI__backup_name

There are also some special non-parameter variables that you might find useful:

  • DUPLICATI__EVENTNAME = when script was triggered such as “BEFORE” or “AFTER”
  • DUPLICATI__OPERATIONNAME = operation, such as “Backup”, “Cleanup”, “Restore”, etc.
  • DUPLICATI__RESULTFILE = path to file in which result data is stored
  • DUPLICATI__REMOTEURL = “URL” target backend
  • DUPLICATI__LOCALPATH = path to folders being backed up or restored
  • DUPLICATI__PARSED_RESULT = run result such as “Unknown”, “Success”, “Warning”, “Error”, or “Fatal”
2 Likes

Adding to @JonMikelV’s answer, there is an example file here:

1 Like