Skip Ribbon Commands
Skip to main content
Welcome to the SharePoint Foxhole > SPFoxhole Blog > Posts > New In SP2 Changes in Backup Operations
New In SP2 Changes in Backup Operations

New additions that come with Service Pack 2 for SharePoint (WSS and MOSS) is a new function built into the stsadm.exe –o backup tool that allows you to set your databases to read only.  If you run this command on a working environment there will always be a chance for the job to fail if users are adding content to the sites.  To prevent this we now have a new feature that allows us to lock the DB and make it read only.

 Shot5

I want you to notice in the above screenshot that im running a very basic command that is no different than you have normally done.  Nothing additional was added to the command but notice the output.  By default now when you run stsadm.exe –o backup your sites that are being backed up are set to read-only.  Once the operation completes it will return the state to normal.

Lets dive a bit deeper and see how you can leverage the additional commands related to backups

shot6

Lets first go over some of the command run above.  In the second command I want to evaluate the site I want to back up to see its status (locked or unlocked)   Running the command

stsadm.exe –o getsitelock –url http//blahblahblah   returns a value of none…. not alot to get excited about yet.

In the third command I want to see my available options

stsadm.exe –o setsitelock –url (url) –lock | –noadditions |-readonly | –noaccess

  • None: Sets the site collection to unlock.

  • Noadditions: Permits changes that reduce the size of the data.

    For example, if you had an announcement list item whose body consisted of 50 characters, you could successfully edit the list item so that the body was reduced to 25 characters. However, if you tried to edit the list item so that they body was increased to 100 characters, that would be blocked.

  • Readonly: Sets the site collection to read-only.

  • Noaccess: Sets the site collection unavailable to all users.

* Above explanations of parameters copied from Technet  http://technet.microsoft.com/en-us/library/cc262811.aspx

In the forth command im simply setting the collection im backing up to read-only and running the 5th command shows the status.

So say you dont want to be bothered with this and you are going to be backing up your system during off hours.  Well as you have to make it known to the backup operation.   Refer to the first screenshot. Remember by default with nothing added it will set it to read-only.   I want to just toss caution to the wind and remove the site lock altogether.

site7

Notice in the above command i added the –nositelock tag at the end of my command.  Run this at your own risk leaving the site open to write backs.    

Cool stuff.  Enjoy

Technorati Tags: ,,,

Comments

There are no comments yet for this post.

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Your Name *


E-Mail


Comment *


Todays Date *

Select a date from the calendar.

Attachments