On Sat, Dec 18, 2021 at 7:51 PM Diggy Mc <d03(a)bornfree.org> wrote:
Is there a command I can run on the engine to retrieve the engine's version number?
Nothing official, AFAIK. Depending on context, one of these might be helpful:
# rpm -q ovirt-engine
# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select
option_value from vdc_options where option_name = 'ProductRPMVersion'"
If you want to use the API/SDK, please see:
http://ovirt.github.io/ovirt-engine-api-model/master/#types/product_info
https://github.com/oVirt/python-ovirt-engine-sdk4/blob/main/examples/show...
I ask because I am writing a bash script to automatically backup the engine database via
the 'engine-backup' command and would like to include the engine's current
version number with the backup.
That's already the case, see files 'version' and 'os_version' inside
the generated archive.
For sh/bash scripts, another (non-official?) way is:
. /usr/share/ovirt-engine/bin/engine-prolog.sh
# echo $DISPLAY_VERSION $PACKAGE_DISPLAY_VERSION $PACKAGE_VERSION
engine-backup uses $PACKAGE_VERSION (slightly differently than above).
On Sun, Dec 19, 2021 at 1:11 AM Diggy Mc <d03(a)bornfree.org> wrote:
On a related side-note, it would be nice if future versions of 'engine-backup'
included the engine's version number in the log file that 'engine-backup'
outputs.
You are welcome to file an RFE bug for this, and/or push a patch to do
this - should be rather simple. Thanks.
Best regards,
--
Didi