---
schema_version: "1"
id: 8db28e17802a40e0d0c81c2f04de3d242de6aa91a6e9aef52a06982948cdf50e
title: tsm File Paths
collection: tableau
version: current
locale: zh-tw
portal_url: https://docs.salesforce.com/tableau/current/zh-tw/server/cli_default_filepaths_tsm.md
canonical_url: https://help.tableau.com/current/server/zh-tw/cli_default_filepaths_tsm.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 5141ea4507f16644948f4e2eb171b79110d3c20d117ba1d57c7d53233bcd0ae3
description: View and change the default file path locations tsm commands use for backups and other files.
---
[跳至主要內容](#main-content)

# tsm File Paths

某些 tsm 命令都從預設位置讀取檔或將檔案寫入預設位置。這些預設位置由為每個命令定義的 `basefilepath` 設定金鑰確定。可以使用 tsm 檢視金鑰的當前值，並變更位置。

### NetworkService 系統帳戶

在某些組織中，會實作限制系統帳戶的檔案存取的安全性原則，例如 NetworkService 帳戶。如果變更 tsm 檔案路徑，則應驗證 NetworkService 系統帳戶是否擁有所產生路徑的完整權限（且已啟用權限繼承）。此外，如果您變更原本在 `*\data\tabsvc\*` 路徑中的檔案路徑，就必須將 NetworkService 權限保留為原始路徑。之所以必須保留此權限，是因為 NetworkService 系統帳戶會透過 Tableau Server 管理控制項目、Tableau Server Client File Service 以及 Tableau Server Coordination Service 等處理作業。

### 備份/還原檔案位置的權限

備份/還原檔案位置所需的權限：

- NetworkService：讀/寫/執行權限
- 執行身份服務帳戶：讀/寫/執行權限

## 檔的預設位置

在 `tsm maintenance backup`、`restore` 和 `ziplogs` 流程以及 `tsm sites export` 和 `sites import` 流程期間，Tableau Server 為這些命令建立或使用的檔案使用預設位置。

有關備份 Tableau Server 之磁碟空間要求的詳情，請參閱[用於備份的磁碟空間使用情況](https://help.tableau.com/current/server/zh-tw/db_backup.htm#BackupDiskSpaceReqs)。

預設情況下：

- Tsm 維護命令
    
    - **backup** — 備份 `.tsbak` 檔案在初始節點上資料目錄的臨時位置中建立，然後儲存在：
        
        `<install drive>:<install\path>\data\tabsvc\files\backups`
        
        預設情況下，此目錄為：
        
        `` `C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\backups\` ``
        
        但如果您將 Tableau 安裝到非預設位置，就會有所不同。例如，若您安裝至 `D:\Tableau Server`，則備份將會儲存在：
        
        `D:\Tableau Server\data\tabsvc\files\backups`
        
        **附註：** tsm 維護備份命令不支援 Microsoft Windows 通用命名慣例 (UNC) 檔案路徑（亦稱為「網路路徑」，例如，\\\\<computer name>\\<folder>\\<file name>）作為備份檔案寫入位置的路徑。請改用本機檔案系統路徑（<drive letter>:\\<folder name\\<file name>）。
        
        - **backup**— 臨時暫存位置。備份 `.tsbak` 檔案在初始節點上資料目錄的臨時位置中建立。
            
            從版本 2026.2.0 開始，可以指定用於建立備份檔案的備用臨時位置。若備份檔案很大或初始節點上的空間有限，這可能很有用。有關詳情，請參閱 [Backuprestore.use\_custom\_staging\_dir.enabled](https://help.tableau.com/current/server/zh-tw/cli_configuration-set_tsm.htm#backuprestore_staging)。
    - restore — restore 過程從以下位置還原備份檔案：
        
        `<install drive>:<install\path>\data\tabsvc\files\backups`
        
        預設情況下，此目錄為：
        
        `` `C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\backups\` ``
        
        但如果您將 Tableau 安裝到非預設位置，就會有所不同。例如，如果您已安裝至 `D:\Tableau Server`，還原處理序將使用以下位置的備份：
        
        `D:\Tableau Server\data\tabsvc\files\backups`
    - ziplogs — 將在以下位置中產生 ziplogs 檔：
        
        `<install drive>:<install\path>\data\tabsvc\files\log-archives`
        
        預設情況下，此目錄為：
        
        `C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\log-archives`
        
        但如果您將 Tableau 安裝到非預設位置，就會有所不同。例如，如果您已安裝至 `D:\Tableau Server`，將在以下位置產生 ziplogs 檔案：
        
        `D:\Tableau Server\data\tabsvc\files\log-archives`
- tsm sites
    
    - export — 將在以下目錄中產生匯出 .zip 檔案：
        
        `<install drive>:<install\path>\data\tabsvc\files\siteexports`
        
        預設情況下，此目錄為：
        
        `C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\siteexports`
        
        但如果您將 Tableau 安裝到非預設位置，就會有所不同。例如，如果您已安裝至 `D:\Tableau Server`，將在以下位置產生匯出 .zip 檔案：
        
        `D:\Tableau Server\data\tabsvc\files\siteexports`
    - import — 在匯入過程中，Tableau Server 將在以下位置中尋找檔：
        
        `<install drive>:<install\path>\data\tabsvc\files\siteimports`
        
        預設情況下，此目錄為：
        
        `C:\ProgramData\Tableau\Tableau Server\data\tabsvc\files\siteimports`
        
        但如果您將 Tableau 安裝到非預設位置，就會有所不同。例如，如果您已安裝至 `D:\Tableau Server`，匯入處理序將在以下位置尋找檔案：
        
        `D:\Tableau Server\data\tabsvc\files\siteimports`

## 獲取當前檔案位置

可以使用 `tsm configuration get` 查看特定命令的當前檔案位置：

- 對於 tsm 維護命令：
    
    - 備份與還原 ：
        
        `tsm configuration get -k basefilepath.backuprestore`
    - ziplogs：
        
        `tsm configuration get -k basefilepath.log_archive`
- 對於 tsm 網站命令：
    
    - export
        
        `tsm configuration get -k basefilepath.site_export.exports`
    - import
        
        `tsm configuration get -k basefilepath.site_import.exports`

## 變更目前 basefilepath 位置

可以使用 `tsm configuration set` 命令更新 `basefilepath` 變數來變更 TSM 用於檔案動作的某些位置。有關特定基底檔案路徑的詳情，請參閱 [tsm configuration set 選項](https://help.tableau.com/current/server/zh-tw/cli_configuration-set_tsm.htm)。

變更 `basefilepath` 變數不會將現有檔案從原始目錄移動至新目錄。如果希望現有備份、還原、記錄檔或者網站匯出或匯入檔位於指定的新目錄中，您必須手動移動這些檔。您負責建立新的位置並設定正確的使用權限，以允許 TSM 存取將放置在那裡的任何檔，以及包含這些檔的目錄結構。若變更備份/還原基本檔案路徑，則應執行 [tsm maintenance validate-backup-basefilepath](https://help.tableau.com/current/server/zh-tw/cli_maintenance_tsm.htm#tsmValidateBackupBasefilepath) 命令（在 2022.1 及更高版本中可用），以驗證權限設定是否正確。

在將備份檔案儲存到 `basefilepath.backuprestore` 變數指定的位置 之前，`tsm maintenance backup` 命令會使用資料目錄中的臨時暫存位置進行檔案動作（組合、擷取）。從版本 2026.2.0 開始，若將 TSM 設定為使用 `basefilepath.backuprestore` 指定的位置，則備份會在 `basefilepath.backuprestore` 指定位置下的臨時子目錄中進行組合。對於 2026.2.0 之前的版本，變更 basefilepath 不會影響 `tsm maintenance backup` 命令組合備份檔案的位置。

無法在磁碟機根目錄指定 `basefilepath.backuprestore` 位置。它必須在資料夾中。

- 對於 tsm 維護命令：
    
    - `backup` 與 `restore`
        
        若要變更 `restore` 和 `backup` 使用的目錄， 請執行以下命令：
        
        `tsm configuration set -k basefilepath.backuprestore -v "<drive>:\new\directory\path"`
    - `backup` 暫存位置
        
        **附註：**從版本 2026.2.0 開始，即可使用變更暫存位置的功能。
        
        若要將 `backup` 使用的臨時暫存位置變更為 `basefilepath.backuprestore` 位置下的子目錄，請執行以下命令：
        
        `tsm configuration set -k backuprestore.use_custom_staging_dir.enabled -v true`
        
        設定為 `true`時，`backup` 命令會使用 `basefilepath.backuprestore` 值指定位置下的臨時目錄。
    - 變更 ziplogs 目錄：
        
        `tsm configuration set -k basefilepath.log_archive -v "<drive>:\new\directory\path"`
- 對於 tsm 網站命令：
    
    - 變更網站匯出目錄：
        
        `tsm configuration set -k basefilepath.site_export.exports -v "<drive>:\new\directory\path"`
    - 變更網站匯入目錄：
        
        `tsm configuration set -k basefilepath.site_import.exports -v "<drive>:\new\directory\path"`

變更預設檔位置之後，您需要執行以下操作：

1. 套用暫止的變更：
    
    `tsm pending-changes apply`
    
    如果擱置組態需要重新啟動伺服器，`pending-changes apply` 命令將顯示提示，讓您知道即將重新啟動。即使伺服器已停止，也會顯示提示，但在這種情況下不會重新啟動。您可以使用 `--ignore-prompt` 選項隱藏提示，但這樣做不會改變重新啟動行為。如果變更不需要重新啟動，則不會出現提示即可套用變更。有關詳情，請參閱 [tsm pending-changes apply](https://help.tableau.com/current/server/zh-tw/cli_pending-changes.htm#pending-changes-apply)。
2. 停止 Tableau Server：
    
    `tsm stop`
3. 重新開機 TSM 控制項目：
    
    `net stop tabadmincontroller_0`
    
    `net start tabadmincontroller_0`
4. 等待幾分鐘，重新啟動控制項目。您可以使用此命令確認控制項目是否已重新啟動：
    
    `tsm status -v`
    
    當您可以執行該命令並且 Tableau Server 管理控制項目被列為 \[正在執行\] 時，控制項目已重新啟動。
5. 啟動 Tableau Server：
    
    `tsm start`