次の方法で共有


What is best - Backup/Restore or Export/Import?

A small chart on the differences between Backup/Restore and Export/Import.

 

Backup/Restore

Export/Import

 

 

 

1

Two methods – when the url parameter is used a site collection backup is created

- when the backupmethod parameter is used backup of an individual database, web application or entire farm can be created

 

2

Backs up entire Site collection including permissions.

Export sites and/or subsite data. A limitation of the Backup operation.

3

There is no Default File Extension for back up files when using the url parameter. Any filename can be provided. However while using the backupmethod a directory or location(can include a unc path) needs to be specified

Default file Extension (if not mentioned) ".cmp"

4

When using the backupmethod parameter also known as catastrophic backup supports "Full" and "Differential" back up of Web Applicaitons. If "overwrite" option is selected while restoring it overwrites entire SiteCollection.

Provides "versions" option to control migrate/overwrite files in site

5

Not possible to schedule backups;however can be automated by creating a batch file and scheduling through Windows Task Scheduler.

Backup files should be copied to server

6

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

Sites/SiteCollections would not track export/Import history

Note:

I) A large limiting factor when restoring site collections is that the backup includes the GUIDs that identify all of the items in the content database and hence are reused during the restore. If the site is being restored to a different URL and the original site still exists there will be a conflict. If this happens the only way for SharePoint to allow the restore is for the site to be restored to a new database so that the GUIDs will be unique in that database. A similar error like the one below may be displayed:No content databases are available for this operation. Create a content database, and then try the operation again. To create a content database, click "Content databases" on the Application Management page, select the Web application to use, and then click "Add a content database."

II) It is preferable to use the Setsitelock operation to set the site collection url read-only for the entire time of the backup{ stsadm -o setsitelock -url <URL name> -lock readonly }

III) Post SP2 site collections are automatically locked as read-only before a backup process occurs.

IV) Post SP2 the force parameter can be used to ignore disk space check.

Command Syntax :

Backup

For site collection backup

stsadm.exe -o backup-url <url>

-filename <filename>

[-nositelock]

[-overwrite]

the [-overwrite] is required when a backup already exists with the same filename. Success/Failure of the operation is displayed.

For catastrophic backup

stsadm.exe -o backup

-directory <unc path or local drives>

-backupmethod <full or differential>

[-force]

[-item] <created path from tree>

[-percentage] <integer between 1 and 100>

[-backupthreads] <integer between 1 and 100>

[-showtree]

[-quiet]

Restore

For site collection restore

stsadm -o restore

-url <URL name>

-filename <file name>

[-hostheaderwebapplicationurl] <Web application URL>

[-overwrite]

the[-overwrite] is required when the site already exists.

For catastrophic restore

stsadm -o restore

-directory <UNC path>

-restoremethod <overwrite or new>

[-backupid] <GUID from backuphistory, see stsadm -help backuphistory>

[-item] <created path from tree>

[-percentage] <integer between 1 and 100>

[-showtree]

[-suppressprompt]

[-username] <user name>

[-password] <password>

[-newdatabaseserver] <new database server name>

[-preservechangelog]

[-quiet]

Export

stsadm -o export

-url <URL name>

-filename <export file name>

[-overwrite]

[-includeusersecurity]

[-haltonwarning]

[-haltonfatalerror]

[-nologfile]

[-versions] <1-4>

[-cabsize] <integer value>

[-nofilecompression]

[-quiet]

Import

stsadm -o import

-url <URL name>

-filename <import file name>

[-includeusersecurity]

[-haltonwarning]

[-haltonfatalerror]

[-nologfile]

[-updateversions] <1-3>

[-nofilecompression]

[-quiet]