Create WindowsService backup plan via commandline?

Hi all,

Id like to configure the WindowsService backup plans via command line, what is the best way to do this?

Kind regards,
Mike

Welcome to the forum!

I haven’t used it in this manner, but duplicati-client appears to have the ability to create (import) backup jobs from JSON format. Check the ‘create’ command:

This is a great tool for using the command to interact with the running engine that normally must be interacted with via web UI.

Alternatively, you can abandon the service and web UI entirely, and run your backups using native Duplicati command line tools (eg, Duplicati.CommandLine.exe) You can schedule it using regular Task Scheduler or similar.

To configure a backup schedule, you must be a member of the Administrators group. To perform all other tasks with this command, you must be a member of the Backup Operators or the Administrators group, or you must have been delegated the appropriate permissions.

Regards,
Lewis

Backup Operators or Administrators group is only required for Duplicati backups if you are trying to utilize VSS snapshots or NTFS permission bypass. I’m actually not sure if Duplicati supports the latter or not.

With regular user rights, Duplicati can still back up any data that user normally has access to.

I don’t run duplicati-client, but does it need any permission? It’s not doing the backup but talking to the server, isn’t it? While that might need a UI password, the server’s permissions are what limit its ability.

To pick another nit, being in the Administrators group doesn’t help unless one elevates to use privilege which administrators are allowed (but don’t have until elevated). VSS is one example. USN is another.

Regarding Backup Operators, my impression is that it’s only meaningful in very limited circumstances:

Back up files and directories - security policy setting

This user right is effective only when an application attempts access through the NTFS backup application programming interface (API)

EDIT: but I’m really not sure, and forget whether I actually even found that API in some previous look.
Support SeBackupPrivilege in System.IO.Filestream API #31645 talks about it, for a version of .NET which isn’t the one we use. There are probably some other forum references about backup operators.

Add ability to import backup configurations from command-line #3595 might help if you have the files, and if you can either run Canary now or wait for Beta. You can probably tweak config files with scripts before importing them, but this all is admittedly not an easy-to-use set-it-all-up-from-the-commandline.

run-script-example.bat shows another way to influence backup jobs at run time, instead of at creation.