Hi Ramon,
You can use the oncheck command or query the sysmaster: sysdbstab table to view the most recent restore of the current instance.
As Mark mentioned, it may be helpful to refer to the log files specified in onconfig's MSGPATH and BAR_ACT_LOG.
Below is the result of running it on my test server.
/work2/INFORMIX/1210FC13/skjeong]more /work2/INFORMIX/1210FC13/ol_informix1210_3.log
...
Tue Dec 24 01:01:20 2019
...
17:05:41 Level 0 Archive started on rootdbs, plog, llog, datadbs1, datadbs2, datadbs3, data8dbs1, data8dbs2, data8dbs3, dbs1, sbspace1
17:05:54 Archive on rootdbs, plog, llog, datadbs1, datadbs2, datadbs3, data8dbs1, data8dbs2, data8dbs3, dbs1, sbspace1 Completed.
17:06:24 Checkpoint Completed: duration was 0 seconds.
17:06:24 Tue Dec 24 - loguniq 900, logpos 0x183018, timestamp: 0x18066cc Interval: 250
...
Sat Feb 29 13:11:29 2020
...
13:11:38 Physical Restore of rootdbs, plog, llog, datadbs1, datadbs2, datadbs3, data8dbs1, data8dbs2, data8dbs3, dbs1, sbspace1 started.
...
13:12:17 Physical Restore of rootdbs, plog, llog, datadbs1, datadbs2, datadbs3, data8dbs1, data8dbs2, data8dbs3, dbs1, sbspace1 Completed.
/work2/INFORMIX/1210FC13/skjeong]oncheck -pr | egrep 'name|restore'
DBspace name rootdbs
Time of last physical restore 12/24/2019 17:05:40
DBspace name plog
Time of last physical restore 12/24/2019 17:05:40
DBspace name llog
Time of last physical restore 12/24/2019 17:05:40
DBspace name datadbs1
Time of last physical restore 12/24/2019 17:05:40
DBspace name datadbs2
Time of last physical restore 12/24/2019 17:05:40
DBspace name datadbs3
Time of last physical restore 12/24/2019 17:05:40
DBspace name data8dbs1
Time of last physical restore 12/24/2019 17:05:40
DBspace name data8dbs2
Time of last physical restore 12/24/2019 17:05:40
DBspace name data8dbs3
Time of last physical restore 12/24/2019 17:05:40
DBspace name tmpdbspace
DBspace name sbspace1
Time of last physical restore 12/24/2019 17:05:40
DBspace name tmpsbspace
DBspace name dbs1
Time of last physical restore 12/24/2019 17:05:40
DBspace name blobdbs1
/work2/INFORMIX/1210FC13/skjeong]echo "select name[1,12], dbinfo('utc_to_datetime',rest_time) last_rest_time,logid from sysdbstab where rest_time <> 0" | dbaccess sysmaster
Database selected.
name last_rest_time logid
rootdbs 2019-12-24 17:05:40 900
plog 2019-12-24 17:05:40 900
llog 2019-12-24 17:05:40 900
datadbs1 2019-12-24 17:05:40 900
datadbs2 2019-12-24 17:05:40 900
datadbs3 2019-12-24 17:05:40 900
data8dbs1 2019-12-24 17:05:40 900
data8dbs2 2019-12-24 17:05:40 900
data8dbs3 2019-12-24 17:05:40 900
sbspace1 2019-12-24 17:05:40 900
dbs1 2019-12-24 17:05:40 900
11 row(s) retrieved.
Database closed.
------------------------------
SangGyu Jeong
Software Engineer
Infrasoft
Seoul Korea, Republic of
------------------------------
Original Message:
Sent: Thu February 27, 2020 01:48 PM
From: Ramon Rey
Subject: Can we track instance ontape (or for that matter onbar too) restores?
Greetings and salutations...
I got these instances that need to be restored every night for regression testing, which got me thinking...
Is there a way to check if the instance has been restored from backup? and if it did, when?
I can't remember ever seen that info or if it is even possible. Looking around Google I've found that MS SQLServer does track restores.
Thanks in advance!
Cheers!
Ramon
#Informix