Page 1 of 1

Backup includes stuff from another database

Posted: Wed Dec 20, 2017 2:54 pm
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

Re: Backup includes stuff from another database

Posted: Thu Dec 21, 2017 3:28 pm
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.

Re: Backup includes stuff from another database

Posted: Sun Dec 31, 2017 5:37 pm
by HughDarwen
Thanks, Dave. I've done what you suggested.

Hugh

Re: Backup includes stuff from another database

Posted: Sun Dec 31, 2017 5:52 pm
by Dave
I've made a note in my "to do" list to provide encrypted backups, and encrypted logins to databases.