none
Backup/Restore Sharepoint 2007 MySite

    Question

  • What is the best way to back up all MySites (at a time) from one MOSS server and restore in another MOSS server which will use a different content database.

     
    Wednesday, September 05, 2007 8:45 AM

Answers

  •  

    If you use the -item option and want to restore to a new farm the restore -item -restoretype new option allows you to specify a new webapplication and provide all the required parameters such as apppool, databaseserver, url etc etc

     

    Give it a go. I know it works and will dig out some sample commnands for you if you are still having difficulties.

    Saturday, September 08, 2007 10:52 AM

All replies

  • You can do this via the GUI backup page or via stsadm

     

    If you use stsadm then you need a to use the -item operation to specify the mysites web application.

     

    This backup can then be copied to another location and restored on a remote server.

     

    This process works fine and is the basis of a DR solution I wrote for one of my customers

     

    regards

     

    Neil

    Thursday, September 06, 2007 11:52 PM
  •  

    Thanks Neil, But I am not sure how I can use the -item opeation.

     

    All the MySites are hosted at http://portal:500. I mean, this url contains a lot of personal sites. I want to backup all these sites at a time and restore them in another moss server. The catastrophic backup does not allow me to specify http url.

     

    Also, I used DBA created database to deploy MOSS (using command line, not wizard) in my environment. Thanks again.

    Friday, September 07, 2007 4:35 PM
  •  

    If you use the -item option and want to restore to a new farm the restore -item -restoretype new option allows you to specify a new webapplication and provide all the required parameters such as apppool, databaseserver, url etc etc

     

    Give it a go. I know it works and will dig out some sample commnands for you if you are still having difficulties.

    Saturday, September 08, 2007 10:52 AM
  • Hi Neil,

    I get lost while doing that. I will highly appreciate if you can provide me with step by step information to migrate (backup/restore) (MOSS 2007) ALL MY SITE hostings including ALL personal sites to another server farm at a time. The other server farm is using its own database which is created by DBA. Thanks

    Tuesday, September 11, 2007 5:24 AM
  • I am also very interested in a step-by-step description of how to move sites from one sharepoint 2007 server to another.  Thanks for any help you can provide.

    Tuesday, September 11, 2007 3:44 PM
  • ok s you have a web application hosted on http://mysharepointserver and it is the mysite host. Mysites re stored just like standard ste collections inside databases so we can take a backup of this webapplication using the -item option thus

     

    stsadm.exe -o backup -directory <UNC PATH> -item "Web Application\mysiteshostname" -backupmethod full

     

    The important things here are -

     

    UNC PATH (do not use local folder although stictly local folder should work too).

    mysitehostname is NOT the url, it i the descriptive name of the webapplication as seen in the GUI and the GUI backup tool and in IIS

     

    Once you have successfully created a backup you can then do a restore

     

    stsadm -o restore -directory <UNC path> -restoremethod <overwrite or new> -backupid <GUID>  -item "Web Application\mysiteshostname"

     

    so whado we fill in  on this then, here goes

    -directory UNC PATH is the folder in which the backup resides.

    -restoremethod is either overwrite or new. New will then go on to ask you many questons about the Application Pool and The database server connection accounts etc. Just follow the requests and supply details where asked

    -backupid comes from when a backup is created it generates a TOC file that contains GUIDS. Locate the GUID in this file appropriate to the web app you want to restore.

    -item is obviously the name (NOT THE URL) of the application you want to overwrite or create. Again the tool will ask you questions about port number, url, host header etc. Just fill in the blanks

     

    After this you should be good to go.

     

    Tuesday, September 11, 2007 4:13 PM
  • I run this command. stsadm -o backup -directory \\server\backup -item MySite -backupmethod full

     

    MySite is the name of the web application.

     

    I get this error while backing up.

    SqlException: Cannot open backup device '\\server\backup\spbr0001\00000016.bak'. Operating system error 5(Access is denied.).

     

    As I said before the databases are created by DBA and I logged in to the WFE server using a service account which has admin access. the same service account is the DB owner. MySite web application is using windows authentication to access the database.

     

    Thanks

    Wednesday, September 12, 2007 7:31 AM
  •  

    The service account may be te DB owner but can you check that the service account running SQLSERVER.EXE on the database server has full control (modify at least) access to the fileshare you have created. Sounds odd but I seen this fix the poblem before.
    • Proposed as answer by Alex Hornak Tuesday, November 22, 2011 9:33 PM
    • Unproposed as answer by Alex Hornak Tuesday, November 22, 2011 9:34 PM
    Wednesday, September 12, 2007 10:02 AM
  • I attempted to run the restore and I got a few errors as shown below.  It looks like some of these are related to the fact that there is a "SharedServices1" already existing by default when you install SharePoint.  Is there a way to delete this, and should it be deleted before the install.  Any ideas on the other errors?

     

    ERROR1
    ------
    [9/12/2007 8:53:04 AM]: Error: Object SharePoint - 14186 failed in event OnRestore. For more information, see the error log located in the backup directory.
     SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPWebApplication Name=SharePoint - 14186 Parent=SPWebService is being updated by NT AUTHORITY\NETWORK SERVICE, in the OWSTIMER process, on machine SORENTO.  View the tracing log for more information about the conflict.
    [9/12/2007 8:53:04 AM]: Debug:    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
       at Microsoft.SharePoint.Administration.SPWebApplication.Update()
       at Microsoft.SharePoint.Administration.SPWebApplication.OnRestore(Object sender, SPRestoreInformation args)

    ERROR2
    ------
    [9/12/2007 8:53:23 AM]: Error: Object WSS_Content failed in event OnRestore. For more information, see the error log located in the backup directory.
     SqlException: The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:\Program Files\Microsoft Office Servers\12.0\Data\MSSQL.5\MSSQL\Data\WSS_Content.mdf'.
    File 'WSS_Content' cannot be restored to 'D:\Program Files\Microsoft Office Servers\12.0\Data\MSSQL.5\MSSQL\Data\WSS_Content.mdf'. Use WITH MOVE to identify a valid location for the file.
    The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:\Program Files\Microsoft Office Servers\12.0\Data\MSSQL.5\MSSQL\Data\WSS_Content_log.ldf'.
    File 'WSS_Content_log' cannot be restored to 'D:\Program Files\Microsoft Office Servers\12.0\Data\MSSQL.5\MSSQL\Data\WSS_Content_log.ldf'. Use WITH MOVE to identify a valid location for the file.
    Problems were identified while planning for the RESTORE statement. Previous messages provide details.
    RESTORE DATABASE is terminating abnormally.
    [9/12/2007 8:53:23 AM]: Debug:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
       at Microsoft.SharePoint.Administration.Backup.SPSqlBackupRestoreHelper.RunCommand(SPBackupRestoreInformation args, Boolean& restart, SPSqlBackupRestoreConnection connection)
       at Microsoft.SharePoint.Administration.Backup.SPSqlBackupRestoreHelper.Run(SPBackupRestoreInformation args)
       at Microsoft.SharePoint.Administration.Backup.SPSqlRestoreHelper.Run(SPBackupRestoreInformation args)
       at Microsoft.SharePoint.Administration.SPDatabase.OnRestore(Object sender, SPRestoreInformation info)
       at Microsoft.SharePoint.Administration.SPContentDatabase.OnRestore(Object sender, SPRestoreInformation info)

    ERROR3
    ------
    [9/12/2007 8:53:24 AM]: Error: Object SharedServices1 failed in event OnRestore. For more information, see the error log located in the backup directory.
     SPDuplicateObjectException: An object of the type Microsoft.Office.Server.Administration.SharedResourceProvider named "SharedServices1" already exists under the parent Microsoft.SharePoint.Administration.SPFarm named "SharePoint_Config_4ce7369a-675c-4148-8563-c8c57f24e75f".  Rename your object or delete the existing object.
    [9/12/2007 8:53:24 AM]: Debug:    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
       at Microsoft.Office.Server.Administration.SharedResourceProvider.Update()
       at Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.SharePoint.Administration.Backup.IBackupRestore.OnRestore(Object sender, SPRestoreInformation info)

    ERROR4
    ------
    [9/12/2007 8:54:00 AM]: Error: Object SharePoint - 23798 failed in event OnRestore. For more information, see the error log located in the backup directory.
     SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPWebApplication Name=SharePoint - 23798 Parent=SPWebService is being updated by NT AUTHORITY\NETWORK SERVICE, in the OWSTIMER process, on machine SORENTO.  View the tracing log for more information about the conflict.
    [9/12/2007 8:54:00 AM]: Debug:    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
       at Microsoft.SharePoint.Administration.SPWebApplication.Update()
       at Microsoft.SharePoint.Administration.SPWebApplication.OnRestore(Object sender, SPRestoreInformation args)

    ERROR5
    ------
    [9/12/2007 8:54:07 AM]: Error: Object SharedServices1_DB_9e2254e2-668a-4be1-b657-4efd2c7a2de2 failed in event OnRestore. For more information, see the error log located in the backup directory.
     SPDuplicateObjectException: An object of the type Microsoft.Office.Server.Administration.SharedResourceProvider named "SharedServices1" already exists under the parent Microsoft.SharePoint.Administration.SPFarm named "SharePoint_Config_4ce7369a-675c-4148-8563-c8c57f24e75f".  Rename your object or delete the existing object.
    [9/12/2007 8:54:07 AM]: Debug:    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
       at Microsoft.Office.Server.Administration.SharedResourceProvider.Update()
       at Microsoft.Office.Server.Administration.SharedDatabase.OnRestore(Object sender, SPRestoreInformation info)

    ERROR6
    ------
    [9/12/2007 8:54:08 AM]: Error: Object Shared Search Index failed in event OnRestore. For more information, see the error log located in the backup directory.
     SPDuplicateObjectException: An object of the type Microsoft.Office.Server.Administration.SharedResourceProvider named "SharedServices1" already exists under the parent Microsoft.SharePoint.Administration.SPFarm named "SharePoint_Config_4ce7369a-675c-4148-8563-c8c57f24e75f".  Rename your object or delete the existing object.
    [9/12/2007 8:54:08 AM]: Debug:    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.StoreObject(SPPersistedObject obj, Boolean storeClassIfNecessary, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPConfigurationDatabase.PutObject(SPPersistedObject obj, Boolean ensure)
       at Microsoft.SharePoint.Administration.SPPersistedObject.Update()
       at Microsoft.Office.Server.Administration.SharedResourceProvider.Update()
       at Microsoft.Office.Server.Search.Administration.SearchSharedApplication.Microsoft.SharePoint.Administration.Backup.IBackupRestore.OnRestore(Object sender, SPRestoreInformation args)

    ERROR7
    ------
    [9/12/2007 8:54:17 AM]: Error: Object GlatfelterPublicWebSite failed in event OnPostRestore. For more information, see the error log located in the backup directory.
     SPException: Cannot attach database to Web application. Use the command line tool or Central Administration pages to attach the database manually to the proper Web Application.
    [9/12/2007 8:54:17 AM]: Debug:    at Microsoft.SharePoint.Administration.SPContentDatabase.OnPostRestore(Object sender, SPRestoreInformation args)

    ERROR8
    ------
    [9/12/2007 8:54:18 AM]: Error: Object SharedServicesContent_9ed97edc-957d-4a1f-b673-e0ff1bbfc984 failed in event OnPostRestore. For more information, see the error log located in the backup directory.
     SPException: Cannot attach database to Web application. Use the command line tool or Central Administration pages to attach the database manually to the proper Web Application.
    [9/12/2007 8:54:18 AM]: Debug:    at Microsoft.SharePoint.Administration.SPContentDatabase.OnPostRestore(Object sender, SPRestoreInformation args)

     

    • Proposed as answer by GssMsi-PC Saturday, March 09, 2013 2:22 PM
    Wednesday, September 12, 2007 1:03 PM
  •  

    The service account has full control.
    Wednesday, September 12, 2007 2:19 PM
  • The backup/restore works fine if I use MOSS created DB but I could not see all personal sites in the restored web application.

     

    Backup fails if I use DBA created DB.

     

     

    Thursday, September 13, 2007 12:43 PM
  •  

    Can you confirm that there is a /personal/ wildcard inclusion managed path on the new mysites web applciation.
    Friday, September 21, 2007 11:00 PM
  • Hi Neil, I do not have an new mysite web application. All I am doing is backing up the mysite (incudes personal sites and mysite host) web application and trying to restore in another farm. That farm should use the database created by DBA. Should I create a mysite web application in the new farm before I restore? Please advise.

    Saturday, September 22, 2007 10:30 AM
  •  

    yes you will need to create the web application first and specify it as the mysite host in the SSP settings on the new farm
    Saturday, September 22, 2007 10:27 PM
  • Sorry for being late.

    The service account is DBOWNER on SQL 2005 db (Databases are created by DBA, not by sharepoint installation).

    Does the service account need to be SYSTEMADMIN on SQL DB in order to do backup mysite application using central admin? Because I get the below error

     

    Object DbpSHR04 failed in event OnBackup. For more information, see the error log located in the backup directory. SqlException: Cannot open backup device &#39;\\dam07013-mosp03\BackUpMySiteTest\spbr0001\00000016.bak&#39;. Operating system error 5(Access is denied.). BACKUP DATABASE is terminating abnormally.

     

    Thanks.
    Saturday, October 27, 2007 12:23 PM
  •  Neil Hodgkinson - MSFT wrote:

     

    The service account may be te DB owner but can you check that the service account running SQLSERVER.EXE on the database server has full control (modify at least) access to the fileshare you have created. Sounds odd but I seen this fix the poblem before.

     

    This comment helped me greatly!  I was getting an error specifying an accessed denied problem and by allowing the service account for my SQL intance full control over the file share, all went well.  The backup restored successfully!

     

    Thanks a bunch!

    --Ryan

    Wednesday, March 05, 2008 2:59 PM
  • Would you use this approach to backup your Mysites on a weekly basis or is this more for Migrating to a new environment.      I did the backup and it completed successfully.   But how would one restore someones individual Mysite if needed?

    Wednesday, April 23, 2008 7:21 PM
  • I've also remedied this scenario by moving the SharePoint backups to the SQL Server. Backup and Restore requires a UNC path for the backup set. Creating a share on the Web Front End will not work; the share and backups must be located on the SQL Server and accessed from the Web Server.

    This only applies to server farm environments

    18204 :
    BackupDiskFile:SurprisepenMedia: Backup device '\\myserver\SPS_Backup\bkp1-mysite-STS_mySPS_1.SPB' failed to open. Operating system error = 5(Access is denied.).

     

    Monday, July 07, 2008 4:17 PM