Versions Compared

Key

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

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 Tomcat FlexDeploy server. Use shutdownStopFlexDeploy.sh on Linux and shutdownStopFlexDeploy.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

Code Block
drop user fd cascade;
drop user ff cascade;
drop user fd_admin cascade;

Import data from backup (PostgreSQL)

Code Block
languagebash
sudo su - postgres
 
/usr/pgsql-12/bin/psql -U postgres -p 5436 -d flexdeploy -f input.bkp | tee logfile.out

Import data from backup (Oracle)

Code Block
languagebash
# You will need to setup environment variables before running expdp. For example,
 
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=fd01
 
impdp system directory=DATA_PUMP_DIR dumpfile=fd_bkup.dmp schemas=FD,FF,FD_ADMIN

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.

Code Block
languagebash
cd <artifact repository location>
rm -rf *
tar -xvzf

...

 <path to artifacts backup>/artifacts.tar.gz

...

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).

Code Block
languagebash
cd <server working directory>
cd plugins
rm -rf *
tar -xvzf

...

 <path to plugins backup>/plugins

...

.tar.gz

Restore apache-tomcat-flexdeploy Directory

Restore tomcat folder from backup.

Code Block
languagebash
# Assuming FLEXDEPLOY_HOME environment variable is set, it should be parent folder of apache-tomcat-flexdeploy
export FLEXDEPLOY_HOME=/u01/flexdeploy
cd $FLEXDEPLOY_HOME

...


...

mv apache-tomcat-flexdeploy/ apache-tomcat-flexdeploy-before-

...

restore/
mv <path to tomcat backup/apache-tomcat-flexdeploy

...

/ apache-tomcat-flexdeploy/

...

Step 3 . Start tomcat FlexDeploy by running the following script

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

...