Solved

How would I migrate content from a Sharepoint Foundation 2010 Site on one server to another server?

Posted on 2010-11-23
48
1,176 Views
Last Modified: 2012-05-10
We have a Sharepoint Foundation 2010 Site on our test server. This site includes a custom Web application stored in MS SQL 2008 R2.  I have set up Sharepoint Foundation 2010 on our production server along with MS SQL 2008 R2 and now need to move the content from the test server to the production server. What would be the simplest and most efficient way to complete this task?  Thanks,
0
Comment
Question by:PDSWSS
  • 27
  • 14
  • 7
48 Comments
 
LVL 38

Accepted Solution

by:
Justin Smith earned 250 total points
ID: 34198130
This is the age old question :)

You could either do a backup/restore through PowerShell, or export/import through PowerShell.  The backup/restore will capture a bit more.  Versions of SharePoint and SQL should be the same on both environments.

From management shell, run backup-spsite -identity "url" -path "path\filename.bak"
Copy the bak to the other environment
From management shell, run restore-spsite -identity "url" -path "path\filename.bak" -force

That's the simplest way.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34198140
Also, any custom features/web parts need to be installed on the target.
0
 

Author Comment

by:PDSWSS
ID: 34201202
Can I migrate the content from the other Server to the new Server without the configuration settings?

I ask because I addressed the health analyzer report issues shown in the sharepoint admins site for the New server.
However, the old installation that I want to migrate shows several  health analyzer report issues.  Thanks,
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34202489
Depends what the config is.  Do a test run.
0
 

Author Comment

by:PDSWSS
ID: 34202511
Not sure how I would do a test run. Once I copied the site onto the new Server I would know the answer but that is not a test.

What are you suggesting? Please clarify.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34202513
How is copying the site to the new server not a test?  You are seeing if it works correctly, right?  if it works, leave it.  if not, delete it and go back to the drawing board.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34202518
oh, you are going from TEST to PROD.....thought it was the other way around.  sorry.

what config is different?
0
 

Author Comment

by:PDSWSS
ID: 34202633
From my post above -

I ask because I addressed the health analyzer report issues shown in the sharepoint admins site for the New Production server.
However, the old installation that I want to migrate shows several  health analyzer report issues, including  updates needed - Sharepoint Foundation installs out of date databases that need to  be updated - does that make sense to you? Some other reported issues as well.  Don't want to migrate these analyzer issues -

Isn't there a way to migrate the content and not the configurations etc.

Thanks,
0
 

Author Comment

by:PDSWSS
ID: 34202635
If you want I can send you a screen shot of the Health Analyzer Report of the Test Sharepoint Site tomorrow AM.
0
 
LVL 7

Expert Comment

by:luceysupport
ID: 34204026
All you have to do is detach your content db from test and attach it to the live db server.

Then in central admin create your new web application and attach the content database.

This is the simplest way to migrate a web application's content without configuration.

You will have to configure the production farm and create the enw web app first.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34204674
I would not recommend doing what lucey stated, it's even more dramatic than doing a Site Collection restore.

Yes please send the screen shot.  Were either of the environments upgraded from MOSS?

In my experiences, alot of the Health stuff doesn't really affect things.
0
 
LVL 7

Expert Comment

by:luceysupport
ID: 34204792
this works great for me why not try it and see if it suits your situation
Ach1lles; you should focus on your own solution and not on making recommendations re mine there can be more than one solution to a problem
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34204811
I understand.  However, if he is worried about moving just one site collection, I'm sure there would be greater concern in moving multiple site collections in a content database.

Yes, moving content databases is one way to move content.
0
 

Author Comment

by:PDSWSS
ID: 34208999
Achilles -

Health Report attached
0
 

Author Comment

by:PDSWSS
ID: 34209052
Attached to here
spointes.txt
0
 

Author Comment

by:PDSWSS
ID: 34209065
luceysupport

I have set up the web application - Sharepoint Site
Please explain how I would:
 detach your content db from test and attach it to the live db server.

 and attach the content database.

This is the simplest way to migrate a web application's content without configuration.

0
 

Author Comment

by:PDSWSS
ID: 34209136
luceysupport

I will need to keep the Sharepoint site running on the test server.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34209682
0
 
LVL 7

Expert Comment

by:luceysupport
ID: 34211693
You will need to backup your content database and restore it to the new prod server.

Then in central admin on the prod site, click the manage content databases link and then add content database. Enter the database name of the database you restored.

0
 

Author Comment

by:PDSWSS
ID: 34226193
Will test solutions early this week.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34282509
update?
0
 

Author Comment

by:PDSWSS
ID: 34283277
Will test later today.
0
 

Author Comment

by:PDSWSS
ID: 34283409

luceysupport:


Why did you suggest the following after previously telling me I should detach the content DB from the test server and  and reattach the content database on the Production Server.
Aren't these two different ways of moving the content DB? Please clarify. Thanks

"You will need to backup your content database and restore it to the new prod server.

Then in central admin on the prod site, click the manage content databases link and then add content database. Enter the database name of the database you restored."
0
 
LVL 7

Expert Comment

by:luceysupport
ID: 34283569

I told you not to detach the database from the existing server because you said you wanted to keep this site working.

Instead you can backup the dbs and then restore them to the new server.

If the content dbs are not going to be used on the test server then you can detach and attach to the new server, but be aware this will screw up your test server.
0
Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

 

Author Comment

by:PDSWSS
ID: 34283703
Thanks for the clarification.
0
 

Author Comment

by:PDSWSS
ID: 34288162
When I attempt to restore the Content DB to the Production server I get the following message -

Access to the path C:\name of folder\spbrtoc.xml  is denied to account AD\PGBD$. Ensure that the Sharepoint Timer service and Microsoft SQL Server service accounts have full control permission on both the file share and the underlying folder."

Makes no sense to me since there is no Account    "AD\PGBD$"   I am logged in as   AD\myusername (administrator).
PGBD is the name of the server.  Do you know where  the  account   "AD\PGBD$" came from?
Thanks
0
 
LVL 7

Expert Comment

by:luceysupport
ID: 34289314
It's the network service account
 
Look at the sptimer service change the account it is running under to one with more permissions
0
 

Author Comment

by:PDSWSS
ID: 34292784
OK. Changed to the administrator account.

Now I get the attached error message. How could login fail for the administrator. They have full control.

Thanks
Picture-1.png
0
 

Author Comment

by:PDSWSS
ID: 34292878
Moved backup file from shared folder to C:/     and  get a different error message (Attached).

Not clear what is happening here. "Timer job for restore operation was cancelled..."
Picture-3.png
0
 
LVL 7

Assisted Solution

by:luceysupport
luceysupport earned 250 total points
ID: 34293037
I am not sure if you are trying to follow my recommendations but in case you are, then you are going in a different direction.

My recommendations is a follows:

Backup your content database from the old sql server using a normal sql server backup, not sharepoint.
Restore this content database to the new database server using sql server restore not sharepoint
Then in sharepoint central admin use the 'Add new content database' for the web application you have setup and configured and type the name of the database you restored in the previous step.


This is such an easy process I have done it many times. I tend to not use sharepoiint backup and restores as they have always caused me problems. When all you want is the site collections data then this process has always worked for me
0
 

Author Comment

by:PDSWSS
ID: 34293152
Yes. I assumed you meant in Sharepoint.

What are the cmd lines to backup the content SQL db and restore on the other server?
Thanks
0
 
LVL 7

Expert Comment

by:luceysupport
ID: 34293223
I would always use sql management studio, I don;t know the command lines off the top of my head.

0
 

Author Comment

by:PDSWSS
ID: 34293273
OK. Hopefully, that will work.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34293327
Friend, you aren't following my suggestions either.  Mine were completely command line driven.

The very first response in this question contains two straight forward commands.  Backup the site, copy the file to the other farm, restore the site.

I've done this a thousand times in 2010 environments.  
0
 

Author Comment

by:PDSWSS
ID: 34293449
If you remember, I only want to backup and restore the contents.
Can I use your instructions for the content DB only?  

If the answer is yes, then I could have been done with this after your first post.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34293494
I don't understand your comment.  By content you mean sites, right?  What other type of content is there?

A content db consists of one or more sites.
0
 

Author Comment

by:PDSWSS
ID: 34293522
I don't want the configuration from the test server restored on the productions server.
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34293567
What configuration?  Be specific.  Are you talking about configuration such as Seach, managed paths, list/library configuration, farm admins?  Be a bit more specific.

Also, i'm not sure why your think restoring a SITE would be more inclusive than restoring an entire DATABASE.
0
 

Author Comment

by:PDSWSS
ID: 34293636
I answered this question at the beginning. From my post above -

"I ask because I addressed the health analyzer report issues shown in the sharepoint admins site for the New Production server.
However, the old installation that I want to migrate shows several  health analyzer report issues, including  updates needed - Sharepoint Foundation installs out of date databases that need to  be updated - does that make sense to you? Some other reported issues as well.  Don't want to migrate these analyzer issues -

Isn't there a way to migrate the content and not the configurations etc."



"Also, i'm not sure why your think restoring a SITE would be more inclusive than restoring an entire DATABASE."
Answer - In Sharepoint Backup, you have the option of back up and restore for the  Content and Config DBs separately.

Thanks,
0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34293669
Ok I don't think you fully understand how content databases work and what the config database is.  But that's ok.

Bottom line, what you are trying to do is move sites between environments.  You have two ways of doing this:

1. Like I suggested by using PowerShell commands to backup/restore your site collections
2. Like Lucy suggested, by backing up entire content databases, moving them, restoring them in SQL, attaching them to web apps

Either of these suggestions will NOT move farm level or web app level configuration settings into your environment.
0
 

Author Comment

by:PDSWSS
ID: 34295589
You are correct. I don't  fully understand how content databases work and what the config database is.
However, I appreciate your helping me to understand this process a little better.

I will try your solution and let know if I have any questions. Thanks again.
0
 

Author Comment

by:PDSWSS
ID: 34297109
ACHILLES:

Ran those commands and looks like some of the site was restored. Still need to restore webparts to be sure that all is restored.

HOWEVER, THE TEST SITE WHERE I DID THE BACKUP NO LONGER WORKS. DID NOT EXPECT THIS TO HAPPEN. A BACKUP OF THE DATABASE SHOULD NOT BREAK THE SITE. CORRECT?

THE ERROR MESSAGE IS ATTACHED.  
Picture-2.png
0
 

Author Comment

by:PDSWSS
ID: 34297149
Achilles:

Please forget that problem.  When I did the backup apparently the  WWW service stopped. I started it and now its fine.  Thanks
0
 

Author Closing Comment

by:PDSWSS
ID: 34309964
Thanks for your help.
Since you both provided solutions, I split the points.
0
 

Author Comment

by:PDSWSS
ID: 34321847
Achilles:

As you know, I followed your directions and used the scripts below to backup the db.bak and restore db.bak to a second server.
Must have been restored since Sharepoint Content from the other server now is displayed.
I expected this DB to appear when I went to SQL Management Studio under databases.
I also looked in all the MSSQL instance folders on the C drive.
Can't find it - where should it be?  Thanks

From management shell, run backup-spsite -identity "url" -path "path\filename.bak"
Copy the bak to the other environment
From management shell, run restore-spsite -identity "url" -path "path\filename.bak" -force

0
 
LVL 38

Expert Comment

by:Justin Smith
ID: 34326186
those commands don't backup databases.  They only backup and restore sites.  when you restore, it puts the site in the already existing db for the web app.

lucy provided steps for complete db backup/restore.  i also posted a technet article for moving db's.
0
 

Author Comment

by:PDSWSS
ID: 34326998
Live and learn. I needed to backup and restore the complete database.
0
 

Author Comment

by:PDSWSS
ID: 34327045
Based on your response, I chose the wrong way to solve my issue.
After restoring the sites by the Achilles method, can I now move the necessary database according to Lucysupport's solution?


0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now