iT邦幫忙

0

關於SharePoint Foundation 2010 的網站匯入與匯出

你好, 我的作業環境是 Windows 2008 R2 + SharePoint Foundation 2010
我需要將目前線上使用的 SharePoint 網站 遷移到 一個測試用的 伺服器主機做為開發測試用。
目前上線的 SharePoint Foundation 2010 網站內部的 url 是 http://web01
要進行測試的 SharePoint Foundation 2010 網站內部的 url 是 http://web02
匯出網站的資料會放在檔案伺服器, 路徑是 \\filesvr\expweb
我使用以下的指令匯出網站可以順利完成 :
Export-SPWeb -Identity http://web01 -Path \\filesvr\expweb\web_export.cmp -IncludeUserSecurity -IncludeVersions All -Verbose
但是我用以下的指令匯入網站的時候卻發生錯誤:
Import-SPWeb -Identity http://web02 -Path \\filesvr\expweb\web_export.cmp -Verbose -Force
錯誤訊息如下 :
詳細資訊: 正在離開 Import-SPWeb 的 BeginProcessing 方法。
Import-SPWeb : 找不到含 Id or Url : http://web02 的 SPWeb 物件。
位於 線路:1 字元:1

  • Import-SPWeb -Identity http://web02 -Path \\filesvr\expweb\web_export.cmp ...
+ CategoryInfo : InvalidData: (Microsoft.Share...CmdletImportWeb:  
SPCmdletImportWeb) [Import-SPWeb],SPCmdletPipeBindException  
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb  
詳細資訊: 正在離開 Import-SPWeb 的 ProcessRecord 方法。  
詳細資訊: 正在離開 Import-SPWeb 的 EndProcessing 方法。
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

10
最佳解答

您犯了同一個問題...
http://ithelp.ithome.com.tw/question/10114251

Import-SPWeb -Identity http://web02 -Path \\filesvr\expweb\web_export.cmp -Verbose -Force

多了 -Verbose 不存在的參數... XD

SharePoint2010 Import-SPWeb 指令參考
http://technet.microsoft.com/zh-tw/library/ff607613%28v=office.14%29.aspx

CalvinKuo iT邦大師 7 級 ‧ 2013-01-24 16:27:37 檢舉

還有Import的指令Sample是錯的:
http://social.technet.microsoft.com/forums/en-US/sharepointadminprevious/thread/31ea320e-0e3f-4004-9e5e-4c25f11e83ea/

<pre class="c" name="code">C:\PS>Import-SPWeb http://site -Path export.cmp -UpdateVersions -Overwrite

changed the parameter -Updateversions -Overwrite to -Updateversions:Overwrite

你好, 我透過以下 get-item 指令可以顯示正式上線伺服器和測試伺服器兩個網站集合的版本都是 14.0.0.4762

(get-item "hklm:software\microsoft\shared tools\web server extensions\14.0").getvalue("version")

接下來 , 我使用以下指令 將 正式上線的 SharePoint 網站集合 還原到 測試伺服器的網站集合:
Restore-SPSite http://eiptest -Path \\FileServer\Spf_Bak\ExpData\20130128001exp.bak

之後在 SharePoint 管理介面裡, 卻一樣出現以下的錯誤訊息:
Restore-SPSite : 您的備份來自不同版本的 Microsoft SharePoint Foundation,且不能還原至執行目前版本的伺服器。備份檔案必須還原至具有版本 '4.0.145.0' 或更新版本的伺服器。

一直找不出問題到底出在哪裡,感謝你的說明,謝謝!

我要發表回答

立即登入回答