Restoring lost routine

234 views
Skip to first unread message

Michoel Reach

unread,
Apr 16, 2013, 6:40:33 PM4/16/13
to intersystems...@googlegroups.com
A .int routine was deleted from Studio in a Cache' namespace, and journaling was not operating properly. Is there any way to get the routine back?
Thanks

Joel Solon

unread,
Apr 16, 2013, 6:53:05 PM4/16/13
to intersystems...@googlegroups.com
In studio Open dialog, try routinename.int;* to see if there are backups.

Regards,
Joel
«Sent from Blackberry»
--
--
Caché, Ensemble, DeepSee
 
---
You received this message because you are subscribed to the Google Groups "Caché, Ensemble, DeepSee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-publi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Michoel Reach

unread,
Apr 17, 2013, 9:06:17 AM4/17/13
to intersystems...@googlegroups.com
Thank you, that looks very helpful. How can I get metadata about these backups like when they were created, and where is the documentation on this?
Thanks.

Joel Solon

unread,
Apr 17, 2013, 2:41:24 PM4/17/13
to <intersystems-public-cache@googlegroups.com>
You can add

;*

to any search in Studio. And I just tried it in the Portal, and it shows a timestamp also.

It's been in the product for a looooonnnnnnnnnnnng time, but I don't think it's documented  I'll submit it.

- Joel

On Apr 17, 2013, at 9:06 AM, Michoel Reach <michoe...@gmail.com>
 wrote:

Thank you, that looks very helpful. How can I get metadata about these backups like when they were created, and where is the documentation on this?
Thanks.

Michoel Reach

unread,
Apr 17, 2013, 3:15:00 PM4/17/13
to intersystems...@googlegroups.com
Thanks again. But how were you able to get to the ;* files in the Portal? It didn't work for me in the Filter. (Home --> Routines)

By the way, where are the backups kept? I don't see them in ^ROUTINE.

Michael

Joel Solon

unread,
Apr 17, 2013, 3:24:50 PM4/17/13
to <intersystems-public-cache@googlegroups.com>
It may not work in older versions of the Portal. It was your question that made me look there, by the way! I just tried:

*.*;*

Also note that there were some versions of Studio/Cache (I can't remember which ones) in which the ;* feature didn't work. I was never sure why?

And the answer to the last question is: ^rBACKUP   (of course! why didn't you think to look there? ;-)

On Apr 17, 2013, at 3:15 PM, Michoel Reach <michoe...@gmail.com>
 wrote:

Thanks again. But how were you able to get to the ;* files in the Portal? It didn't work for me in the Filter. (Home --> Routines)

By the way, where are the backups kept? I don't see them in ^ROUTINE.

Michael

Michoel Reach

unread,
Apr 17, 2013, 3:29:10 PM4/17/13
to intersystems...@googlegroups.com
Ah - I see the global, and it has a timestamp there - so I don't need to worry about Portal!
Thanks!

Michoel Reach

unread,
Apr 17, 2013, 11:07:26 PM4/17/13
to intersystems...@googlegroups.com
So is there anything that can be done if those backups were overwritten as well?

Joel Solon

unread,
Apr 17, 2013, 11:10:36 PM4/17/13
to intersystems...@googlegroups.com
It just keeps 5 backups. 

Sent from BlackBerry PlayBook


From: "Michoel Reach" <michoe...@gmail.com>
To: "intersystems...@googlegroups.com" <intersystems...@googlegroups.com>
Sent: April 17, 2013 11:07 PM
Subject: Re: [Caché] Restoring lost routine

So is there anything that can be done if those backups were overwritten as well?

--

Tommy Martin

unread,
Apr 18, 2013, 7:55:55 AM4/18/13
to intersystems...@googlegroups.com
I think this may have mentioned but have you checked in ^ROUTINE?  Usually there are multiple iterations in it of a routine in it.  However, if someone intentionally deleted it, they may be gone too.  Also, have you searched for a .mac version on the disk either manually or via Studio?  Is there a possibility it may have also been saved under a scratch name? (I often make ZZ copies for testing and such) .  Lastly have you done a %RFIND and search for the name of the routine or perhaps some code you can remember?

Michoel Reach

unread,
Apr 18, 2013, 8:59:35 AM4/18/13
to intersystems...@googlegroups.com
Hi! I think you're mistaken about ^ROUTINE; I only see the latest copy there. The four or five earlier iterations are in ^rBACKUP, and it isn't there - unfortunately we loaded an earlier version and I messed with it in Studio before realizing that it was two months old. I must have ^S Saved more than four times.
^%RFIND is a neat idea, I didn't know about it. But it didn't find anything new. And these routines never had a .MAC version.
I guess I was wondering about something more extreme, like an Undelete facility to search the machine. Didn't know if that would work with a Cache' database, though.
Thanks,
Michael

lverhulst

unread,
Apr 18, 2013, 10:43:59 AM4/18/13
to intersystems...@googlegroups.com
Assuming you are backing up the CACHE.DAT files on a regular basis:
- Get a backup from before the routine was deleted.
- Copy the appropriate CACHE.DAT file into a new folder/directory on your system. Preferably a test system.
- Use the Cache System Admin tools to add this CACHE.DAT file as a new database on your system.
- Point Studio at the new database.
- Get your routine and save it to the correct database or export it or whatever.
- Use the Cache System Admin tools to remove this new database.

--Leane


--

OldMster

unread,
Apr 18, 2013, 11:10:55 AM4/18/13
to intersystems...@googlegroups.com
I don't believe ^ROUTINE keeps any backups.  ^rMAC can have backup copies of .MAC routines, but I've never seen them in ^ROUTINE for .INT's

Mark
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-public-cache+unsub...@googlegroups.com.

Michoel Reach

unread,
Apr 18, 2013, 11:13:06 AM4/18/13
to intersystems...@googlegroups.com
We do backup, every day. The backup was not working properly in this case - through an oversight, it was backing up a different machine than the one I was working on. As I mentioned, the most recent backup we seem to have is two months old.

Tommy Martin

unread,
Apr 19, 2013, 6:54:13 AM4/19/13
to intersystems...@googlegroups.com
Yes, I was mistaken about ^ROUTINE.  Thanks for the correction.  I don't know of anywhere else you may look.


On Thu, Apr 18, 2013 at 11:13 AM, Michoel Reach <michoe...@gmail.com> wrote:
We do backup, every day. The backup was not working properly in this case - through an oversight, it was backing up a different machine than the one I was working on. As I mentioned, the most recent backup we seem to have is two months old.

--
Reply all
Reply to author
Forward
0 new messages