You are on page 1of 14

FPT INFORMATION SYSTEM CORPORATION

SUPPLY & INSTALLATION OF AN ENTERPRISE


RESOURCE PLANNING (ERP) AND ENTERPRISE ASSET
MANAGEMENT (EAM) SYSTEM FOR EGCB
(Contract No. 27.27.2666.104.02.002.16.F65 under IDA Credit No: 4508 BD)

Backup and Restore System Guide

Project code: EGCB


Document code: Backup and Restore system guide
Version : 1.0

Dhaka, February 2020

Backup and Restore System Guide Page 1/14


RECORD OF CHANGE

Changed
Version Date Changed Summary of Changes Change Reference
by
V1.0 10- February-20 TienPN Create new document

Backup and Restore System Guide Page 2/14


SIGNATURE PAGE

Prepared by: Pham Ngoc Tien Date


FIS Basis Member

Reviewed by: Vu Duc Son Date


FIS Project Manager

Approved by: Date


EGCB Project Director

Backup and Restore System Guide Page 3/14


TABLE OF CONTENTS

1. BACKUP CONFIGURATION IN SAP SYBASE.............................................................6


1.1. CREATE A FILE SYSTEM CONTAINING THE BACKUP DB.....................................................6
1.2. CONFIGURATION FOR BACKUP.............................................................................................6
1.3. CONFIGURATION FOR LOG-BACKUP.....................................................................................7
1.4. CONFIGURATION FOR MASTER-BACKUP..............................................................................7
1.5. CHECK CONFIGURATION TO BACKUP...................................................................................8
1.6. DUMP THE DATABASE............................................................................................................9
1.7. CHECK DAILY BACKUP........................................................................................................10
2. RESTORE SAP ASE DATABASE...................................................................................12
2.1. Prerequisites.................................................................................................................................12
2.2. Solutions........................................................................................................................................12

Backup and Restore System Guide Page 4/14


TERMINOLOGY AND DEFINITION

Terminology Definition Remark


DB Data Base
OS Operating system
DEV Development
QAS Quality Assurance
PRD Production
ERP Enterprise Resource Planning
V Version
FIS FPT Information System
EGCB Electricity Generation
Company of Bangladesh
<Add more, if needed>

1. BACKUP CONFIGURATION IN SAP SYBASE

1.1. Create files system containing the backup DB


- Step1: Login servers by root user via ssh tool.

Backup and Restore System Guide Page 5/14


- Step2: Create a file system containing the Backup DB command:
- Step3: Execute the command:
Login to server dev-erp 10.1.16.14
[root@dev-erp ~]# mkdir -p /backup/daily_backup_egcb/DEV/DEV_DB
[root@dev-erp ~]# mkdir -p /backup/daily_backup_egcb/DEV/DEV_LOG
[root@dev-erp ~]# mkdir -p /backup/daily_backup_egcb/DEV/MASTER_DB
[root@dev-erp ~]# chmod -R 777 /backup/daily_backup_egcb/DEV/DEV_DB
[root@dev-erp ~]# chown -R sybdev:sapsys /backup/daily_backup_egcb/DEV/DEV_DB
[root@dev-erp ~]# chmod -R 777 /backup/daily_backup_egcb/DEV/DEV_LOG
[root@dev-erp ~]# chown -R sybdev:sapsys /backup/daily_backup_egcb/DEV/DEV_LOG
[root@dev-erp ~]# chmod -R 777 /backup/daily_backup_egcb/DEV/MASTER_DB
[root@dev-erp ~]# chown -R sybdev:sapsys
/backup/daily_backup_egcb/DEV/MASTER_DB

1.2. Configuration for backup


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Configuration for backup:
- Step4: Execute the command:
Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - sybdev


[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> use master
2> go
1> sp_config_dump @config_name='DEVDB',
2> @stripe_dir='/backup/daily_backup_egcb/DEV/DEV_DB',

Backup and Restore System Guide Page 6/14


3> @compression='101',
4> @verify='header'
5> go

1.3. Configuration for log-backup


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Configuration for log-backup:
- Step4: Execute the command:
Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - sybdev


[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> use master
2> go
1> sp_config_dump @config_name='DEVLOG',
2> @stripe_dir='/backup/daily_backup_egcb/DEV/DEV_LOG',
3> @compression='101',
4> @verify='header'
5> go

1.4. Configuration for master-backup


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Configuration for master-backup:
- Step4: Execute the command:
Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - sybdev


Backup and Restore System Guide Page 7/14
[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> use master
2> go
1> sp_config_dump @config_name='MASDB',
2> @stripe_dir='/backup/daily_backup_egcb/DEV/MASTER_DB',
3> @compression='101',
4> @verify='header'
5> go

1.5. Check configuration to backup


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Check configuration to backup:
- Step4: Execute the command:
Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - sybdev


[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> sp_config_dump
2> go
dumpconfig
----------------------------------------
DEVDB
DEVLOG
MASDB

Backup and Restore System Guide Page 8/14


(1 row affected)
(return status = 0)

Figure 1. The system results in normal operation

1.6. Dump the database


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Dump the database:
- Step4: Execute the command:
Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - sybdev


[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> use master

2> go

1> dump database DEV using config = 'DEVDB'

Backup and Restore System Guide Page 9/14


2> go

1> use master

2> go

1> dump transaction DEV using config = 'DEVLOG'

2> go

1> use master

2> go

1> dump database master using config = 'MASDB'

2> go

1.7. Check daily backup


- Step1: Login servers by root user via ssh tool.
- Step2: Check log daily backup
- Step3: Check file daily backup
- Step4: Execute the command
Login to server dev-erp 10.1.16.14
[root@dev-erp ~]# cd /backup/daily_backup_egcb/LOG_BACKUP

Figure 2. Log daily backup

Backup and Restore System Guide Page 10/14


[root@dev-erp LOG_BACKUP]# vi log_DEV_backup100220_152501.log

Figure 2. Log daily backup completed

[root@dev-erp DEV_DB]# cd /backup/daily_backup_egcb/DEV/DEV_DB

Figure 3. File daily backup

Above is the list of daily backup information.

Backup and Restore System Guide Page 11/14


2. RESTORE SAP ASE DATABASE
2.1. Prerequisites
- Login access of sybsid user
- Login access of sapsa or sa user.
- Should have proper compress Database dump.
- SAP instance should be stop when executing load database.

2.2. Solutions
2.2.1. Stop sap instance
- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Execute the command stopsap R3

Stopsap the Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - devadm


dev-erp:devadm 10> stopsap R3

2.2.2. Log in to ASE with isql as user 'sapsa' and execute the command:
- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Execute the command:
- Login to server dev-erp 10.1.16.14
[root@dev-erp ~]# su - sybdev
[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> use master
2> go

Backup and Restore System Guide Page 12/14


1> load database DEV from
'/backup/daily_backup_egcb/DEV/DEV_DB/DEV.DB.20200210.152503.000 '
2> go
Successfully 100% execution

2.2.3. After successfully load database now need to database online


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Execute the command:
Login to server dev-erp 10.1.16.14
[root@dev-erp ~]# su - sybdev
[sybdev@dev-erp ~]$ cd /sybase/DEV/
[sybdev@dev-erp ~]$ source SYBASE.csh
[sybdev@dev-erp ~]$ isql -Usapsa -SDEV -X -PAbc12345
1> use master

2> go

1> online database DEV

2> go

Successfully Restore an SAP Adaptive Server Enterprise (ASE) database instance on


Linux

2.2.4. Start sap instance


- Step1: Login servers by root user via ssh tool.
- Step2: Switch to the administrator user by SU command:
- Step3: Execute the command startsap R3

Stopsap the Login to server dev-erp 10.1.16.14

[root@dev-erp ~]# su - devadm


Backup and Restore System Guide Page 13/14
dev-erp:devadm 10> startsap R3

2.2.5. Check the start status


- Command ps -ef | grep dw :

Server dev-erp 10.1.16.14

Figure 4. The system results in normal operation

Backup and Restore System Guide Page 14/14

You might also like