0

I was looking for the best way to copy a SharePoint content database from PROD to Dev Environment, and found this (answered) question

It seems ok, but there was another answer below the accepted one. It seems that there already are a (simpler?) way doing this with a ps-commandlet.

My question is: What is the difference between backup-restore Content DB in SQL Manager and then runnning ps-command Mount-SPContentDatabase, vs Backup-SPFarm/Restore-SPFarm"

Is the latter only meant for use on same machine?

1

You can back up a content database by using the SharePoint Central Administration website, Windows PowerShell, or SQL Server tools. End result for all 3 methods are same, which method is suitable for you, its depend upon on your requirement.

If you have access SQL Server with full control then you can use sql backup & restore method. In many cases, SharePoint admin dont have access to the SQL server with full permission so that they prefer to use the windows powershell/ central admin approach.

Another thing, in the backup-spfarm & restore-spfarm, you have to make sure both farm at the same version level, But in the SQL backup, if your target farm is higher version then still you able to restore it and upgrade the db.

read more here:

Backup Content Database.

Restore Content Database.

1

Keep in mind that a content database might contain more than one site collection, so using Backup-Restore in SQL and then mounting the database will move all site collections in that database. One the other hand using Backup/Restore-SPSite will backup and restore only ONE site collection.

The latter is preffered method by most people since it gives you more control over your backups. And yes, you can restore backups created by Backup-SPSite on any machine as long as it has the same version of SharePoint.

  • what I was going to write Before I acc. hit enter was:Thanks for your answer...in our case i am not interested of backup/restore on s single SC, since our main solution consists of 7. I was referring to Backup-Restore SP-Farm. Im not going to use it for backup in the "normal" sence, I want to have produciton data on my (and test) Environment for more realistic dev and test data/Environment. I still dont know the difference between ps-commands and doing it directly in DB, but the DB-style **seems ** more hacky – Cowborg Mar 16 '15 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.