Skip to main content

Difference between STSADM Backup/Restore and Import/Export

I have been asked by many about the differences between Backup/Restore vs. Import/Export operations, they both really serve very different purpose.

Backup/Restore


Can back up top-level websites (Site Collections), an individual database, a Web application, or an entire farm.

There is no Default File Extension for back up files

Supports “Full” and “Differential” back up. If “overwrite” option is selected while restoring it overwrites entire SiteCollection

Supports UNC path to save/restore backup files.

Backup of Site Collection can be tracked by stsadm -o backuphistory operation

Import/Export

Like Smigrate.exe utility in SPS 2003, you can migrate sites, subsites and Site Collection.

Default file Extension (if not mentioned) “.cmp”


Provides “versions” option to control migrate/overwrite files in site

Backup files should be copied to server

Sites/SiteCollections would not track export/Import history

Syntax

stsadm -o backup
-directory
-backupmethod
[-item]
[-percentage]
[-backupthreads]
[-showtree]
[-quiet]

stsadm -o restore
-directory
-restoremethod
[-backupid]
[-item]
[-percentage]
[-showtree]
[-suppressprompt]
[-username]
[-password]
[-newdatabaseserver]
[-quiet]

stsadm -o export
-url
-filename
[-overwrite]
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-nologfile]
[-versions] <1-4>
[-cabsize]
[-nofilecompression]
[-quiet]

stsadm -o import
-url
-filename
[-includeusersecurity]
[-haltonwarning]
[-haltonfatalerror]
[-nologfile]
[-updateversions] <1-3>
[-nofilecompression]
[-quiet]


Useful Links

http://technet2.microsoft.com/Office/f/?en-us/library/16a7e571-3531-4a4e-baa7-f348a9f9d1d11033.mspx

http://blogs.msdn.com/joelo/archive/2006/10/16/what-happened-to-smigrate-exe-what-if-i-only-want-to-
upgrade-one-site-what-can-i-do-now-with-stsadm-exe.aspx

http://blah.winsmarts.com/2007-10-Backup_and_Restore_Strategies_in_MOSS_2007.aspx

http://blogs.msdn.com/joelo/archive/2007/03/09/sharepoint-backup-restore-high-availability-and-disaster-recovery.aspx

Comments

Popular posts from this blog

How to get SPUser or SPGroup from Person or Group field

You have person or group field in SharePoint list and you want to programmatically get the user or person. The below code to gets SPUser from User or Group field in the list when multiple choice and Groups are not allowed in the field: //get SPUser SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users"); SPFieldUserValue userFieldValue = (SPFieldUserValue)userField.GetFieldValue(item["Users"].ToString()); SPUser user = userFieldValue.User; This part of code would help you to get SPUser when multiple choice is allowed and groups are not allowed: //Multiple choices are allowed SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users"); SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString()); foreach (SPFieldUserValue userFieldValue in userFieldValueCollection) {     Console.WriteLine("     " + userFieldValue.User.LoginName); } And when group

SharePoint publishing page scheduling

In SharePoint 2010 publishing enabled team site collection is not showing schedule button in publish ribbon. Solution: Here is how to enable it  though the UI: Locate the SharePoint Server Web site on which you want to enable content approval and item scheduling. Click  Site Actions , click  Site Settings , and then click  Modify Pages Library Settings . Under  General Settings , click  Versioning Settings . Click  Yes  next to  Content Approval , and then click  OK . Click  Manage item scheduling .   Click to enable the  Enable scheduling of items in this list  check box, and then click  OK .

Changing Content Type Hub URL

Change the Hub URL through powershell by using: Set-SPMetadataServiceApplication -Identity " " -HubURI " " For Ex: Set-SPMetadataServiceApplication -Identity "Managed Metadata Service" -HubURI "http://contenttype.Domain.Com" When you try to do this you get this rather scary message: This is SharePoint telling you that this is a major thing so be careful! Essentially all your content types that you have published out will be removed if they can, and you have to republish all of your content types out again which can cause some issue.