使用 CSV 或 JSON 檔案,將工作大量上傳至移轉管理員Bulk upload tasks into Migration Manager using a CSV or JSON file

將工作大量上傳到移轉管理員有兩種不同的方法。There are two different methods available to bulk upload tasks into Migration Manager. 其中一個是使用逗號分隔 (CSV) 檔案,另一個則是使用 JSON 檔案。One is using a comma-separated (CSV) file, and the other is to use a JSON file.

請以您選擇的格式手動輸入項目。The entries are manually entered by you into whichever format you choose. 系統會驗證第一列,以確保目的地連結有效。The first row is validated to make sure the destination links are valid. 如果收到無效目的地錯誤,請務必檢查其餘的工作,以確保它們擁有有效的目的地。If you receive an invalid destination error, make sure to also check the remainder of your tasks to ensure they have valid destinations.

注意

如果要移轉至 OneDrive 帳戶,請先確認已預先佈建帳戶,然後再進行移轉。If you are migrating to OneDrive accounts, make sure the accounts are pre-provisioned before you migrate. 您可以使用指令碼來執行此動作,如這裡所示:為您組織中的使用者預先佈建 OneDriveYou can do this using a script, as shown here: Pre-provision OneDrive for users in your organization.

使用逗號分隔值 (CSV) 檔案大量上傳Using a comma-separated value (CSV) file for bulk upload

移轉管理員可讓您使用逗號分隔值 (CSV) 檔案來大量移轉您的資料。Migration Manager lets you use a comma-separated (CSV) file to bulk migrate your data. 您可以使用任何文字編輯器或 Excel 等應用程式來建立 CSV 檔案。Use any text editor, or an application like Excel, to create the CSV file.

CSV 檔案格式CSV file format

您的 CSV 檔案中必須有六欄:前三欄為來源值,分別提供您資料目前所在位置的詳細資料。There are six columns needed in your CSV file -- the first three are your source values, each providing detail about where your data is currently located. 後三欄則代表您要移轉資料的目的地網站、文件庫及選擇性指定的子資料夾。The remaining three columns indicate the site, document library and optional sub-folder to where you are migrating your data. 即使您不需要其中某個欄位的值,這六欄仍必須全部存在於檔案中。All six columns must be accounted for in the file, even if you are not needing a value for a given field.

以下是 CSV 檔案格式的範例。Here's an example of the format for the CSV file. 列會顯示正在從本機檔案共用中移轉的檔案。The rows show files that are being migrated from local file shares.

提示

下載使用 CSV 檔案大量上傳的範本: 移轉管理員大量上傳範本Download the template for bulk uploading using a CSV file: Migration Manager bulk upload template

使用 CSV 檔案時的格式範例

本範例示範它在.txt 檔案中如何顯示。This example shows how it would appear in a .txt file.

\\MigrationTests\testfiles,,,https://contoso.sharepoint.com/sites/sitecollection,Documents,SubFolderName
\\MigrationTests\testfiles,,,https://contoso-my.sharepoint.com/personal/user_contoso_onmicrosoft_com,Documents,

重要

Do not include a header row in your CSV file.Do not include a header row in your CSV file. 請記得,即使您不需要其中某個欄位的值,六欄仍必須全部存在於檔案中。Remember to account for all six columns in the file, even if you are not needing a value for a given field. CSV 檔案的編碼必須是 UTF-8。The encoding of the CSV file must be UTF-8.

若要針對資料移轉建立 CSV 檔案To create a CSV file for data migration

下列範例使用 Excel 來建立 CSV 檔案。The following example uses Excel to create the CSV file.

  1. 啟動 Excel。Start Excel.

  2. 輸入您移轉工作所使用的值。每一列各輸入一個移轉來源和移轉目的地。如需各欄的解說,請參閱下方的參考表格。Enter the values for your migration jobs. Enter one migration source and destination per row. See the reference table below for further explanation of columns.

    • 欄 A: 輸入檔案共用路徑。Column A: Enter a file share path. 必要欄位。Required.

    • 欄 B: 保留此欄為 空白Column B: Leave this column blank. 此欄不適用於檔案共用移轉。This column does not apply to file share migration.

    • 欄 C: 保留此欄為 空白Column C: Leave this column blank. 此欄不適用於檔案共用移轉。This column does not apply to file share migration.

    • 欄 D: 輸入檔案要移轉至的 SharePoint 網站 URL。Column D: Enter the SharePoint site URL where the files are to be migrated. 必要欄位。Required.

    • 欄 E: 輸入檔案要移轉至的 SharePoint 網站文件庫名稱。Column E: Enter the name of the document library in the SharePoint site where the files are to be migrated. 必要欄位。Required.

    • 欄 F: 輸入文件庫中子資料夾的名稱。如果此欄留空,則檔案會移至根層級。選擇性。Column F: Enter the name of the subfolder in the document library. If this column is left empty then the files will be moved to the root level. Optional.

  3. 關閉並儲存為以逗號分隔 (*.csv) 檔案。Close and save as a Comma delimited (*.csv) file.

使用 JSON 檔案進行大量上傳Using a JSON file for bulk upload

下列範例示範在移轉您的資料時所使用的 JSON 格式。The following example shows the JSON format used in migrating your data.

所需的最小值為 SourcePath、TargetPath 和 TargetList。The minimum required values are SourcePath, TargetPath and TargetList.


{

  "Tasks": [

    {
      "SourcePath": "\\\\contoso\\fileshare\\dept1",
      "TargetPath": "https://a830edad9050849387E18042320.sharepoint.com",
      "TargetList": "Documents",
      "TargetListRelativePath": "dept1",

      "Settings": {

        "MigrateHiddenItems": true,
        "MigrateItemsCreatedAfter": "2016-05-22",
        "MigrateItemsModifiedAfter": "2016-05-22",
        "SkipFilesWithExtensions": "txt:mp3",
        "FilterOutPathSpecialCharacters": false,
        "MigrateOneNoteNotebook": true
      }
    },

    {

      "SourcePath": "\\\\contoso\\fileshare\\dept2",
      "TargetPath": "https://a830edad9050849387E18042320.sharepoint.com",
      "TargetList": "Documents",
      "TargetListRelativePath": "dept2",

      "Settings": {

        "MigrateHiddenItems": true,
        "MigrateItemsCreatedAfter": "2016-05-22",
        "MigrateItemsModifiedAfter": "2016-05-22",
        "SkipFilesWithExtensions": "txt:mp3",
        "MigrateOneNoteNotebook": false,
        "FilterOutPathSpecialCharacters": false,

      }

    }
  ]
}