Data Migration from QA to Production

Our customer is using QA environment as a pilot now.

They want to move data from QA to production and start production operation.

Is there good way to data migration?

The amount of tables and data is not so large, but there is a relationship between the data.


Their environment:

OutSystems Paas(Ver11)

DB:SQL Server

They already use Dev and QA environment but not yet using Production env.

The Module Migration will be done by using Life Time.

Hi,

You could consider using one of these two Data Migration tools (both paid versions) available in the Forge:

- Cool Data Mover

- Infosistema Data Migration Manager

If you think it’s not worth it considering the amount of tables and data, you would need to create a custom way of migrating the data yourself, either by using database scripts or bootstrapping the data from Excel files for example.

Hope this helps.

Regards,

Nordin


Solution

Hi Meg,

There is no built-in way of doing data migration between environments, but there is some documentation on how to perform it here.

Likely the most efficient way is to follow the documentation and directly manipulate the database using standard DBA tools to perform the migration.

Otherwise, if you want to handle this process via LifeTime alone, either you can use an existing CI/CD pipeline to run those migration scripts for you at the right time, or you will likely need to build your own migration tool in OutSystems:

  1. Create an exporter application that you run in QA to extract all relevant application (into one or more Excel sheets for instance - careful with the relationships, you cannot use the auto-number Ids on the Excel, as they might end up not being the same in another environment) - you may want to look into the Data Extractor for this (haven't used it myself);
  2. Use the outcome of the exporter from 1. in a new importer application, that uses it to restore the data (including relationships) into the environment it is deployed in. This importing process should be triggered by a Timer scheduled to run On Publish.
  3. Publish the importer application to Production along with the original application itself.

The third option is to use one of the (paid) Data Migration tools available on the Forge:

Hope this helps!

Solution

Hi Nordin and Jorge,

Thank you for providing information.

In my case tables and data is not large so I want to try Jorge's second option (or export/Import each table).


Jorge, may I confirm about Ids data?

Is it possible to keep current Ids when import data to production environment?

For instance, by mapping Production's Id and QA data's id when create table data in the importer application.

Hello Meg.

Quick answer: no.

Probably you used autonumber for your ids so if you deleted some, those empty spaces will not remain.

Even Statics may change ids if they are with autonumber on.


Options:

You would need to implement logic to match different foreign keys, you can have the same amount of work and create empty records to delete later and keep the sequence.

If it is a on-premises instalation, you can migrate tables. But even the entities will probably have a couple of different names among the tables.

Hi Nuno,

I'll try.

Thank you.