The issue:
Our company is creating their own backup restoration tool. The tool itself will be able to look into a backup file and pull out and restore a Document, Library or Site to a restoration location in the Central Administration Site Collection. How will that tool work? Don’t ask me, I’m no developer. However I’ve been assured it will be so cool and not leak memory, or bring down my SharePoint Farms! We’ll just see.
For this tool, I was asked to create a simple script to create a directory and push the Site Collection backups to a new directory based on date and time format. I figured I’d share it with you all, it’s pretty simple. Generally I’ve setup my backups to run a .bat file script which calls on a PowerShell script which does all the real work. The batch file is a simple one liner that says: ‘powershell –command <location><filename>.ps1’
The called PowerShell script is also pretty simple. You don’t need much head scratching for this trust me. We’ll step through it.
1 – Open the SharePoint Snapin
‘Add-PSSnapin Microsoft.SharePoint.PowerShell’
2 – Get the Date and Time to a variable
‘$DTS = Get-Date -format “yyy_MM_dd_hh-mm” ‘ - Here is a guide for date time formats. Stay away from something with special characters etc. You never know how that stuff behaves.
3 – Set the location of your backups to be used in the commands that you’ll make later.
‘$Location = “f:\backup\” ‘
4 – Make the call to actually perform the Site Collection Backups
This comes in two parts, making the new directory:
‘New-Item $location\Whale\$DTS\ -type directory’ – This is per site in your collection. I’m certain you can create an additional step to call Get-SPSIte and then for each site… etc. But that was beyond the scope of my mission.
And secondly running the backup:
‘backup-spsite -identity http://whale.<domain>.com -path $location\whale\$DTS\whale_<domain>_com.bak –force’
So essentially it all looks like this:
Add-PSSnapin Microsoft.SharePoint.PowerShell
$DTS = Get-Date -format “yyy_MM_dd_hh-mm”
$Location = “f:\backup\”
New-Item $location\Whale\$DTS\ -type directory
backup-spsite -identity http://whale.<domain>.com -path $location\whale\$DTS\whale_<domain>_com.bak -force
What you’ll end up with in your directory structure is something like this.
Using windows task manager on the server you can create a simple task to call the batch file at whatever interval you need, hourly, daily, weekly whatever gets your goat.
SharePoint 2010 is my new love at work. Unfortunately my company is not utilizing it fully quite yet. We will get there I’m certain, especially if I have anything to say about it. The first book I purchased for SharePoint 2010 was Professional SharePoint 2010 Administration by Todd Klindt, Shane Young and Steve Caravajal. The book really is a must read when it comes to SharePoint Administration. The most important part for me was the fact that it doesn’t read like a technical manual, but its completely packed with most of the information you need to run a SharePoint farm at your company.
I was actually impressed with the level of detail in the book since it was released days after SharePoint 2010 went RTM. I’m sure they have an inside scoop or something. I love the ‘format’ and conventions in the book. I actually like that in all the Wrox books I’ve become a big fan buying the SharePoint Branding book (THE best cover), Begining and Professional Developing, SharePoint Designer 2010 books and have read a good 80% of every one. You’d think I’d be an expert by now..
But alas, a book can show you just so much.
By far my copy of the Admin book has seen better days, Its been to the RedSox/Mariners game, a Thanksgiving with my in-laws, the water park and most of the bathrooms I visit. Go get your copy it really is my main resource for admin data.
Today I did some work with SharePoint for my company. It’s really a terrific product, and generally something that would benefit almost any organization. For the smaller company there is Microsoft SharePoint Foundation (MSF). Microsoft says…
“SharePoint Foundation 2010 provides a Web-based collaboration platform that’s more secure and easy to manage. With SharePoint Foundation, your people can quickly access the documents and information they need to make good decisions and get work done.”
Microsoft SharePoint Foundation Site
In many ways I think they are correct, but there is a slight reality check that needs to be made for the business need. Many small companies find it useful to have a Windows Server that affords all the many great things it does, but installing MSF just because you can might be the wrong way to go… for now! There are a number of questions one should be asking:
- What would my company gain using collaborative software?
- Am I expected to grow my business out of a simple ‘do it yourself’ installation of SharePoint Foundation?
- What is the real cost of SharePoint Foundation?
- What are my alternatives to something like SharePoint Foundation?
None of these answers are easy, and there are people who are paid a heck of a lot more than I am to help guide you through these decisions, but read on, get my perspective, then….. <Hire Me!>
MSF can and will make collaboration extremely easy, if you even use it. Look at your employees, are they the type to invest time and effort in learning a new product, something that is completely foreign to them, are they ‘early adopters’? MSF can help with search, regulatory issues, document tracking and version control, some extremely important things for many organizations. One of the best parts of SharePoint is process control, and workflow. In MSF your slightly limited in what you can do here but for a smaller organization you can get quite a bit from it.
Installing it alone can be daunting, and actually using it for its intended purpose can be an even steeper challenge. If MSF is something that you are considering, don’t make it optional! Functionally change the way you do day to day work. Having the old and comfortable ways of doing work to fall back on will win over a new slightly complex technology.
If you have ‘Free vouchers’ from Microsoft hire up a consultant, one of the big partners and have them come out and work on a 1-15 day Proof of Concept, or Pilot depending on the number of days you can get. If you only have 1-3 days, have them come out and evaluate your systems and provide a nice roadmap for the future. Then, call someone like me, someone who is experienced in the product and can build it out at a much cheaper cost.
Send someone to a training program!! Send whomever is going to manage this application to a quality training program about Administration, not branding, not InfoPath, not SharePoint designer, these are all good but the primary need is Administration. Managing MSF has some very specialized sets of skills There is definitely a hidden cost to adopting this software for your organization. It’s not an install and forget program. There are daily, weekly, and monthly needs in keeping MSF in tip-top shape. The feeding and caring for MSF can be a very big deal. Microsoft has some great planning tools to pencil this out before you leap. Checkout the Technet articles…
So, what else is out there? Heck there are a zillion collaboration tools on the web, but which one will work for your organization? Some are cloud based, some are installed locally. I cannot answer this question for you here, but leave me a note and I’ll be happy to give you some simple advice. Hit up Google for Collaborative Platforms and you’ll see just how cloudy the market is. There are some great free tools, but be wary, those tools NEVER come with support.
