SoftMoss

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.



Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

Neil Hodgkinson

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






Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

softMOSS

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.





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

Neil Hodgkinson

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.






Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

softMOSS

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





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

gbuehrle

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.





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

Neil Hodgkinson

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.






Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

softMOSS

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





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

Neil Hodgkinson (MSFT - PFE)

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.




Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

gbuehrle

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)





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

softMOSS

The service account has full control.




Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

softMOSS

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.





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

Neil Hodgkinson (MSFT - PFE)

Can you confirm that there is a /personal/ wildcard inclusion managed path on the new mysites web applciation.




Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

softriyaz-moss

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.





Re: SharePoint - Setup, Upgrade, Administration and Operation Backup/Restore Sharepoint 2007 MySite

Neil Hodgkinson (MSFT - PFE)

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