Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1248
  • Last Modified:

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

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
PDSWSS
Asked:
PDSWSS
  • 27
  • 14
  • 7
2 Solutions
 
Justin SmithSr. System EngineerCommented:
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
 
Justin SmithSr. System EngineerCommented:
Also, any custom features/web parts need to be installed on the target.
0
 
PDSWSSAuthor Commented:
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
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
Justin SmithSr. System EngineerCommented:
Depends what the config is.  Do a test run.
0
 
PDSWSSAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
Justin SmithSr. System EngineerCommented:
oh, you are going from TEST to PROD.....thought it was the other way around.  sorry.

what config is different?
0
 
PDSWSSAuthor Commented:
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
 
PDSWSSAuthor Commented:
If you want I can send you a screen shot of the Health Analyzer Report of the Test Sharepoint Site tomorrow AM.
0
 
luceysupportCommented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
luceysupportCommented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
PDSWSSAuthor Commented:
Achilles -

Health Report attached
0
 
PDSWSSAuthor Commented:
Attached to here
spointes.txt
0
 
PDSWSSAuthor Commented:
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
 
PDSWSSAuthor Commented:
luceysupport

I will need to keep the Sharepoint site running on the test server.
0
 
Justin SmithSr. System EngineerCommented:
0
 
luceysupportCommented:
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
 
PDSWSSAuthor Commented:
Will test solutions early this week.
0
 
Justin SmithSr. System EngineerCommented:
update?
0
 
PDSWSSAuthor Commented:
Will test later today.
0
 
PDSWSSAuthor Commented:

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
 
luceysupportCommented:

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
 
PDSWSSAuthor Commented:
Thanks for the clarification.
0
 
PDSWSSAuthor Commented:
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
 
luceysupportCommented:
It's the network service account
 
Look at the sptimer service change the account it is running under to one with more permissions
0
 
PDSWSSAuthor Commented:
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
 
PDSWSSAuthor Commented:
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
 
luceysupportCommented:
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
 
PDSWSSAuthor Commented:
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
 
luceysupportCommented:
I would always use sql management studio, I don;t know the command lines off the top of my head.

0
 
PDSWSSAuthor Commented:
OK. Hopefully, that will work.
0
 
Justin SmithSr. System EngineerCommented:
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
 
PDSWSSAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
PDSWSSAuthor Commented:
I don't want the configuration from the test server restored on the productions server.
0
 
Justin SmithSr. System EngineerCommented:
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
 
PDSWSSAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
PDSWSSAuthor Commented:
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
 
PDSWSSAuthor Commented:
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
 
PDSWSSAuthor Commented:
Achilles:

Please forget that problem.  When I did the backup apparently the  WWW service stopped. I started it and now its fine.  Thanks
0
 
PDSWSSAuthor Commented:
Thanks for your help.
Since you both provided solutions, I split the points.
0
 
PDSWSSAuthor Commented:
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
 
Justin SmithSr. System EngineerCommented:
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
 
PDSWSSAuthor Commented:
Live and learn. I needed to backup and restore the complete database.
0
 
PDSWSSAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 27
  • 14
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now