Comment 3 for bug 362001

Revision history for this message
Jon Tai (jontai) wrote :

Here's an example of "disaster recovery":

[jon@avgtmint02 ~]$ sudo ovinstanceadd test
[jon@avgtmint02 ~]$ openvista test

TEST>S ^JON=""

TEST>S ^JON(0)="This should be in the backup"

TEST>h
[jon@avgtmint02 ~]$ ovbackup -q test
[jon@avgtmint02 ~]$ openvista test

TEST>S ^JON(1)="This should only be in the journals"

TEST>h
[jon@avgtmint02 ~]$ sudo rm /opt/openvista/test/globals/default.dat
[jon@avgtmint02 ~]$ openvista test

TEST>ZWR ^JON
%GTM-E-DBFILERR, Error with database file /opt/openvista/test/globals/default.dat
%SYSTEM-E-ENO2, No such file or directory

TEST>h
[jon@avgtmint02 ~]$ sudo ovrestore -j test /opt/openvista/test/backups/test-20090416-220704.tar.bz2
Routines and database files in 'test' will be OVERWRITTEN with
the versions in '/opt/openvista/test/backups/test-20090416-220704.tar.bz2'

Are you sure you want to restore this backup to 'test' (yes/no)? yes

Apr 16 22:07:57 - Starting restore of /opt/openvista/test/backups/test-20090416-220704.tar.bz2 to test
Apr 16 22:07:57 - Extracting contents of backup file
Apr 16 22:07:57 - Attempting to acquire exclusive access to database
Apr 16 22:07:57 - Restoring routines
Apr 16 22:07:57 - Restoring database files
Apr 16 22:07:57 - Applying journal entries
Apr 16 22:07:57 - Enabling journaling on new database
Apr 16 22:07:57 - Finished restoring /opt/openvista/test/backups/test-20090416-220704.tar.bz2 to test
[jon@avgtmint02 ~]$ openvista test

TEST>ZWR ^JON
^JON=""
^JON(0)="This should be in the backup"
^JON(1)="This should only be in the journals"

TEST>h