STSADM in English
Using Backup and Restore
The document will guide you through the backup and restore process. using the user interface or the stsadm.exe command line tool.
Note:
this process is intended for the Office SharePoint Server 2007 Beta 2, build 4017.1006, and we do not guarantee the following process is valid for other builds.
Instructions for using the command line tool, stsadm.exe to backup and restore Microsoft Windows SharePoint Services, are listed in the Using stsadm.exe to perform backup and restore section.
Set up a remote file share before you run Office SharePoint Server 2007 Backup and Restore
If you do not already have a remote file share to store the backup files, you must set one up before backing up your environment.
Setup a remote file share
1. (Recommended) Make sure SQL 'Setup server account' is using a domain account, see SQL Server books online on how to do it
2. Verify that the remote file share can be accessed from both the SQL Server computer and the computer.
3. On the remote file server, create a directory and share it out. Be sure to give access permissions the account you will be using for backup and restore.
4. On the Share Permissions tab of file share Properties, grant the accounts listed below Change and Read rights.
5. On the Security tab of the file share Properties, grant the accounts listed below all the rights except Full Control.
Accounts Needed:
• SQL server account (if “Local system” is the SQL service account, you must grant permission to the SQL server computer.).
• Login account (required to do backup and restore using the command line).
• The front end server account, such as \$ (required to do backup and restore using the user interface).
• The central administrator pool account (required to do backup and restore using the user interface).
• The Timer service account (requested by UI).
Note:
The central administrator pool and the Timer service use the same user account.
Note:
After Beta2, the backup and restore process will be initiated by Timer service when you run backup or restore by using the user interface. If you receive any errors during backup or restore process, you must delete the failed “Backup/Restore” timer job before you can run the next backup or restore process. The URL is for the Timer service jobs is:
http:///_admin/ServiceJobDefinitions.aspx.
Note:
You do not have to delete the Time service job if you did the Office SharePoint Server 2007 backup or restore by using the stsadm.exe command line tool.
Backup your environment
1. Navigate to central administrator page, the URL looks like, http://:port/default.aspx.
2. Click Operations on the top navigation bar.
3. In the Backup and Restore section of the Operations page, click Perform a Backup.
4. On the Select Component to Backup page, choose the components you want to backup, such as Farm or an individual site. You can select any one component and all components under it.
5. When you have selected all the components you want to backup, click Start Backup Process.
6. On the Start Backup page, under Backup File Location, enter the UNC path to the backup folder.
7. Click OK.
8. You can view the backup job status on the back status page, by clicking Refresh. The page will also refresh every 30 seconds automatically. Backup and Restore is a Timer service job, so it may take few seconds for the backup to start.
9. If you receive any errors, you can find more information by looking in the spbackup.log at the UNC path you specified above.
Restore to the original farm (overwrite) Important this procedure will not restore the configuration database.
1. Navigate to central administrator page, the URL looks like, http://:port/default.aspx.
2. Click Operations on the top navigation bar.
3. In the Backup and Restore section of the Operations page, click Restore from Backup.
4. On the Restore from Backup: Step 1: Select Backup File page, under Backup File Location, enter the UNC path to the backup folder.
5. On the Restore from Backup: Step 2: Select Backup Package to Restore page, choose the target backup package and click Start Restore Process.
6. On the Restore from Backup: Step 3: Select Component to Restore page, choose the restore level (Farm, Service, Database or SSP) and click Start Restore Process.
7. On the Restore from Backup: Step 4: Select Restore Options page, select Overwrite (Create new is the default value) and click OK in the pop-up dialog.
8. Under New Names, enter the username and password for the web applications listed on the page.
9. Click OK.
10. You can view the backup job status on the back status page, by clicking Refresh. Backup and Restore is a Timer service job, so it may take few seconds for the backup to start.
11. If you receive any errors, you can find more information by looking in the sprestore.log at the UNC path you specified above.
Using stsadm.exe to perform backup and restore
You can use the stsadm.exe command line tool to perform backup and restore. The path to the tool is: \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\.
Backup
stsadm.exe -o backup
-directory
-backupmethod
[-item ]
[-percentage ]
[-showtree]
[-noverbose]
Example:
• To use the -showtree option to see the available backup items, enter: "STSADM.EXE" -o backup -showtree"
• To do a full backup, enter:"STSADM.EXE" -o backup -directory \\backup -backupmethod full" where "\\backup" is the UNC path to the backup share.
Restore
stsadm.exe -o restore
-directory
-restoremethod
[-backupid
[-item ]
[-percentage ]
[-restoreconfigurationdatabase]
[-showtree]
[-noverbose]
Example:
• To use the -showtree option to see the available restore items, enter: "STSADM.EXE" –o restore -directory \\backup -showtree"
• To put the restorable item after -item in the following command, "STSADM.EXE" -o restore -directory \\backup -restoreethod
–item [farm/database/web app]"
• Restore the configuration database, central admin site and the whole farm STSADM.EXE" –o restore –restoreconfigurationdatabase -restoreethod
-directory
\\backup
Migration
The scenario is to backup the Office SharePoint Server 2007 related databases from one farm and restore the contents and Shared Service Providers (SSPs) to the other farms. Migration scenario from Farm_A to Farm_B . This example assumes that the two farms have the same topology, service accounts, database names and application pool accounts. You can, however, migrate to a farm with different topology, service accounts, and database names.
Source Farm Steps:
1. Backup the whole farm
Note:
If you are backing up a single-server installation, start the Windows SharePoint Services Administration service before performing the backup.
1. (Optional) Backup the Single Sign On (SSO) master key on a removable media, such as a USB drive.
Target Farm Steps:
1. Make sure the Windows SharePoint Services Web Service is started on the computers where you are hosting the portal sites, SSP and Central Admin sites.
2. Stop the Office Search Service by following the farm setup instruction
3. (Recommended) Restore the whole farm using the Restore to the original farm (overwrite) procedure above, except that you would use the Create new option for step 7 rather than the Overwrite option.
Note:
The above migration steps will not migrate the configuration database and the central administrator web application. If you want to migrate the whole farm including the configuration database and the central administrator web application, use the restoreconfigurationdatabase switch of the stsadm.exe command line utility.
Note:
If you are restoring the backup to a single-server installation that uses SQL Server Express, you must start the spsadmin service and save the backup file to local folder.
1. After this type of migration, apply the following steps (these steps apply to the Beta 2 release only):
Step Description
In the Default Content Access Account page, provide the password for the account you are using to crawl content. This is required to run content crawls after the migration.
For any crawl rules that require credentials, provide the password for the account you are using to crawl content. This is required to run content crawls after the migration.
Run the following from the command line: stsadm -o provisionservice -action start -servicetype spweb This creates the Web application and application pools.
Run the following from the command line: stsadm -o setadminport -port This changes the port number for the Central Administrator Web Application.
Run the following from the command line: iisreset /noforce This saves that changes made by the two previous commands.
In the Internet Information Services Manager snap-in, navigate to the SharePoint Central Administration v3 application pool. On the Identity tab of the Properties dialog, provide the credentials for the application pool account. This is required for the application pool to access the required resources.
On each of the target farm computers, run the following command from the command line: netlocalgroup WSS_RESTRICTED_WPG /a This adds the farm account to the WSS_RESTRICTED_WPG group.
On each of the target farm computers, run the following command from the command line: netlocalgroup WSS_ADMIN_WPG /a This adds the farm account to the WSS_ADMIN_WPG group.
Manually add any site hit rules to the target farm. These rules might not have been migrated over.
On the Manage Personal Sites page, enter the correct URL in Preferred Search Center. At the command line enter: iisreset /noforce. The "Preferred Search Center" URL still points to the source farm URL after migration.
1. (Optional) You can choose to restore each Web application, Default Web Site, and SSP separately using the Create new option. This way you can identify any problems you might experience with each restore item as you restore it.
2. Set the restored SSP to be the default SSP if is not already the default SSP.
3. Apply the workaround in the migration section of “Backup/restore workaround”.
4. If you cannot navigate to Search Setting page, check to see if the Windows Firewall is turned on. Windows Firewall will block all the search web service calls.
Backup and Restore for Single Sign-On Settings
Backup The SSO (Optional)
1. Backup the master secret
1. Go to Central Administration page.
2. Click Operations under Central Administration.
3. Under Security Configurations, click Manage settings for single sign-on.
4. Click Manage encryption key.
5. You must have a removable drive to backup the key to.
2. Backup SSO database
1. Go to Central Administration page.
2. Click Operations under Central Administration.
3. Under Backup and Restore, click on Perform a backup.
4. On the Perform a Backup page, choose SSO.
5. Start the backup by clicking Start Backup Process.
Restore or Migrate the SSO (Optional)
1. Configure SSO on that computer or farm. The database must have the same name as the source database.
2. Restore the backed up SSO database to the database created in above step.
1. Go to Central Administration page.
2. Click Operations under Central Administration.
3. Under Backup and Restore, click on Restore from backup.
4. Provide the path the backup file on the removable drive.
5. Click OK.
3. Restore the master secret
1. Go to Central Administration page.
2. Click Operations under Central Administration.
3. Under Security Configurations, click Manage settings for single sign-on.
4. Click Manage encryption key.
5. Put the drive on which secret was backed-up and click Restore after choosing the drive.
Migrating using SQL Server Tools
This scenario is a migration from the source farm to the target farm using SQL Server tools and Office SharePoint Server 2007 features and assumes that all features are the same, or compatible, between the source farm and the target farm.
Source Farm Steps
1. In SQL Server Enterprise Manager, backup all Office SharePoint Server 2007 related databases.
Target Farm Steps
1. Install Office SharePoint Server 2007 on the target farm computer. Do not create a SSP or portal.
2. In SQL Server Enterprise Manager, restore to the target farm computer, all Office SharePoint Server 2007 related databases except the configuration database and the central administrator content database. Use the Restore Databases menu option.
3. In the Office SharePoint Server 2007 central administrator console, create three web applications, one for the SSP, one for the People web application, and one for the portal site. If you have more web applications in the source farm, create the corresponding web applications in the target farm.
4. In the Office SharePoint Server 2007 central administrator console, detach the content database from the newly created web application by doing the following:
1. From the Application Management page click the Content Databases link under the SharePoint Web Application Management section.
2. Change the web application from the drop down list.
3. Select the content database.
4. Select Offline for Database Status and check the remove content database
5. Click OK.
5. Attach the restored site Content database for the newly created web application, people web application and the SSP administrator web application.
1. On the Application Management page click Content Databases under SharePoint Web Application Management.
2. Change the web application from the drop down list
3. Click Add a content database.
4. Enter the SQL Server name and the name of the restored database.
5. Click OK.
6. Restore the SSP
1. On the Application Management page click Create or configure this farm's shared services.
2. Click Restore SSP.
3. Add relative info, SSP web application, people web application, SSP database name, search database name (optional) and click OK.
7. Set the restored SSP as the default SSP for the target farm.
8. Start the search crawl from the Search Setting page in the SSP administrator console.
9. Click OK on the pop up dialog to resume the crawl.
Cette page a été modifiée pour la dernière fois le samedi, mars 29, 2008 08:42:25