Script Email settings?

Is there a way I can script setting mail settings? Not just to test but to actually push out and save in there?

We have installed this a lot to our clients. I made a backup server for Duplicati to connect to over SFTP.

I have the manual with the email command line stuff and it says TEST mail so not sure if we can script and save the settings that way.

Thanks

Hi @FortifyIT, welcome to the forum!

I’m a little unclear as to what you are asking. Are you trying to configure email settings for already existing backup jobs, as part of creating a job, or did I miss what you are doing completely?

So you your clients are connecting to this central SFTP server as a destination, correct?

Do you mean the manual at Home - Duplicati 2 User's Manual?

Can you share one of your command lines that says TEST (with things like passwords and email address hidden, of course)?

Hi

Yes. I have a lot of clients installed with duplicati and want to setup e-mail logging for them. Instead of touching each computer, is there a way to script the settings into the already setup duplicati user?

Sorry I didn’t know how to go about explaining it.

Not that I’m aware of.

If you had an already set up --run-script-before process you might have been able to set environment variables in that script which would then be used by Duplicati… but if it’s not already set up it doesn’t do you any good.

Of course I’m assuming you’re using the Duplicati scheduler to run the jobs. If you are using the OS scheduler to run a command line backup then things might be different…

I am aware of a third party tool under development (by @Pectojin) that MIGHT be able to do what you need, but I’m not sure if it can handle email settings or if it’s ready to be “in the wild” yet.


I suppose I should mention that it’s probably possible to have a script update the .sqlite file in which I believe the job information is stored, however I suspect it would take longer to write that script than to manually update the individual machines.

Currently it’s editing capabilities are pretty limited, so it can be done for each computer but it basically requires exporting the job on each machine and then adding the email arguments before uploading settings file :slight_smile:

With that being said I hope to eventually make it possible to just change one or two settings without having to do all that work.

I guess this is another of the drawbacks of designing Dulicati to be a standalone / untrusting app. :thinking:

Well poo. hahaha. Thanks for the replies, appreciate it.

Is there a configuration file that we can edit and copy all the send email log setting into?

Not really. Each job has its configuration on its own .sqlite file.

There is a single .sqlite for for global settings that would apply to all the jobs on a machine.

But you’re still doing SQL to edit a config.

Going forward you could set up a job to get config data from a configuration file which could make future updates easier…