1. ntbackup command to backup the SQL file system
2. reg command to backup the windows registry
Important: when we recover file system from file system backup, first DELETE the files that have been damaged or maybe damaged, otherwise, the existing file will NOT be recoverred from the backup, this is very important!
Example: Suppose, the SQL Master database is damaged, and the SQL server cannot be started. Here is the steps: Open the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data folder, for all of the files that have new time stamps after the existing backup time, move them to a temp folder, or simply delete all of the files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data folder. This will force a clean recovery. And then,use ntbackup command line to recover the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data folder from the backup.
-----------
Below is the script for backup the SQL file systems:
@ECHO OFF
REM --------------------------------------------------------------------------------
REM Procedure Name: BackupSQLFileSystem.bat
REM Created By: Bob Wang
REM Creation Date: 17-Mar-2010
REM Functionality: 1. backup SQL File System
REM 2. backup hKEY_LOCAL_MACHINE registries
REM
REM Modification History:
REM ---------------------------------------------------------------------------------
@for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do @set dt=%%i-%%j-%%k-%%l
@for /f "Tokens=1" %%i in ('time /t') do @set tm=-%%i
@set tm=%tm::=-%
@set dtt=%dt%%tm%
@echo SQL file system full backup set: %dtt%.
@echo Please wait...
@C:\WINDOWS\system32\ntbackup.exe backup "@C:\download\GoLive\SQL Server\set_SQL.bks" /a /d "Backup %dtt%" /v:no /r:no /rs:no /hc:off /m copy /j "%dtt%" /l:s /f "C:\SQL Server Backup\SQLFileSystemBackup %dtt%.bkf"
@ECHO eXPORT HKEY_LOCAL_MACHINE registries ..
@C:\WINDOWS\system32\REG.exe EXPORT HKLM "C:\SQL Server Backup\HKEY_LOCAL_MACHINE_Backup %dtt%.reg"
-----------------------------
The improved code:
@ECHO OFF
REM --------------------------------------------------------------------------------
REM Procedure Name: BackupSQLFileSystem.bat
REM Created By: Bob Wang
REM Creation Date: 17-Mar-2010
REM Functionality: 1. backup SQL File System
REM 2. backup hKEY_LOCAL_MACHINE registries
REM
REM Modification History:
REM ---------------------------------------------------------------------------------
@set path1="C:\WINDOWS\system32\ntbackup.exe"
@set path2="@C:\download\GoLive\SQL Server\set_SQL.bks"
@set path3="C:\SQL Server Backup\SQLFileSystemBackup %dtt%.bkf"
@set path4="C:\SQL Server Backup\HKEY_LOCAL_MACHINE_Backup %dtt%.reg"
@for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do @set dt=%%i-%%j-%%k-%%l
@for /f "Tokens=1" %%i in ('time /t') do @set tm=-%%i
@set tm=%tm::=-%
@set dtt=%dt%%tm%
@echo SQL file system full backup set: %dtt%.
@echo Please wait...
@%path1% backup %path2% /a /d "Backup %dtt%" /v:no /r:no /rs:no /hc:off /m copy /j "%dtt%" /l:s /f %path3%
@ECHO eXPORT HKEY_LOCAL_MACHINE registries ..
@C:\WINDOWS\system32\REG.exe EXPORT HKLM %path4%
Showing posts with label Backup. Show all posts
Showing posts with label Backup. Show all posts
11/28/09
Java - backup Essbase
We can create Java procedure that will automatically backup the Essbase database, and even recover the essbase database when necessary.
package com.essbase.samples.japi;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.io.File;
import com.essbase.api.base.EssException;
import com.essbase.api.datasource.EssSEQID;
import com.essbase.api.datasource.EssTRANSACTION;
import com.essbase.api.datasource.EssTRANSACTION_REPLAY;
import com.essbase.api.datasource.IEssCube;
import com.essbase.api.datasource.IEssOlapFileObject;
import com.essbase.api.datasource.IEssOlapServer;
import com.essbase.api.domain.IEssDomain;
import com.essbase.api.session.IEssbase;
/**
* Signs on to essbase domain,
* creates a App and Cube, backups the database(cube) and then restores it.
* In order for this sample to work in your environment, make sure to
* change the s_* variables to suit your environment.
*
* @author
* @version
*/
public class BackupAndRestoreDatabase {
// NOTE: Change the following variables to suit your setup.
private static String s_userName = "system";
private static String s_password = "password";
private static String s_olapSvrName = "localhost";
/* Possible values for s_provider:
"Embedded" or "http://localhost:13080/aps/JAPI" */
private static String s_provider = "Embedded"; // Default
private static final int FAILURE_CODE = 1;
public static void main(String[] args) {
int statusCode = 0;
IEssbase ess = null;
IEssOlapServer olapSvr = null;
try {
acceptArgs(args);
// Create JAPI instance.
ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
// Sign On to the Provider
IEssDomain dom = ess.signOn(s_userName, s_password, false, null,s_provider);
// Open connection with OLAP server and get the cube.
olapSvr = (IEssOlapServer) dom.getOlapServer(s_olapSvrName);
olapSvr.connect();
try {
// Delete the App if it already exists
olapSvr.getApplication("BackUp").delete();
} catch (EssException x) {
// Ignore Error
}
// Create a new Application/Cube : BackUp/Basic - Copy of Sample/Basic
olapSvr.createApplication("BackUp");
dom.copyCube(s_olapSvrName, "Sample", "Basic", s_olapSvrName, "BackUp","Basic");
olapSvr.disconnect();
olapSvr.connect();
IEssCube cube = olapSvr.getApplication("BackUp").getCube("Basic");
BackUpAndRestore(cube);
System.out.println("Cube Archive and Restore Sample completed.");
// Transaction logging requires the below essbase property to be set in essbase.cfg. Choose one
// of the below ways to set it.
// TransactionLogLocation AppName DbName LogLocation NATIVE ENABLE|DISABLE
// TransactionLogLocation AppName LogLocation NATIVE ENABLE
// TransactionLogLocation LogLocation NATIVE ENABLE
// Ex: TransactionLogLocation Sample Basic D:\Hyperion\AnalyticServices-950\app\Sample\Basic NATVIE ENABLE
// TransactionLoggingAndReplay(cube);
// Delete newly created Application.
olapSvr.getApplication("BackUp").delete();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
statusCode = FAILURE_CODE;
} finally {
// Close OLAP server connection and sign off from the domain.
try {
if (olapSvr != null && olapSvr.isConnected() == true)
olapSvr.disconnect();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}
try {
if (ess != null && ess.isSignedOn() == true)
ess.signOff();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}
}
// Set status to failure only if exception occurs and do abnormal termination
// otherwise, it will by default terminate normally
if (statusCode == FAILURE_CODE)
System.exit(FAILURE_CODE);
}
static void TransactionLoggingAndReplay(IEssCube cube) throws EssException {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DATE, -2);
cal.getTimeInMillis();
SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yyyy:HH:mm:ss");
String date = fmt.format(cal.getTime());
System.out.println("From Date specified for Transactions is :"+ date);
EssTRANSACTION[] list = cube.listTransactions((short)1, date, IEssCube.ESS_LIST_TRANSACTIONS_TOCLIENT, "");
if (list == null || list.length ==0) {
System.out.println("\nNo transactions to List or Replay since "+ date +".\n"
+"Please comment out the BackUpAndRestore(cube) function call in this sample and\n ensure you have executed a transaction like loaddata prior to running this sample.");
return;
}
for (int i = 0; i < list.length; i++) { System.out.println(list[i] +"\n"); } System.out.println("List transactions complete"); EssTRANSACTION_REPLAY replayTran = new EssTRANSACTION_REPLAY((byte)2, date, 1); EssSEQID[] seqIds = new EssSEQID[1]; seqIds[0] = new EssSEQID(list[0].getSeq_id(), list[0].getSeq_id_upper(), 1, list[0].getSeq_id_upper()); cube.replayTransactions(replayTran, seqIds); System.out.println("Relplay transactions complete"); } static void BackUpAndRestore(IEssCube cube) throws EssException { cube.loadData(true, false, "Product Market Actual Sales Jan 4469\n" + "Product Market Actual Sales Feb 42494"); String ArchiveFile = System.getProperty("java.io.tmpdir") + "demobasic.arc"; cube.archiveDatabase(ArchiveFile, "", true); // Take backup. cube.loadData(IEssOlapFileObject.TYPE_RULES, null, IEssOlapFileObject.TYPE_TEXT, "Calcdat", false); String[] Src = null; String[] Dest = null; // Unload Database before restoring. do { try { Thread.sleep(5000); cube.stop(); break; } catch(EssException x){ // If error occurs in unloading database because database is in use(Error #1013113), // wait for 5 sec. and try again. if(x.getNativeCode() == 1013113) continue; else break; } catch (Exception x) { break; } } while (true); cube.restoreDatabase(ArchiveFile, false, Src, Dest); // Restore database. (new File (ArchiveFile)).delete(); } static void acceptArgs(String[] args) throws EssException { if (args.length >= 4) {
s_userName = args[0];
s_password = args[1];
s_olapSvrName = args[2];
s_provider = args[3]; //PROVIDER
} else if (args.length != 0) {
System.err.println("ERROR: Incorrect Usage of this sample.");
System.err.println("Usage: java " + BackupAndRestoreDatabase.class.getName()
+ " ");
System.exit(1); // Simply end
}
}
}
package com.essbase.samples.japi;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.io.File;
import com.essbase.api.base.EssException;
import com.essbase.api.datasource.EssSEQID;
import com.essbase.api.datasource.EssTRANSACTION;
import com.essbase.api.datasource.EssTRANSACTION_REPLAY;
import com.essbase.api.datasource.IEssCube;
import com.essbase.api.datasource.IEssOlapFileObject;
import com.essbase.api.datasource.IEssOlapServer;
import com.essbase.api.domain.IEssDomain;
import com.essbase.api.session.IEssbase;
/**
* Signs on to essbase domain,
* creates a App and Cube, backups the database(cube) and then restores it.
* In order for this sample to work in your environment, make sure to
* change the s_* variables to suit your environment.
*
* @author
* @version
*/
public class BackupAndRestoreDatabase {
// NOTE: Change the following variables to suit your setup.
private static String s_userName = "system";
private static String s_password = "password";
private static String s_olapSvrName = "localhost";
/* Possible values for s_provider:
"Embedded" or "http://localhost:13080/aps/JAPI" */
private static String s_provider = "Embedded"; // Default
private static final int FAILURE_CODE = 1;
public static void main(String[] args) {
int statusCode = 0;
IEssbase ess = null;
IEssOlapServer olapSvr = null;
try {
acceptArgs(args);
// Create JAPI instance.
ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
// Sign On to the Provider
IEssDomain dom = ess.signOn(s_userName, s_password, false, null,s_provider);
// Open connection with OLAP server and get the cube.
olapSvr = (IEssOlapServer) dom.getOlapServer(s_olapSvrName);
olapSvr.connect();
try {
// Delete the App if it already exists
olapSvr.getApplication("BackUp").delete();
} catch (EssException x) {
// Ignore Error
}
// Create a new Application/Cube : BackUp/Basic - Copy of Sample/Basic
olapSvr.createApplication("BackUp");
dom.copyCube(s_olapSvrName, "Sample", "Basic", s_olapSvrName, "BackUp","Basic");
olapSvr.disconnect();
olapSvr.connect();
IEssCube cube = olapSvr.getApplication("BackUp").getCube("Basic");
BackUpAndRestore(cube);
System.out.println("Cube Archive and Restore Sample completed.");
// Transaction logging requires the below essbase property to be set in essbase.cfg. Choose one
// of the below ways to set it.
// TransactionLogLocation AppName DbName LogLocation NATIVE ENABLE|DISABLE
// TransactionLogLocation AppName LogLocation NATIVE ENABLE
// TransactionLogLocation LogLocation NATIVE ENABLE
// Ex: TransactionLogLocation Sample Basic D:\Hyperion\AnalyticServices-950\app\Sample\Basic NATVIE ENABLE
// TransactionLoggingAndReplay(cube);
// Delete newly created Application.
olapSvr.getApplication("BackUp").delete();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
statusCode = FAILURE_CODE;
} finally {
// Close OLAP server connection and sign off from the domain.
try {
if (olapSvr != null && olapSvr.isConnected() == true)
olapSvr.disconnect();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}
try {
if (ess != null && ess.isSignedOn() == true)
ess.signOff();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}
}
// Set status to failure only if exception occurs and do abnormal termination
// otherwise, it will by default terminate normally
if (statusCode == FAILURE_CODE)
System.exit(FAILURE_CODE);
}
static void TransactionLoggingAndReplay(IEssCube cube) throws EssException {
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DATE, -2);
cal.getTimeInMillis();
SimpleDateFormat fmt = new SimpleDateFormat("MM/dd/yyyy:HH:mm:ss");
String date = fmt.format(cal.getTime());
System.out.println("From Date specified for Transactions is :"+ date);
EssTRANSACTION[] list = cube.listTransactions((short)1, date, IEssCube.ESS_LIST_TRANSACTIONS_TOCLIENT, "");
if (list == null || list.length ==0) {
System.out.println("\nNo transactions to List or Replay since "+ date +".\n"
+"Please comment out the BackUpAndRestore(cube) function call in this sample and\n ensure you have executed a transaction like loaddata prior to running this sample.");
return;
}
for (int i = 0; i < list.length; i++) { System.out.println(list[i] +"\n"); } System.out.println("List transactions complete"); EssTRANSACTION_REPLAY replayTran = new EssTRANSACTION_REPLAY((byte)2, date, 1); EssSEQID[] seqIds = new EssSEQID[1]; seqIds[0] = new EssSEQID(list[0].getSeq_id(), list[0].getSeq_id_upper(), 1, list[0].getSeq_id_upper()); cube.replayTransactions(replayTran, seqIds); System.out.println("Relplay transactions complete"); } static void BackUpAndRestore(IEssCube cube) throws EssException { cube.loadData(true, false, "Product Market Actual Sales Jan 4469\n" + "Product Market Actual Sales Feb 42494"); String ArchiveFile = System.getProperty("java.io.tmpdir") + "demobasic.arc"; cube.archiveDatabase(ArchiveFile, "", true); // Take backup. cube.loadData(IEssOlapFileObject.TYPE_RULES, null, IEssOlapFileObject.TYPE_TEXT, "Calcdat", false); String[] Src = null; String[] Dest = null; // Unload Database before restoring. do { try { Thread.sleep(5000); cube.stop(); break; } catch(EssException x){ // If error occurs in unloading database because database is in use(Error #1013113), // wait for 5 sec. and try again. if(x.getNativeCode() == 1013113) continue; else break; } catch (Exception x) { break; } } while (true); cube.restoreDatabase(ArchiveFile, false, Src, Dest); // Restore database. (new File (ArchiveFile)).delete(); } static void acceptArgs(String[] args) throws EssException { if (args.length >= 4) {
s_userName = args[0];
s_password = args[1];
s_olapSvrName = args[2];
s_provider = args[3]; //PROVIDER
} else if (args.length != 0) {
System.err.println("ERROR: Incorrect Usage of this sample.");
System.err.println("Usage: java " + BackupAndRestoreDatabase.class.getName()
+ "
System.exit(1); // Simply end
}
}
}
11/19/09
Special Notices for Essbase
Note: there are 2 ways for Essbase backup and recovery
Method 1:
backup = full essbase backup + transaction log backup
recovery = full essbase recovery + replay transaction log
Method 2:
backup = backup all Essbase system files
recovery=replace essbase system files with the backup files
You can backup files while Essbase is in read only mode
The Essbase should be stopped while recovery is processing in method 1 or 2.
---------------------------------------------------------------------------
Note: Essbase Outline change will NOT be logged!
Note: in the essbase.cfg file, set the SPLITARCHIVEFILE configuration to TRUE. This will split archive file to smaller size(<2 GB).
Note: Partition commands (for example, synchronization commands) are not logged and,
therefore, cannot be replayed. When recovering a database, you must replay logged
transactions and manually make the same partition changes in the correct chronological order.
When using partitioned databases or using the @XREF function in calculation scripts, you must selectively replay logged transactions in the correct chronological order between the source and target databases.
Note: for ASO Essbase,the only way is system file backup:
1 Stop the application.
2 Use the file system to copy the contents of the application directory (ARBORPATH/app/appname),excluding the temp directory
-----------------------------------------------------------------------------
Set Essbase in read only mode when backing up:
alter database begin archive
Set Essbase back to read/write after backing up:
alter database end archive
----------------------------------------------------------------------------
Use export command to export data file is also a simple option to keep text format data backup, level 0 data is ok
Method 1:
backup = full essbase backup + transaction log backup
recovery = full essbase recovery + replay transaction log
Method 2:
backup = backup all Essbase system files
recovery=replace essbase system files with the backup files
You can backup files while Essbase is in read only mode
The Essbase should be stopped while recovery is processing in method 1 or 2.
---------------------------------------------------------------------------
Note: Essbase Outline change will NOT be logged!
Note: in the essbase.cfg file, set the SPLITARCHIVEFILE configuration to TRUE. This will split archive file to smaller size(<2 GB).
Note: Partition commands (for example, synchronization commands) are not logged and,
therefore, cannot be replayed. When recovering a database, you must replay logged
transactions and manually make the same partition changes in the correct chronological order.
When using partitioned databases or using the @XREF function in calculation scripts, you must selectively replay logged transactions in the correct chronological order between the source and target databases.
Note: for ASO Essbase,the only way is system file backup:
1 Stop the application.
2 Use the file system to copy the contents of the application directory (ARBORPATH/app/appname),excluding the temp directory
-----------------------------------------------------------------------------
Set Essbase in read only mode when backing up:
alter database begin archive
Set Essbase back to read/write after backing up:
alter database end archive
----------------------------------------------------------------------------
Use export command to export data file is also a simple option to keep text format data backup, level 0 data is ok
11/18/09
Essbase backup and Recovery
Note: Essbase Outline change will NOT be logged!
Note: in the essbase.cfg file, set the SPLITARCHIVEFILE configuration to TRUE. This will split archive file to smaller size(<2 GB).
MaxL Sample:
alter database Sample.Basic force archive to file '/Hyperion/samplebasic.arc';
query archive_file 'C:/Hyperion/samplebasic.arc' get overview;
alter database appname.dbname force restore from file BACKUP-FILE;
To enable transaction log backup, in the essbase.cfg file:
TRANSACTIONLOGDATALOADARCHIVE SERVER_CLIENT
query database Sample.Basic list transactions;
query database Sample.Basic list transactions after '11_20_2007:12:20:00' write to file '/Hyperion/products/Essbase/EssbaseServer/app/Sample/Basic/listoutput.csv';
alter database Sample.Basic replay transactions using sequence_id_range 2 to 2;
Note: when reply with transaction,please notice the log type.
You should clear the log file and the replay file from time to time.
/Hyperion/trlog/Sample/Basic
ARBORPATH/app/appname/dbname/Replay
-------------------------------------------------------------------------------
BSO Essbase: automated Essbase backup and restore is preferred
ASO Essbase: manual backup and restore is the only choice
Full backup and transaction log backup, after restoring from a full backed-up, you can replay the logged transactions that took place after the backup operation. However, outline changes are not logged and, therefore, cannot be replayed. Therefore, everytime there is an outline change, you must make an backup to avoid having the outline out of sync.
In backing up a database, Essbase performs the following tasks:
1. Places the database in read-only mode, protecting the database from updates during the archive process while allowing requests to query the database.
2. Writes a copy of the database files to an archive file that resides on the Essbase Server computer. The files include:
essxxxxx.pag -- Essbase data files
essxxxxx.ind -- Essbase index files
dbname.esm -- Essbase Kernel file
dbname.tct -- Transaction control table
dbname.ind -- Free fragment file
dbname.otl -- Outline file
dbname.otl.keep -- Temporary backup of dbname.otl
essx.lro -- Linked reporting objects
dbname.otn -- Temporary outline file
dbname.db -- Database file containing database settings
dbname.ddb -- Partition definition file
dbname.ocl -- Outline change log created during incremental dimension build.
essxxxx.chg -- Outline synchronization change log
dbname.alg -- Spreadsheet update log that stores spreadsheet update transactions
dbname.atx -- Spreadsheet update log that contains historical transaction information
essbase.sec* -- Essbase security file
essbase.bak -- Backup of the Essbase security file
essbase.cfg -- Essbase Server configuration file
dbname.app -- Application file containing application settings
.otl,.csc,.rul,.rep,.eqd,.sel
ESSCMD or MaxL scripts
3. Returns the database to read-write mode
-----------------------------------------------------------------------
Note: in the essbase.cfg file, set the SPLITARCHIVEFILE configuration to TRUE. This will split archive file to smaller size(<2 GB).
MaxL Sample:
alter database Sample.Basic force archive to file '/Hyperion/samplebasic.arc';
query archive_file 'C:/Hyperion/samplebasic.arc' get overview;
alter database appname.dbname force restore from file BACKUP-FILE;
To enable transaction log backup, in the essbase.cfg file:
TRANSACTIONLOGDATALOADARCHIVE SERVER_CLIENT
query database Sample.Basic list transactions;
query database Sample.Basic list transactions after '11_20_2007:12:20:00' write to file '/Hyperion/products/Essbase/EssbaseServer/app/Sample/Basic/listoutput.csv';
alter database Sample.Basic replay transactions using sequence_id_range 2 to 2;
Note: when reply with transaction,please notice the log type.
You should clear the log file and the replay file from time to time.
/Hyperion/trlog/Sample/Basic
ARBORPATH/app/appname/dbname/Replay
-------------------------------------------------------------------------------
BSO Essbase: automated Essbase backup and restore is preferred
ASO Essbase: manual backup and restore is the only choice
Full backup and transaction log backup, after restoring from a full backed-up, you can replay the logged transactions that took place after the backup operation. However, outline changes are not logged and, therefore, cannot be replayed. Therefore, everytime there is an outline change, you must make an backup to avoid having the outline out of sync.
In backing up a database, Essbase performs the following tasks:
1. Places the database in read-only mode, protecting the database from updates during the archive process while allowing requests to query the database.
2. Writes a copy of the database files to an archive file that resides on the Essbase Server computer. The files include:
essxxxxx.pag -- Essbase data files
essxxxxx.ind -- Essbase index files
dbname.esm -- Essbase Kernel file
dbname.tct -- Transaction control table
dbname.ind -- Free fragment file
dbname.otl -- Outline file
dbname.otl.keep -- Temporary backup of dbname.otl
essx.lro -- Linked reporting objects
dbname.otn -- Temporary outline file
dbname.db -- Database file containing database settings
dbname.ddb -- Partition definition file
dbname.ocl -- Outline change log created during incremental dimension build.
essxxxx.chg -- Outline synchronization change log
dbname.alg -- Spreadsheet update log that stores spreadsheet update transactions
dbname.atx -- Spreadsheet update log that contains historical transaction information
essbase.sec* -- Essbase security file
essbase.bak -- Backup of the Essbase security file
essbase.cfg -- Essbase Server configuration file
dbname.app -- Application file containing application settings
.otl,.csc,.rul,.rep,.eqd,.sel
ESSCMD or MaxL scripts
3. Returns the database to read-write mode
-----------------------------------------------------------------------
11/17/09
Cold backup - LDAP & Shared Service
1 Stop OpenLDAP and Shared Services.
2 Back up the Shared Services directory from the file system.Shared Services files are in HYPERION_HOME/deployments and HYPERION_HOME/products/Foundation.
3 Optional:
* Windows—Back up these Windows registry entries using REGEDIT and export:
HKLM/SOFTWARE/OPENLDAP
HKLM/SOFTWARE/Hyperion Solutions
* UNIX—Back up these items:
.hyperion.* files in the home directory of the user name used for configuring the
product user profile (.profile or equivalent) file for the user name used for configuring the product
4 Shut down the Shared Services relational database and perform a cold backup using RDBMS tools.
To recover Shared Services from a cold backup:
1 Restore the OS.
2 Using Oracle Hyperion Enterprise Performance Management System Installer, Fusion Edition, install Shared Services binaries. Note: Do not configure the installation.
OpenLDAP Services is created during installation.
3 Restore the Shared Services cold backup directory from the file system.
4 Restore the cold backup of the Shared Services relational database using database tools.
5 Optional: Restore the Windows registry entries from the cold backup.
6 (Windows) If Shared Services Web application service must be recreated, run HYPERION_HOME/deployments/AppServer/bin/installServiceSharedServices9.bat.
7 Start the OpenLDAP service and Oracle's Hyperion Shared Services.
2 Back up the Shared Services directory from the file system.Shared Services files are in HYPERION_HOME/deployments and HYPERION_HOME/products/Foundation.
3 Optional:
* Windows—Back up these Windows registry entries using REGEDIT and export:
HKLM/SOFTWARE/OPENLDAP
HKLM/SOFTWARE/Hyperion Solutions
* UNIX—Back up these items:
.hyperion.* files in the home directory of the user name used for configuring the
product user profile (.profile or equivalent) file for the user name used for configuring the product
4 Shut down the Shared Services relational database and perform a cold backup using RDBMS tools.
To recover Shared Services from a cold backup:
1 Restore the OS.
2 Using Oracle Hyperion Enterprise Performance Management System Installer, Fusion Edition, install Shared Services binaries. Note: Do not configure the installation.
OpenLDAP Services is created during installation.
3 Restore the Shared Services cold backup directory from the file system.
4 Restore the cold backup of the Shared Services relational database using database tools.
5 Optional: Restore the Windows registry entries from the cold backup.
6 (Windows) If Shared Services Web application service must be recreated, run HYPERION_HOME/deployments/AppServer/bin/installServiceSharedServices9.bat.
7 Start the OpenLDAP service and Oracle's Hyperion Shared Services.
11/16/09
Hot backup - LDAP & Shared Service
Steps:
1 Back up any related components, including Shared Services relational database and the OpenLDAP database. Note: The Shared Services relational database and the OpenLDAP database must be backed up at the same time. Ensure that the administrator does not register a product application or create an application group at backup time.
2. Run this command to create a hot backup of OpenLDAP:
Windows:
c:/Hyperion/products/Foundation/server/scripts/backup.bat HSS_backup
UNIX:
/home/username/Hyperion/products/Foundation/server/scripts/backup.sh /home/username/backups/HSS_backup
To recover Shared Services from a hot backup:
1 Stop OpenLDAP and Shared Services.
2 Recover the Shared Services relational database with RDBMS tools, using the backup with the same date as the OpenLDAP backup.
3 If you use OpenLDAP as Native Directory, recover the OpenLDAP database by running: Examples:
Windows noncatastrophic recovery—C:/Hyperion/products/Foundation/server/scripts/recover.bat c:/HSS_backup
UNIX catastrophic recovery—/home/username/Hyperion/products/Foundation/server/scripts/recover.sh /home/username/HSS_backup catRecovery
----------------------------------
Note: Physical backup and logical backup. A physical backup can be hot or cold:
*. Hot backup—Users can make changes to the database during a hot backup. Log files of changes made during the backup are saved, and the logged changes are applied to synchronize the database and the backup copy. A hot backup is used when a full backup is needed and the service level does not allow system downtime for a cold backup.
*. Cold backup—Users cannot make changes to the database during a cold backup, so the database and the backup copy are always synchronized. Cold backup is used only when the service level allows for the required system downtime.
Note: A cold full physical backup is recommended.
* Full—Creates a copy of data that can include parts of a database such as the control file,transaction files (redo logs), archive files, and data files. This backup type protects data from application error and safeguards against unexpected loss by providing a way to restore original data. Perform this backup weekly, or biweekly, depending on how often your data changes. Making full backups cold, so that users cannot make changes during the backups, is recommended.
Note: The database must be in archive log mode for a full physical backup.
* Incremental—Captures only changes made after the last full physical backup. The files differ for databases, but the principle is that only transaction log files created since the last backup are archived. Incremental backup can be done hot, while the database is in use, but it slows database performance.
In addition to backups, consider the use of clustering or log shipping to secure database content.
Logical Backup
A logical backup copies data, but not physical files, from one location to another. A logical backup is used for moving or archiving a database, tables, or schemas and for verifying the structures in a database.
1 Back up any related components, including Shared Services relational database and the OpenLDAP database. Note: The Shared Services relational database and the OpenLDAP database must be backed up at the same time. Ensure that the administrator does not register a product application or create an application group at backup time.
2. Run this command to create a hot backup of OpenLDAP:
Windows:
c:/Hyperion/products/Foundation/server/scripts/backup.bat HSS_backup
UNIX:
/home/username/Hyperion/products/Foundation/server/scripts/backup.sh /home/username/backups/HSS_backup
To recover Shared Services from a hot backup:
1 Stop OpenLDAP and Shared Services.
2 Recover the Shared Services relational database with RDBMS tools, using the backup with the same date as the OpenLDAP backup.
3 If you use OpenLDAP as Native Directory, recover the OpenLDAP database by running: Examples:
Windows noncatastrophic recovery—C:/Hyperion/products/Foundation/server/scripts/recover.bat c:/HSS_backup
UNIX catastrophic recovery—/home/username/Hyperion/products/Foundation/server/scripts/recover.sh /home/username/HSS_backup catRecovery
----------------------------------
Note: Physical backup and logical backup. A physical backup can be hot or cold:
*. Hot backup—Users can make changes to the database during a hot backup. Log files of changes made during the backup are saved, and the logged changes are applied to synchronize the database and the backup copy. A hot backup is used when a full backup is needed and the service level does not allow system downtime for a cold backup.
*. Cold backup—Users cannot make changes to the database during a cold backup, so the database and the backup copy are always synchronized. Cold backup is used only when the service level allows for the required system downtime.
Note: A cold full physical backup is recommended.
* Full—Creates a copy of data that can include parts of a database such as the control file,transaction files (redo logs), archive files, and data files. This backup type protects data from application error and safeguards against unexpected loss by providing a way to restore original data. Perform this backup weekly, or biweekly, depending on how often your data changes. Making full backups cold, so that users cannot make changes during the backups, is recommended.
Note: The database must be in archive log mode for a full physical backup.
* Incremental—Captures only changes made after the last full physical backup. The files differ for databases, but the principle is that only transaction log files created since the last backup are archived. Incremental backup can be done hot, while the database is in use, but it slows database performance.
In addition to backups, consider the use of clustering or log shipping to secure database content.
Logical Backup
A logical backup copies data, but not physical files, from one location to another. A logical backup is used for moving or archiving a database, tables, or schemas and for verifying the structures in a database.
Subscribe to:
Posts (Atom)
