The Database Backup utility in Ginesys HO helps users to take regular backup of Ginesys database. The utility uses the EXPDP command which is an in-built utility of Oracle database. In Ginesys Database Backup utility it takes export of selective schemas which are essential for standard functionality of Ginesys.
This article is for advanced usage to backup database without using the Ginesys Database Backup utility. The purpose is like to take a complete database backup during planned or emergency migration, preparing backup script for scheduled backup etc. This article describes how we can take backup of Ginesys database without using the Ginesys Database Backup utility. Additionally the guide also describes the process for import the database on different database.
One can read the original article from Oracle on EXPDP and IMPDP commands for detailed understanding on Oracle commands. The article can be found here at Oracle Data Pump
The import of the backup used to happen earlier using Ginesys import utility as a part of Ginesys Getting Started. The utility doesn't support IMPDP command and currently the utility is not functional. Moreover, we recommend to take help of Ginesys Care team for restoring (importing) Ginesys database backup on production environment. Users can attempt data import with the help of this article for there internal demonstration or testing environment. |
Oracle database must be of Oracle 10g or above. Steps are tested with Oracle 10g (10.2.0.4.0) and Oracle 12c (12.1.0.2.0).
Oracle login credential for SYSTEM user.
Privilege to set security of OS directory.
It is always recommended to check available disk space before starting the export utility. Ensure sufficient space in local storage on Database server. You may require at least 80% of the size of Oracle data folder (ORADATA). |
Create a folder on local storage of Database server for expdp dump and give appropriate permission. Ensure Oracle database have access to directory to generate backup file.
On Windows server:
E:\HO_Backup
On Linux server:
/oracle/ho_backup
Windows-based ServerIn Windows we create directories within logical volume and we use backslash (\) for mentioning a directory path. For an example we create a directory for Ginesys Database backup is E:\HO_Backup Linux-based ServerIn Linux we use forward slash (/) for mentioning a directory path. For an example we create a directory for Ginesys Database backup is /oracle/ho_backup |
Open a command-prompt or terminal and connect database using SQLPLUS with SYS user. Ensure correct version of SQLPLUS from from correct Oracle home based on the database version is running. We assume the database instance name as GINESYS and the password of SYS as SYSPWD
Command
SQPLUS SYS/SYSPWD@GINESYS as SYSDBA
create or replace directory GSLBAK as '<BACKUP_PATH>'; |
On Windows server:
create or replace directory GSLBAK as 'E:\HO_Backup';
On Linux server:
create or replace directory GSLBAK as '/oracle/ho_backup';
grant read,write on directory GSLBAK to system; |
host expdp system/SYSPWD DIRECTORY=GSLBAK DUMPFILE=GINESYS_DP.DMP LOGFILE=GINESYS_EXPDP.LOG EXCLUDE=STATISTICS REUSE_DUMPFILES=YES FULL=Y; |
For creation a batch file or script to automate the backup, you can mention the command in the batch or script. Only the main backup command, Statement 3: Backup command under step 3 need to be mentioned in batch / script. All other commands can be run onetime to prepare the backup environment. |
Open a command-prompt or terminal and connect database using SQLPLUS with SYS user. Ensure correct version of SQLPLUS from from correct Oracle home based on the database version is running. We assume the destination database instance name as GINESYS and the password of SYS as SYSPWD
Command
SQPLUS SYS/SYSPWD@GINESYS as SYSDBA
create or replace directory GSLBAK as '<RESTORE_PATH>'; |
On Windows server:
create or replace directory GSLBAK as 'D:\HO_Restore';
On Linux server:
create or replace directory GSLBAK as '/oracle/ho_restore';
grant read,write on directory GSLBAK to system; |
<USER_SCHEMA> - The Oracle user schema used for Ginesys data. Example: MNHO
host impdp system/SYSPWD DIRECTORY=GSLBAK DUMPFILE=GINESYS_DP.DMP LOGFILE=GINESYS_IMPDP.LOG SCHEMAS=<USER_SCHEMA>,GATEWAY,GINVIEW,GINSSOT,GINAPPS,GINBASE,MISRETAIL,GINARCHIVE |
Done. Import log GINESYS_IMPDP.log file can be found at specified location.
There are some post-restore configuration required to start Ginesys with this restored database. Please get in touch with GInesys Care to take assistance with post-restore configuration. |
Reference: