1/21/2008

Backup, restore and migration of sites on SharePoint 3 pt. 2/3

stsadm -o backup and stsadm -o restore

To backup:
  1. On the server locate the file stsadm.exe (if you have sharepoint 2 and sharepoint 3 locate the one in the "12" folder.
  2. Open command prompt and type [path to stsadm.exe\]stsadm -o backup -url http://[url-of-the-web-site] -filename [path and name of the file.dat]

To restore: 
  1. Create a web application (but don't create a site collection)
  2. On the server locate stsadm.exe
  3. Open command prompt and type [path to stsadm.exe\]stsadm -o restore -filename [path and name of the file.dat] -url http://[url-of-the-web-site]

PROS:

It migrates the whole site collection perfectly! All data-view-webparts are preserved, all user rights, meta data, etc. are preserved).

CONS:
1, It keeps the same GUIDS of lists and sites, so you can't use it to create a copy of the site in the same content database. (Example: You have 1 web application and you want to create a copy of the site in the same site collection in the same web application)
2. You can't backup specific subsites - only entire site collection
3. You need to have access to the server to run stsadm.exe

8 comments:

  1. Anonymous5:18 PM

    Wow, spent three hours last night trying a variety of ways of restoring my database. Maybe I was just tired. Any how, ran this with my backup on a testbed system, and data restored perfectly.

    Thanks!

    ReplyDelete
  2. Glad it worked out. I know the headaches we can have by backup/restore of sharepoint sites.

    ReplyDelete
  3. Anonymous9:36 AM

    Backing up SharePoint sites can indeed be a headache. How about this one, restore fails if the backup file is marked as read only.

    http://jritmeijer.spaces.live.com/blog/cns!8A48A27460FB898A!963.entry

    ReplyDelete
  4. Anonymous6:51 PM

    This comment has been removed by a blog administrator.

    ReplyDelete
  5. Anonymous11:42 AM

    This comment has been removed by a blog administrator.

    ReplyDelete
  6. Anonymous11:44 AM

    This comment has been removed by a blog administrator.

    ReplyDelete
  7. Anonymous1:25 AM

    You mentioned Con#1 which limits its use tremendously. Have you found a way around this or a different way of doing this without having to migrate the content by hand?

    "so you can't use it to create a copy of the site in the same content database. (Example: You have 1 web application and you want to create a copy of the site in the same site collection in the same web application)"

    ReplyDelete
  8. Anonymous9:30 PM

    Got it figured out.

    stsadm -o Export and Import commands. Use the -cabsize switch with the Export command will create a file set to get around the 25meg cap.

    *Make sure that your windows account has access within SharePoint to the site you are trying to Export and Import

    ReplyDelete

Note: Only a member of this blog may post a comment.