Migrate only changes in sysconfig

Moderator: crythias

Locked
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Migrate only changes in sysconfig

Post by ndhvu275 »

Hi all,

What is the best solution when I want to migrate only changes in sysconfig? For exmaple
- I had 2 instances of OTRS: 1 for test and 1 for production.
- I've done some changes in sysconfig on test environment
- So, I just want to migrate changes only in sysconfig from test to production environment
I know we can use will export (from test)/import (to production) functionality in sysconfig, but the exported file would be included a whole configuration from test, I don't want a whole, I just want the changes only

Please help me the solution
Thanks in adv

Vu Nguyen
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
KlausNehrer
Znuny ninja
Posts: 1312
Joined: 25 May 2012, 08:51
Znuny Version: OTRS 4
Real Name: Klaus Nehrer

Re: Migrate only changes in sysconfig

Post by KlausNehrer »

Maybe an diff between pre- and postconfigurationfile?
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Migrate only changes in sysconfig

Post by ndhvu275 »

KlausNehrer wrote:Maybe an diff between pre- and postconfigurationfile?
Yep, so do you have any way to do that? Thanks
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Migrate only changes in sysconfig

Post by crythias »

diff Config.pm and Kernel/Config dir Z*Auto.pm
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Migrate only changes in sysconfig

Post by ndhvu275 »

crythias wrote:diff Config.pm and Kernel/Config dir Z*Auto.pm
Sorry, I'm still not fully clear your idea. I'm understanding:
- Make a ZXXAuto.pm includes configure changes only, then place this file in Kernel/Config/Files/. Is it right?
- About diff Config.pm file, I don't understand. Please explain more

Thanks in adv

Vu Nguyen
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Migrate only changes in sysconfig

Post by crythias »

ndhvu275 wrote:What is the best solution when I want to migrate only changes in sysconfig? For exmaple
- I had 2 instances of OTRS: 1 for test and 1 for production.
- I've done some changes in sysconfig on test environment
- So, I just want to migrate changes only in sysconfig from test to production environment
I know we can use will export (from test)/import (to production) functionality in sysconfig, but the exported file would be included a whole configuration from test, I don't want a whole, I just want the changes only
crythias wrote:diff Config.pm and Kernel/Config dir Z*Auto.pm
ndhvu275 wrote:Make a ZXXAuto.pm includes configure changes only, then place this file in Kernel/Config/Files/. Is it right?
No, but on a distribution basis, making that file ZZZZAuto.pm would do what you wish.
ndhvu275 wrote: About diff Config.pm file, I don't understand. Please explain more
The concept is this:
1) create a vanilla/base install of OTRS without configuration changes.
2) determine a diff of the base install of Config.pm and the Config/Z*Auto.pm
3) ignore the parts in diff for Config.pm related to the database connection.
4) store the diff information as a file and copy it to the new location
5) patch the destination files.

Or, you know, just copy Config.pm and Config/Z*.pm from source to destination.
ndhvu275 wrote: but the exported file would be included a whole configuration from test, I don't want a whole, I just want the changes only
Changes from ... what? and the result of the changes from test applied to the production is different from copy/paste in what way?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
ndhvu275
Znuny advanced
Posts: 139
Joined: 06 Nov 2012, 09:02
Znuny Version: 3.x, 4.x and 5.x
Real Name: Vu Nguyen
Company: INFOdation
Location: Netherlands
Contact:

Re: Migrate only changes in sysconfig

Post by ndhvu275 »

crythias wrote: The concept is this:
1) create a vanilla/base install of OTRS without configuration changes.
2) determine a diff of the base install of Config.pm and the Config/Z*Auto.pm
3) ignore the parts in diff for Config.pm related to the database connection.
4) store the diff information as a file and copy it to the new location
5) patch the destination files.

Or, you know, just copy Config.pm and Config/Z*.pm from source to destination.
Thank so much Crythias, I did follow this solution

Vu Nguyen
OTRS 3.x, 4.x on CentOS/Windows
MySQL database
External customer backend with MySQL, MSSQL
Customization
Locked