Expression Evaluation Time: ms / Round trip: ms
Restoring a deleted workspace / Archiving a workspace
24. Oct
by Jens Category:

The possibility of restoring a deleted site collection is a SharePoint feature that was introduced with Service Pack 1. This blog post describes in how far this is supported by MatchPoint workspaces and what mechanisms are used behind the scenes. Additionally, the MatchPoint "Archiving" feature can be used to make a workspace readonly.

Restoring a Deleted Workspace

With MatchPoint 3.1 the restore of deleted site-collection workspaces is supported (as long as the site collection has no sub-workspaces assigned). A MatchPoint workspace can either be deleted from the workspace itself using the "Delete" ribbon button on the workspace editor web part or from the provided SharePoint user interface (Central Administration as well as "Delete this Site" from the site settings menu).

The process is as follows:

Before the workspace web is deleted, an archiving document library is created on the workspace web (called "MatchPoint Workspace Archive") where the redirector item is copied to. After that, the item is removed from the workspace list. If there is a workspace tag assigned to that workspace, the workspace tag is marked as deleted.

The following screenshot shows a workspace data provider and the available workspace tags before and after the workspace was deleted:

Use the following SharePoint cmdlts for restoring the site collection:

  • Get-SPDeletedSite: Lists all deleted site collections.
  • Restore-SPDeletedSite: Restore the site collection.

After the site collection was restored, the deleted workspace is in ReadOnly mode (on the workspace object, there is a ReadOnly property which is now "true").

The "Restore" ribbon button is now available!

Click the Restore ribbon button and the workspace is editable again. The workspace redirector item is copied back to the workspace list and the workspace tag is no longer marked as deleted.

Archiving a Workspace

A workspace can be archived using MatchPoint API. "Archived" means that the workspace becomes "ReadOnly" and the redirector item is saved in the "MatchPoint Workspace Archive" library on the workspace web (same procedure as above).

using(new MPInstanceScope(new MPInstance(workspaceUrl)))
  using (Workspace ws = new Workspace(workspaceUrl))

The bool parameter on the "Archive()" method is used to determine whether the redirector item is removed or not from the workspace library. After calling Workspace.Archive(), no Workspace.Update() must be called!

Now the workspace is in the same state as it was after restoring a deleted site collection: it can be restored using the restore ribbon button.

06.12.2013 10:07
This is great, thank you!
Unfortunatley, the restore functionality seems not to be available after moving a workspace into a new content database (Move-SPSite). The redirector item is deleted and is not archived in the workspace (MP version 3.1.2 and 3.1.5). Providing this functionality might be a nice extension to this functionality.

What is the recommended way to move a worspace into a new content db and restore the redirector item that gets deleted?

1. Add a Ribbon Button to the workspace ribbon with the Archive funciontality. Then archive the workspace, move it into the new content database and then restore the workspace?

2. Export the redirector list item, move the workspace into the new db, import the list item back into the workspace list?


This blog is about technical and non-technical aspects of the product MatchPoint and other SharePoint topics.

If you would like to post an article or if you have an idea for a post, please contact us.

Matthias Weibel
09.04.2018 01:12
Link is updated and works now. | Goto Post
09.04.2018 12:21
Link doesn't work. Could anyone explain what does... | Goto Post
14.03.2018 02:05
Hi Markus
We I use the config for SiteCollectionSe... | Goto Post
Reto Jeger
04.10.2017 09:15
Hello Reiner,
Thanks for pointing out the missing ... | Goto Post
29.09.2017 09:56
Hi, I downloaded the ZIP-file for MatchPoint Versi... | Goto Post