mergeprop add default values before backig up

Posted by Dmitry Lishafaev on 27-Jan-2020 09:14

Hello!

How to mergeprop works with properties files?
For example, after "...-action update -delta .../file.prop" mergeprop will add to original file some default values and only than make a backup.
Is this correct behaviour? In my opinion original file (without any modification) should be backed up.

And I can't find, for example, description for rmiWatchdogInterval.

WBR

All Replies

Posted by Gareth Vincent on 27-Jan-2020 09:24

That is correct, it will add or modify any changes you make in the delta to the ubroker or conmgr properties file.  By default it will make a backup if you do not include the -nobackup option.  

mergeprop -delta Delta_file -type ubroker/database -action update.  In this example it will automatically create a backup in your DLC/properties directory.  I would always suggest running a validate first to check for any errors in the delta file.  mergprop -delta Delta_file -type database/ubroker -validate.  I believe it also requires the full path to the delta file when you are running the command.

Posted by Dmitry Lishafaev on 27-Jan-2020 11:06

1) I have renamed ubroker.samples to ubroker.properties and manually created backup - ubroker.orig

2) I have created delta.prop:

[Environment.my-appserver2]
TZ=Europe/Moscow

3)  I have applied delta.prop to ubroker properties

Delta between autogenerated ubroker.properties01272020012204 and ubroker.orig is huge.

So original file will never backed up.

Posted by Gareth Vincent on 27-Jan-2020 11:13

The auto generated file ubroker.properties01272020012204 that you are referring too is the backup file.  The mergprop command will backup the ubroker.properties file first and then update it.

Posted by Dmitry Lishafaev on 27-Jan-2020 11:25

This backup contains original file plus default values which was omitted in original file. This isn't true backup (only original data)

This thread is closed