Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Export data from Production FlexDeploy database.

    • You should export FD,FF and FD_ADMIN.

  • Take backup of artifact repository folder using tar/zip commands on Production FlexDeploy server. (Optional if you won’t be deploying any old artifacts, they are not needed) For example,

    • cd /flexdeploy/artifacts

    • tar -czvf /app/backup/flexdeploy_artifacts_prod.tar.gz *

  • Take backup of plugins folder using tar/zip commands on Production FlexDeploy server. Plugins folder is under server working directory. You can determine working folder by looking at flexagon.fd.application.root system property on server command line. For example,

    • cd /flexdeploy/application/plugins

    • tar -czvf /app/backup/flexdeploy_plugins.tar.gz *

  • Take backup of vsm folder (InfluxDB)

    • cd /flexdeploy/application/vsm

    • tar -czvf /app/backup/flexdeploy_vsm_prod.tar.gz *

  • Make sure Test FlexDeploy is now stopped for import process.

  • Import data in to target FlexDeploy database. Make sure to run this on Test environment only.

    • Run the following sql command for the appropriate database that will generate many drop table, view and procedure statements as output.  Once this sql is complete, copy all of the output and execute that against the test database.  This method will drop all of the data but maintain table spaces, quotas and passwords for the given schemas.  This will also maintain the same password that is stored in the context.xml file.

      Oracle DB: Drop tables, views and procedures without dropping user

      Code Block
      languagesql
      select 'drop table ' || owner ||'.' || table_name || ' cascade constraints PURGE;' from dba_tables where owner in ('FD','FD_ADMIN','FF')
      union all
      select 'drop view ' || owner || '.' || view_name || ';' from dba_views where owner in ('FD','FD_ADMIN','FF')
      union all
      select 'drop procedure ' || owner || '.' || object_name || ';' from dba_objects where owner in ('FD','FD_ADMIN','FF') and object_type = 'PROCEDURE';

...

  • Make sure there are no errors in import process. If there are errors, make corrections appropriately and restart import process.

  • At this point, the Test FlexDeploy database should be copy of Production database.

  • Copy artifacts zip file to Test FlexDeploy server and extract it in the artifact repository folder. You can determine Artifact Repository folder by looking at flexagon.fd.repository.root system property on server command line. Make sure to run this on Test environment only.

    • cd /flexdeploy/artifacts

    • tar -czvf /app/backup/flexdeploy_artifacts_test.tar.gz *

    • rm -rf *

    • tar -xzvf /app/backup/flexdeploy_artifacts_prod.tar.gz

  • Now FlexDeploy artifact repository is also copied.

  • Copy plugins tar/zip file to Test FlexDeploy server and extract it in the plugins directory under working directory. You can determine working folder by looking at flexagon.fd.application.root system property on server command line.

    • cd /flexdeploy/application/plugins

    • rm -rf ./*

    • tar -xzvf /app/backup/flexdeploy_plugins.tar.gz

  • Now FlexDeploy plugins are also copied.

Copy Influx DB

To sync your influx db between prod and test, follow these steps:

In TEST (Target)

  1. cd /flexdeploy/application/vsm

  2. tar -czvf /app/backup/flexdeploy_vsm_test.tar.gz *

  3. rm -rf ./*

  4. tar -xzvf /app/backup/flexdeploy_vsm_prod.tar.gz

  • Now FlexDeploy InfluxDB data is also copied.

Update Target Database as Necessary

...