• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1379
  • Last Modified:

How to remove Deletion Stubs from a database ?

Hi everyone,

I have a might big problem. I have a database that had a ton of document deleted from it. I can restore thoses documents (I know which one were deleted) from a tape backup copy of the database.

Problem is, after copying the documents from my backup copy to the live copy, the first time it replicate : all the documents are deleted again ...

The answer is pretty simple : it's because the deletion stubs have been copied over to the other replicas ...

Is there a way to remove the stubs from the replicas ? I cannot aford to change the Document Unique IDs simply because there is another database that uses doc-links to that database. I cannot afford either to "flush" the other replicas and create a fresh replica over because the database size is over 700 megs.

Thanks for any help you can provide ;-)

Mchampou
0
mchampou
Asked:
mchampou
  • 4
  • 2
1 Solution
 
pentapodCommented:
We had this problem - BIG problem - when an automated agent accidentally deleted about 200 names from our Public Address Book!  (Of course, all the important executives.)  Here's what we did - and the beauty of it is that you don't need to replicate anything with the live database - totally safe (well, as near totally as possible if you're careful).

1. restore replica of database from backup onto some location where it can't possibly replicate with the live database - I'll call this REPLICA A
2. create replica of the live database with deletions - I'll call this REPLICA B
3. purge deletion stubs from REPLICA B.  (How to do this, see below.)
4. now delete everything from REPLICA B - all documents, everything.
5. REPLICA B now contains only deletion stubs, for all documents EXCEPT the ones that REPLICA A is missing (because you already purged the deletion stubs for those).
6. Replicate REPLICA B with REPLICA A.
7. Now, because of the deletion stubs in step 5, REPLICA A will only be left with the documents that were missing from the live database.
8. These documents can be cut and pasted back to the original live database.  (If you want to live dangerously you could purge the replication stubs again and replicate REPLICA A with the live database, but just in case something goes wrong... I'd recommend cut&paste so there's no risk.)

Ta da!

How to purge deletion stubs - you'd best consult your reference books to double check, I didn't do this step myself, but I understand that when the Purge Interval is set to 0, the purge is immediate.  This is set in the SpaceSaver's section of the database's Replication Settings dialog box.  The line "remove documents not modified in the last..." serves a dual purpose.  When the box is checked, documents are removed and the Purge Interval is one third of the number in the box.  When the box is not checked, documents are not removed but the purge interval is still one third of the number specified.

I am not sure once you change the purge interval if that's all, or if you need to UPDALL or COMPACT the database first - but this is easy to test.

This worked on our Public Address Book which is 100 Mb - I hope it's workable for your 700 Mb database because if not I can't think of any other solution!

Hope this helps you,

....Pentapod
0
 
pentapodCommented:
Ah - I just re-reread your question and realised I thought you were asking a slightly different question.  However I hope the Purge Interval settings I mentioned might solve your problem?

....Pentapod
0
 
mchampouAuthor Commented:
No you are right on the money, you understood my need.

I will need to test this before I can give you the points. Is that ok with you ?

mchampou
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
pentapodCommented:
Sure thing!  Good luck!!

....Pentapod
0
 
mchampouAuthor Commented:
Thanks for your help, your answer helped me fix our problem.

Sincere thanks !

mchampou
0
 
pentapodCommented:
My pleasure!  Glad our pain and panic could be of help to you!  Just gives ya warm fuzzies thinking about it.

....Pentapod
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now