Backup, Restore and the Go-Live Process

The purpose of this page is to walk you through the steps needed to prepare your environments for go-live. This page focuses on real-live environment management including backing up and restoring from a remote location. View this page and this page to learn the basic backup and restore processes built in to iDempiere.

Environment Management Introduction

Offsite Backup Demonstration (ppt) - Database Only

Restore From Offsite Backup to Test Environment Demonstration - Database Only

Protecting Your Application Server (Binaries)

The above videos focus on your database. The below thread applies a similar concept to your application server. Link to discussion

Backup All and Restore All - Moving both Binaries and Data

The purpose of this page is to help you manage test servers that are near-exact duplicates of production. Creating and managing test servers (UAT, Test, Dev, etc...) can be tough. Specifically, it is tough to create an exact duplicate of the production system to ensure what you are testing will behave the exact same way in production when released. Here are the steps to create your test system. Note these steps assume you are using Amazon's AWS; however, the concepts are the same for VMWare or Virtualbox.

Creating Your Test Environment - Considerations

Note: this discussion is older, and it is replaced by the above Backup All and Restore All instructions.

Executing a Scenario in your Clean Test Environment

Note: This video demonstrates how to remove test transactions from your server.

The 7 Mock Go-Lives to Help Ensure your Success

20160811 Go-Live Push from Pristine Environment to Test Environment

Summary
The purpose of this section is to help you push both the server and the data from the Pristine environment to the Test environment. The following concepts are important:
From Pristine App Server
  1. sudo service idempiere stop
  2. cd /opt/idempiere-server/utils/
  3. sudo -u idempiere ./RUN_DBExport.sh
    1. Creates a current backup in the directory that will be moved
  4. cd /opt/idempiere-server/
  5. sudo -u idempiere hg addremove
  6. sudo -u idempiere hg commit -m "commit before restore to test commit"
  7. sudo -u idempiere hg push YOUR_ONLINE_BACKUP_BITBUCKET_ACCT_URL
  8. sudo rm -r /opt/id_back/*
    1. this step assumes you have already created this directory and that is owned by idempiere
  9. sudo -u idempiere cp /opt/idempiere-server/ /opt/id_back/ -R
  10. cd /opt/id_back
  11. sudo -u idempiere tar cvfz id.tar.gz idempiere-server/
From Pristine DB Server
  1. sudo service postgresql stop
    1. To prevent accidental contamination of pristine db - will start later
From Test App Server
  1. sudo service idempiere stop
  2. sudo rm /tmp/id.tar.gz
  3. scp USER_ID@MACHINE_NAME:/opt/id_back/id.tar.gz /tmp
  4. sudo rm /opt/id_back_test/* -r
    1. this step assumes you have already created this directory and it is owned by idempiere
  5. sudo -u idempiere cp /opt/idempiere-server/ /opt/id_back_test/ -R
  6. sudo rm /opt/idempiere-server/ -r
  7. sudo tar zxvf /tmp/id.tar.gz -C /opt/
  8. sudo chown idempiere:idempiere /opt/idempiere-server/
  9. cd /opt/idempiere-server/
  10. sudo -u idempiere ./console-setup.sh
  11. Override setting for the bolded options below:
    1. ...
    2. Application Server Host Name [TEST_MACHINE_NAME]:
    3. Application Server Web Port [8080]:
    4. ...
    5. Database Server Host Name [DATABASE_MACHINE_NAME]:
    6. ...
  12. cd /opt/idempiere-server/utils/
  13. sudo -u idempiere ./RUN_DBRestore.sh
    1. Restores from the above backup in the directory that will be moved
  14. Update /opt/idempiere-server/jettyhome/etc/jetty-ssl.xml to allow 0.0.0.0
  15. cd /opt/chuboe/idempiere-installation-script/utils/
  16. ./chuboe_idempiere_upgrade.sh
    1. NOTE: this performs any upgrades since the last production upgrade - this may be necessary to support plugins that are not released to production Now install all test plugins that have not already been installed in production. Restart app server when done.
Execute the following SQL script to update known tasks (like logos, etc…)
  1. Update AD_SysConfig set value = 'URL_TO_YOUR_SMALL_LOGO_FOR_TEST_ENV' where AD_SysConfig_ID=9999999999;
  2. Update AD_SysConfig set value = 'URL_TO_YOUR_LARGE_LOGO_FOR_TEST_ENV' where AD_SysConfig_ID=999999988;
Create Transactions in your Test Environment
This makes sure the test environment works and has no dependencies on the pristine environment.
Back to the Pristine DB
  1. sudo service postgresql start
Back to the Pristine App
  1. Sudo service idempiere start