Backup includes stuff from another database

This forum is to report technical problems with Rel.
Post Reply
HughDarwen
Posts: 124
Joined: Sat May 24, 2008 4:49 pm

Backup includes stuff from another database

Post by HughDarwen »

I'm assuming this is a bug, though it's not causing me any problem. It would be a security issue in a commercial database.

Backups I'm currently taking of a database I created about a month ago always include a huge entry for sys.rev.ScriptHistory, examination of which shows what appears to be an entire backup of one of my other databases, nested quite deep in a tuple (I think!).

Here are a few lines from that entry, in case it helps:

TUPLE {Name "scratchpad", text "/*** Rel Database Backup ***/\n\n// Created in Rel Version 1.0.12 Beta\n// Using DatabaseToScript version 0.3.5\n\nBEGIN TRANSACTION;\n\nANNOUNCE \'var SP\';\nVAR SP REAL RELATION {DR INTEGER, SPs INTEGER} KEY {DR};\nSP := RELATION {\n\tTUPLE {DR 0, SPs 0},\n\tTUPLE {DR 1, SPs 0},\n\tTUPLE {DR 2, SPs 0},\n\tTUPLE {DR 3, SPs 0},\n\tTUPLE {DR 4, SPs 0},\n\tTUPLE {DR 5, SPs 0},\n\tTUPLE {DR 6, SPs 0},\n\tTUPLE {DR 7, SPs 1},\n\tTUPLE {DR 8, SPs 2}\n}\n;\n\nANNOUNCE \'var Problemist\';\nVAR Problemist REAL RELATION {FirstName CHARACTER, LastName CHARACTER, MPs INTEGER, SPs INTEGER} KEY {FirstName, LastName};\nProblemist := RELATION {\n\tTUPLE {FirstName \"\", LastName \"\\\"Bedouin\\\"\", MPs 0, SPs 0},\n\tTUPLE {FirstName \"\", LastName \"Llhuii5614\", MPs 12, SPs 1},\n\t

VAR SP and VAR Problemist are from that other database, which has been in operation since 2011.

Hugh
Dave
Site Admin
Posts: 372
Joined: Sun Nov 27, 2005 7:19 pm

Re: Backup includes stuff from another database

Post by Dave »

The Rel text editor preserves edit history in the database, so that you can retrieve previous edits and "undo". It looks like you perhaps were in database A and loaded a backup from database B into the text editor, which is now preserved in that history.

You can safely DELETE sys.rev.ScriptHistory.
HughDarwen
Posts: 124
Joined: Sat May 24, 2008 4:49 pm

Re: Backup includes stuff from another database

Post by HughDarwen »

Thanks, Dave. I've done what you suggested.

Hugh
Dave
Site Admin
Posts: 372
Joined: Sun Nov 27, 2005 7:19 pm

Re: Backup includes stuff from another database

Post by Dave »

I've made a note in my "to do" list to provide encrypted backups, and encrypted logins to databases.
Post Reply