Restoring a backup

This page provides instructions for restore of FlexDeploy from previous backup, perhaps to undo an upgrade.

If you are using automated installer, then backups for folders and files is located at $FLEXDEPLOY_HOME/upgrade/upgrade_backups/<MMDDYYYY>/. There would be tomcat, artifacts, plugins sub-folders here.


Step 1. Stop the FlexDeploy server. Use StopFlexDeploy.sh on Linux and StopFlexDeploy.bat on Windows. This will stop Tomcat and InfluxDB.


Step 2. Restore FlexDeploy schemas, Artifact Repository, Plugins directory and apache-tomcat-flexdeploy folder.

First drop schemas (sqlplus, SQL Developer, or other database tools) and then import from backup.

Drop Schemas

drop user fd cascade; drop user ff cascade; drop user fd_admin cascade;

Import data from backup directory (PostgreSQL) - If you used the automated installer and specified a backup directory, or you used pg_dump

if you used pg_dump (what the automated installer uses when you specify the backup directory in your config file) pg_restore --host ${HOST} --port ${PORT} --schema FD --username postgres --verbose --format d --file ${PATH/TO/BACKUP}/FD flexdeploy pg_restore --host ${HOST} --port ${PORT} --schema FF --username postgres --verbose --format d --file ${PATH/TO/BACKUP}/FF flexdeploy pg_restore --host ${HOST} --port ${PORT} --schema FD_ADMIN --username postgres --verbose --format d --file ${PATH/TO/BACKUP}/FD_ADMIN flexdeploy

Import data from backup schema (PostgreSQL) - If you used the automated installed and omitted backup directory

sudo su - postgres psql --host ${HOST} --port ${PORT} -d flexdeploy alter schema FD_bak rename to FD alter schema FF_bak rename to FF alter schema FD_ADMIN_bak rename to FD_ADMIN

Import data (PostgreSQL) from pg_dumpall

Import data from backup (Oracle)

Restore Artifact Repository

Now restore artifact repository. The location of the artifact repository can be identified by looking at value of -Dflexagon.fd.repository.root in setenvoverride.sh/setenv.sh or setenvoverride.bat/setenv.bat file.

Restore Plugins Directory

Now restore plugins folder. The location of the plugins folder can be identified by looking at value of -Dflexagon.fd.install.root in setenvoverride.sh/setenv.sh or setenvoverride.bat/setenv.bat file. plugins folder is sub-folder for this install root (aka server working directory).

Restore apache-tomcat-flexdeploy Directory

Restore tomcat folder from backup.


Step 3 . Start FlexDeploy by running the following script

FLEXDEPLOY_HOME/apache-tomcat-flexdeploy/bin/StartFlexDeploy.sh (StartFlexDeploy.bat on Windows)


 

The following macros are not currently supported in the footer:
  • style