Operating System - OpenVMS
1753969 Members
7515 Online
108811 Solutions
New Discussion юеВ

Re: Recover CMS deleted history

 
Peter Barkas
Regular Advisor

Recover CMS deleted history

Is there a way to restore history from the HISTORY.DMP file created using the CMS DELETE HISTORY command?
12 REPLIES 12

Re: Recover CMS deleted history

Not that I know. (That does not state, that it is impossible !)

But the CMS history is stored in 01CMS.HIS.
Maybe you can retrieve this file fom a backup ?

Martin
Peter Barkas
Regular Advisor

Re: Recover CMS deleted history

Thank you for the response.

Unfortunately, 'go back to backup' is not an option because changes have been made to the CMS library since the history was deleted.

Re: Recover CMS deleted history

The 01CMS.HIS seems to be a normal non indexed sequential file. Maybe you can simply add the deleted lines using an editor or script i.e. from the backup

Just an idea...

Martin
Peter Barkas
Regular Advisor

Re: Recover CMS deleted history

Thank you for the response.

Interesting idea. If I can work out how to set up a meaningful test environment I will try that.

Re: Recover CMS deleted history

To set up a testenvironment you only need some diskspace :-)

Copy everything under the directory ([CMS...]) to a new location. You can access this CMS using CMS SET LIBRARY specifying the new location.

Of course you must either correct / check fileownerships / protections or use some privileges. Don't think that this is an issue for an test.

To get a consistent snapshot access to the cms library should be suspended during the backup.

As an alternativ you can restore the last backup to a new location (Take care not to overwrite the original directory tree due to som backup command typing errors!). The backup should be constistent if ist is taken at an appropriate time of day/week.

Hope this helps. Let us now the result.

Martin
Peter Barkas
Regular Advisor

Re: Recover CMS deleted history

Thank you for the response.

As soon as I have time I will try this and report back.
Peter Barkas
Regular Advisor

Re: Recover CMS deleted history

I found a bit of time and hacked up a routine to recover the history.

I was going to write it in DCL but it was easier to do in DEC BASIC.

It's a merge of 01CMS.HIS and HISTORY.DMP in to a new version of 01CMS.HIS. Copy record 1 and drop record 2 from HIS, insert the DMP records and then append the rest of the HIS records.

The DMP records need a bit of manipulation to get them in to HIS format: drop the leading space, add centiseconds to the time, quote the object with DEL and drop the quotes round the comments.

Rename the file and job's done.
Peter Barkas
Regular Advisor

Re: Recover CMS deleted history

...and so to bed
KapilKapsi
Occasional Advisor

Re: Recover CMS deleted history

Hi Peter

In your last post you said: -

"The DMP records need a bit of manipulation to get them in to HIS format: drop the leading space, add centiseconds to the time, quote the object with DEL and drop the quotes round the comments."

Could you please clarify by what you meant by "quote the object with DEL"?

This is fairly urgent!!

Waiting for your reply.