Hi Stefan,

Plugin Options are passed verbatim to the plugin.  It would be up to the plugin how to handle these variables. As far as I am aware, almost no plugin tries to do such expansions in their options.

There is one ugly way to do it however:
Writing `Plugin = "\\|command"` makes it so that the client executes the command and parses its standard output as a list of plugin directives. So you should be able to do `Plugin = "\\|echo python:module_name..."` etc. This probably needs to be all in one line however.

See https://docs.bareos.org/Configuration/Director.html#config-Dir_Fileset_Include_File here for infos (Its only documented for `File`, but it should also work for `Plugin`).

Kind Regards
Sebastian Sura

Am 30.01.26 um 14:15 schrieb Stefan Harbich:
Hi everyone,
i have a question.
Can I work with variables in Python plugins?
For example
...
root@bareos:~# cat /etc/bareos/bareos-dir.d/fileset/plugin-postgresql.conf
FileSet {
    Name = "plugin-postgresql"
    Include  {
        Options {
            compression=LZ4
            signature = XXH128
        }
        Plugin = "python"
                 ":module_name=bareos-fd-postgresql"
                 ":db_host=$HOSTNAME --fqdn"
                 ":db_user=########"
                 ":db_password=###########"
                 ":wal_archive_dir=/media/backups/dsme01.intern.example.com/postgresql/wal_archives/ <http://dsme01.intern.harnet.de/postgresql/wal_archives/>"
    }
}
...
The entry "db_host=$HOSTNAME --fqdn" does not work
Regards, Stefan Harbich
--
You received this message because you are subscribed to the Google Groups "bareos-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bareos-users/81d5fbae-37a7-4d94-9f7d-0d9c4a8d8703n%40googlegroups.com <https://groups.google.com/d/msgid/bareos-users/81d5fbae-37a7-4d94-9f7d-0d9c4a8d8703n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
 Sebastian [email protected]
 Bareos GmbH & Co. KG            Phone: +49 221 630693-0
 https://www.bareos.com
 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Komplementär: Bareos Verwaltungs-GmbH
 Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz

--
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/bareos-users/3573915b-f453-49f1-b5d2-d5ecc9f5c603%40bareos.com.

Reply via email to