I’ve read some articles of how to backup/restore Sharepoint application. Of course you can use stsadm -o backup&restore to do the job but you can also backup/restore content database from sql server directly. Even this is not recommended by some Sharepoint guru but I believeit is good to know and it might work in your scenario (for example, move production/staging/QA envirnment to your dev envirnment). Ok, here are the steps.
- Backup your sharepoint content database from sql server
- Go to Sharepoint Centre Admin->Application Management->Content databases. Locate your sharepoint application and remove the content database. This will basically break the link between your sharepoint application and your content database. If you don’t do this, the link always exists and you will not be able to restore the content database later because sql server thinks the content database is still in use, and you will find you can’t kill that process in the sql server.
- Delete and recreate you local sharepoint content database ( what? r u crazy?
) - Restore the content database you did in step 1
- Go to same place as step 2 and attach the content database. Note, you might get a error message saying the sql database collation is not correct, it is because your sql server default collation is different than what sharepoint required. Go to step 3 and create the database as request by choosing collation Latin1_General_CI_AS_KS_WS.
- Reset IIS
- It’s better re-deploy your sharepoint solution but this may not necessary
- Don’t forget reset sharepoint site collection administrator
Few problems you might notice when you access your sharepoint application.
- Make sure disgard checked out files, otherwise site collection adm will get error when visiting those pages.
- Any search settings such as scope, managed property, keywords will not restore
- I don’t have a chance to try this on multiple content database scenario, it might not work properly if that is the case.
That’s it, this is just an alternative way to backup/restore your sharepoint content.