network

zeeman1 computer:

Backup Script

=================

@echo off
echo ===============================================================
echo Back up sites for the farm to E:\Backup
echo ===============================================================
cd %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\BIN
@echo off
stsadm.exe -o backup -directory "E:\backup\Sharepoint" -backupmethod full -overwrite
echo completed

 

===================

Find backupid:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o backuphistory -directory e:\backup\sharepoint >c:\backupid.txt


Sharepoint Computer

2

 

 

Install Sharepoint 3.0 and Run Windows Update to update

3

If SHAREPOINT computer has a different WSS_CONTENT database name, please uninstall Sharepoint and detach WSS_CONTENT_xxxxxxx and remove the corresponding database files from C:\WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data directory.

Reinstall Sharepoint and run Windows update to update Sharepoint.

Restore onto SHAREPOINT computer

Please use UNC path even though the backup directory is in local drive E:

stsadm.exe -o restore -directory "\\zeeman1\backup\Sharepoint" -backupid "fc059864-aea7-4a77-93e2-92871198b284" -restoremethod overwrite

=====

rolled back. Estimated rollback completion: 100%.
Progress: [WSS_Content] 5 percent complete.
Progress: [WSS_Content] 10 percent complete.
Progress: [WSS_Content] 15 percent complete.
Progress: [WSS_Content] 20 percent complete.
Progress: [WSS_Content] 25 percent complete.
Progress: [WSS_Content] 30 percent complete.
Progress: [WSS_Content] 35 percent complete.
Progress: [WSS_Content] 40 percent complete.
Progress: [WSS_Content] 45 percent complete.
Progress: [WSS_Content] 50 percent complete.
Progress: [WSS_Content] 55 percent complete.
Progress: [WSS_Content] 60 percent complete.
Progress: [WSS_Content] 65 percent complete.
Progress: [WSS_Content] 70 percent complete.
Progress: [WSS_Content] 75 percent complete.
Progress: [WSS_Content] 80 percent complete.
Progress: [WSS_Content] 85 percent complete.
Progress: [WSS_Content] 90 percent complete.
Progress: [WSS_Content] 95 percent complete.
Progress: [WSS_Content] 100 percent complete.

Verbose: [WSS_Content] SQL Server Message: Processed 13000 pages for database 'W
SS_Content', file 'WSS_Content' on file 1.
Verbose: [WSS_Content] SQL Server Message: Processed 5 pages for database 'WSS_C
ontent', file 'WSS_Content_log' on file 1.
Verbose: [WSS_Content] SQL Server Message: RESTORE DATABASE successfully process
ed 13005 pages in 146.110 seconds (0.729 MB/sec).
Verbose: [WSS_Content] SQL command completed at: 10/24/2011 10:23:21 AM.
Verbose: [WSS_Content] Verifying that the database restoration is complete.
Verbose: [WSS_Content] SQL Server Command: USE [master]
SELECT status FROM master..sysdatabases WHERE name=@db_n
ame
@db_name=WSS_Content
Verbose: [WSS_Content] SQL Server Command: SELECT TOP 1 1 FROM [WSS_Content]..sy
sobjects
Verbose: [WSS_Content] Database restoration has been verified.
Verbose: Starting OnPostRestore event.
Verbose: Starting object: Farm.
Progress: [Farm] 100 percent complete.
Verbose: Starting object: WSS_Administration.
Progress: [WSS_Administration] 100 percent complete.
Verbose: Starting object: Windows SharePoint Services Web Application.
Progress: [Windows SharePoint Services Web Application] 100 percent complete.
Verbose: Starting object: SharePoint - 80.
Progress: [SharePoint - 80] 100 percent complete.
Verbose: Starting object: WSS_Content.
Verbose: [WSS_Content] Trying to attach to web application url: http://sharepoin
t.vanarts.com/
Verbose: [WSS_Content] Attaching database
Warning: [WSS_Content] Content database failed to be added to SharePoint, please
try and detach the original database then re-attach this database.
Error: Object WSS_Content failed in event OnPostRestore. For more information, s
ee the error log located in the backup directory.
SqlException: Database state cannot be changed while other users are usi
ng the database 'WSS_Content'
ALTER DATABASE statement failed.
sp_dboption command failed.
Verbose: Notifying third parties that the restore completed.
Verbose: The IIS Web Site has been extended. You may need to use iisreset.exe t
o restart IIS before your site becomes accessible.
Finish Time: 10/24/2011 10:23:49 AM.
Progress: Completed with errors and warnings, please refer to the log file for d
etails.
Verbose: Deleting the file \\zeeman1\backup\Sharepoint\spbr00B3\sprestore.xml an
d replacing it.
Verbose: The backup/restore process included the following objects:
Farm\
*[SharePoint_Config_4034f808-a6cd-4812-af5a-740efa7f6667]\
[WSS_Administration]\
*[Web Application]\
*[SharePoint_AdminContent_7dab1113-5e66-4f8c-910c-972a18f5b4cb]\

Windows SharePoint Services Web Application\
SharePoint - 80\
*WSS_Content\

Completed with 1 warnings.
Completed with 1 errors.

Restore failed for Object WSS_Content failed in event OnPostRestore. For more in
formation, see the error log located in the backup directory.
-------------------------------------------------
The restore job failed. For more information, see the error log that is located
in the backup directory.

=======

Even though the restore renders warnings and errors, I can still attach the WSS_CONTENT database as follows:

stsadm -o addcontentdb -url http://sharepoint -databasename wss_content

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o addcontentdb -url http://sharepoint -databasename wss_content

A SharePoint database named wss_content already exists. You must supply another name for the new database.

When the error occurs, remove WSS_Content database from Sharepoint 3.0 Central Administration.

4

And try to attach WSS_content database; the following error shows:

Attaching this database requires upgrade, which could time out the browser session.  You must use the STSADM command 'addcontentdb' to attach this database.

re-run:

stsadm -o addcontentdb -url http://sharepoint -databasename wss_content

Done!