I have created a new SharePoint 2007 MOSS Intranet. Our admin people are purchasing backup/restore software and I will eventually have to verify a restore of the farm backup they create. Has anyone got some suggestions on a best practice for this? Ours is a small 2-server farm built with VMWare VMs on SAN. How will I know that the restored version is a duplicate of the original in every way and what should I look out for?
R – Verify SharePoint Restore
backrestoresharepoint
Related Solutions
You can try to use sed in order to extract only the table you want.
Let say the name of your table is mytable
and the file mysql.dump
is the file containing your huge dump:
$ sed -n -e '/CREATE TABLE.*`mytable`/,/Table structure for table/p' mysql.dump > mytable.dump
This will copy in the file mytable.dump
what is located between CREATE TABLE mytable
and the next CREATE TABLE
corresponding to the next table.
You can then adjust the file mytable.dump
which contains the structure of the table mytable
, and the data (a list of INSERT
).
Ive implemented url redirecting with MOSS using the HTTP module route. I documented the code I used and what parameters worked the best for me here;
http://scaredpanda.com/2008/08/url-rewriting-with-sharepoint-moss-2007/
Take a look and let me know if this helps you and if you have any questions.
Update: The link above is no longer valid, so here text from the page that I used for URL redirect.
After messing around for a little bit it, I came up with a good way to do it. When I was looking for examples on the web there were a lot of people saying that it couldnt be done. But in the end it actually didn’t take much to implement it. Here’s an HttpModule that I wrote to do the work.
The key pieces are the this.app.BeginRequest += new EventHandler(app_BeginRequest) which steps in front of the request and allows the module to get its redirect on.
And HttpContext.Current.RewritePath(redirect, false); will push the necessary headers n such forward so that the receiving .aspx page will understand how to correctly post back.
using System;
using System.Data;
using System.Data.SqlClient;
using System.Reflection;
using System.Collections;
using System.Text;
using System.Web;
using System.Web.Caching;
using System.Web.SessionState;
using System.Security.Cryptography;
using System.Configuration;
using System.Threading;
using System.IO;
using System.Security;
using System.Security.Principal;
namespace ScaredPanda
{
public sealed class RewriteHttpModule : IHttpModule
{
HttpApplication app = null;
///
/// Initializes the httpmodule
///
public void Init(HttpApplication httpapp)
{
this.app = httpapp;
this.app.BeginRequest += new EventHandler(app_BeginRequest);
}
public void app_BeginRequest(Object s, EventArgs e)
{
try
{
//determine if the income request is a url that we wish to rewrite.
//in this case we are looking for an extension-less request
string url = HttpContext.Current.Request.RawUrl.Trim();
if (url != string.Empty
&& url != "/"
&& !url.EndsWith("/pages")
&& !url.Contains(".aspx")
&& url.IndexOf("/", 1) == -1)
{
//this will build out the the new url that the user is redirected
//to ie pandas.aspx?pandaID=123
string redirect = ReturnRedirectUrl(url.Replace("/", ""));
//if you do a HttpContext.Current.RewritePath without the 'false' parameter,
//the receiving sharepoint page will not handle post backs correctly
//this is extremely useful in situations where users/admins will be doing a
//'site actions' event
HttpContext.Current.RewritePath(redirect, false);
}
}
catch (Exception ex)
{
//rubbish
}
}
}
}
Best Answer
In answer to the remarks:
There's no checklist. The problem is the dynamic nature of SharePoint. Team Sites come and go, as do documents and libraries. Who's to say one of your users didn't delete a document library and then you think after a restore something is missing.
I think the best bet would be to require your users to do a quick scan after a restore, see if they miss anything major, like sites or libraries that are supposed to be there. You yourself could have a "homemade" checklist that you follow to check if all major features deployed by you (features, timerjobs etc.) are still there.