Events Calendar

September 2010
M T W T F S S
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3

Select Language

Proof of concept (Sybase ASE) PDF Print E-mail
Written by repostor   
Tuesday, 22 December 2009 22:09

1) Create a script that load test data in a database.

--------- UNIX / Linux ---------

# vi insert.sh

#!/bin/ksh

printf "create database test on db=100 log on log=100\n\go\n"|isql -U sa -P ""

printf "create table test (tid timestamp)\n\go\n"|isql -U sa -P "" -D test


while [ 1 ]

do

printf "insert into test (tid) values (getdate());|isql -U sa -P "" -D test

sleep 1


done

 

2) Run the script in a command shell

--------- UNIX / Linux ---------

# chmod 777 insert.sh

# ./insert.sh 

3) Do a full backup

--------- UNIX / Linux ---------

# /opt/repostor/rdp4Sybase/bin/sybasebackup -u sa -s test

4) Do a incremental backup

--------- UNIX / Linux ---------

# /opt/repostor/rdp4Sybase/bin/sybasebackup -u sa -s test -l

6) Avbryt (terminate "insert.bat" / "insert.sh" script

7) Do a new incremental backup

--------- UNIX / Linux ---------

# /opt/repostor/rdp4Sybase/bin/sybasebackup -u sa -s test -l

8) Verify content in the "test" table, in the test database

printf "select * from test\n\go\n"|isql -U sa -P "" -D test

tid

2009-09-08 14:26:06
2009-09-08 14:26:07
2009-09-08 14:26:08
..
2009-11-25 19:11:26

9) Drop the test databasen

# printf "drop database test\ngo\n"|isql -U sa -P "" 

10) Create the test database

# printf "create database test on db=100 log on log=100 for load\ngo\n"|isql -U sa -P ""

11) Restore the test database from backup

Run kommandot:

--------- UNIX / Linux ---------

# /opt/repostor/rdp4Sybase/bin/sybaserestore -u sa -s test -v -l -t YYYY-MM-DD.HH:MM:SS

Where: YYYY-MM-DD.HH:MM:SS is any date / time from the list above

Eg;;

# sybaserestore -u sa -s test -v -l -t 2009-11-25.19:11:27

12) online database

# printf "online database test\ngo\n"|isql -U sa -P "" 

13) Verify content of the test table in the test database

# printf "select * from test\ngo\n"|isql -U sa -P "" -D test
 
Repostor : Your recovery expert