Avamar:如何使用 dump_root_hashes.rb 指令檔產生用戶端和備份清單

摘要: 如何使用 Avamar 工程部門指令檔「dump_root_hashes.rb」產生用戶端和備份清單。 這有助於故障診斷容量、複寫和其他問題。本文過去稱為 KB 502709。

本文章適用於 本文章不適用於 本文無關於任何特定產品。 本文未識別所有產品版本。

說明

本文討論 Avamar 工程部門指令檔「dump_root_hashes.rb」的功能,並為讀者提供其使用的基本指南。

 

注意:此指令檔依照「現狀」提供,用於故障診斷 Avamar 問題。它「不是」Avamar 產品的支援元件。

 

典型使用案例:

  • 在系統上產生用戶端及其屬性 (例如用戶端 ID、網域) 的清單。
  • 比較兩個系統之間的用戶端清單。
  • 產生 Avamar 格線上所有備份及其屬性的清單。其中包括根雜湊、大小、附掛程式 ID、網域、用戶端名稱、到期日、保留和大小。
  • 比較儲存在一對複寫 Avamar 格線上的備份 (有助於識別遺失或剩餘的備份,依 Avamar:複寫配對顯示不同的容量用量層級。如何調查原因。您可能需要登入 Dell 支援才能存取本文。)

指令檔知道從 Avamar 執行但傳送至 Data Domain 的備份。

 

下載指令檔:

如需尋找和下載指令檔的相關資訊,請參閱下列文章:Avamar:如何從 Dell Central Avamar 頁面尋找和下載 Avamar 指令檔和工具

 

執行指令檔:

執行指令檔時,在指令檔名稱前面加上「ruby」(如下所示):

ruby dump_root_hashes.rb --help
Starting up dump_root_hashes.rb version 0.10.2 at 2019-10-21 02:17:21 +0000 (2019-10-21 02:17:21 UTC)

Usage: dump_root_hashes.rb [options]

Overview of the script's features
Running the script with the --help flag shows a list of features.  Below is output showing features of the script as of release 0.10.2.


Options:
    -q, --quiet                      Suppress progress counters
        --mode=<backuplist|backupcompare|clientlist|clientcompare|genpasswordfile|connchk>

                                     Specify the script mode. Supported modes:
                                     backuplist (default) - generate a report showing the list of all backups on the system; include the following information:
                                       -system name
                                       -client name
                                       -domain
                                       -backup create time
                                       -backup expiration time
                                       -retention tags
                                       -backup size
                                       -root hash
                                     backupcompare - generate a report showing backup information for both source and target; requires a --dstaddr parameter
                                     clientlist - generate a report showing the client information for all client accounts
                                     clientcompare - generate a report showing the client information for both source and target; requires a --dstaddr parameter
                                     genpasswordfile - generate a file containing obfuscated login credentials
                                     connchk - run a GSAN connectivity test
    -s, --srcaddr=ADDRESS            Specify the replication source. Defaults to the local system.
        --src-password-file=FILENAME Specify a file containing credentials for the source system. Only needed if source and destination passwords differ.
    -d, --dstaddr=ADDRESS            Specify the replication destination for "compare" modes
        --dst-password-file=FILENAME Specify a file containing credentials for the destination system. Only needed if source and destination passwords differ.

Filtering Options:

NOTE: Filter flags apply to BOTH source AND destination systems unless otherwise noted!

        --before=DATE                Only report on backups created before DATE.
                                     This date can be any string understood by the GNU "date" utility.
        --after=DATE                 Only report on backups created after DATE.
                                     This date can be any string understood by the GNU "date" utility.
        --srcpath=PATH               Limit reporting on the source system to domains and clients under the specified path.
        --dstpath=PATH               Limit reporting on the destination system to domains and clients under the specified path.
        --mc-deleted=<include|skip>  Skip the MC_DELETED domain by default
        --mc-retired=<include|skip>  Traverse the MC_RETIRED domain by default
        --partials=<include|skip>    Skip partial backups by default
        --expired=<include|skip>     Skip expired backups by default
        --replicate=<include|skip>   Traverse the REPLICATE domain by default
        --system-accounts=<include|skip>
                                     Skip the system accounts MC_BACKUPS, EM_BACKUPS, AVI_BACKUPS, etc. by default
        --adme=<include|skip>        Skip the ADME domain by default

Output Options:

        --outfile=FILENAME           The report is written to this file.
                                     Defaults to "<mode>.csv", where <mode> is the script mode.
                                     The file is overwritten if it exists.
        --format=<csv>               Data format to use for export. Supported formats:
                                     csv (default) - comma separated values; suitable for spreadsheet import
        --[no-]showprectime          Include the backup creation precision time in report
        --[no-]show-ddr-info         Include DDR presence information and ddrindex in report
        --[no-]show-tier-info        Include cloud tiering information in report
        --[no-]showbackuptype        Include the backup type (Full, Incremental+Full, etc. in report
        --[no-]showhybridbackups     Detect hybrid backups, where a DD backup has data on GSAN (slow)
        --hybridsearchtimeout=n      How long to wait for hybrid backup search avtar calls to return in seconds. Defaults to 300s. Set to 0 to disable timeout.
        --[no-]showlabel             Include the backup's text label in report
        --[no-]showpidnum            Include the backup's plugin id (pid number / pidnum) in report
        --[no-]showpiddesc           Include a short plugin description for each backup in report
        --compression=<none|gzip>    Use the specified compression for the output file. Defaults to gzip.
        --presence=src,dst,both      Limit output to records only on the src, only on the dst, on both systems, or some combination thereof
                                     Shows all records by default (equivalent to --presence=src,dst,both)
        --[no-]header                Include the header line in CSV files

Script Options:

        --debug                      Enable debug logging.
        --memory-limit=n             How much virtual memory the script can use in bytes. Defaults to 4GB.
        --avmgrdebug=<none|getl|getb|all>
                                     Enable debugging for avmgr queries. Defaults to none.
        --avmgr-debug-file=FILENAME  Write avmgr debug information to the specified file. Defaults to drh_avmgr_debug.log.
        --getl-timeout=n             How long to wait for avmgr getl to return in seconds. Defaults to 60s. Set to 0 to disable timeout.
        --getl-retries=n             How many times to retry an avmgr getl command before giving up. Defaults to 5.
        --getb-timeout=n             How long to wait for avmgr getb to return in seconds. Defaults to 300s (5 minutes). Set to 0 to disable timeout.
        --getb-retries=n             How many times to retry an avmgr getb command before giving up. Defaults to 5.
        --encrypt=<none|proprietary|ssl|tls|tls-sa>
                                     Set encryption mode. Defaults to tls.
        --src-encrypt=<none|proprietary|ssl|tls|tls-sa>
                                     Set source encryption mode. Overrides --encrypt if both are specified. Defaults to tls.
        --dst-encrypt=<none|proprietary|ssl|tls|tls-sa>
                                     Set destination encryption mode. Overrides --encrypt if both are specified. Defaults to tls.
    -h, --help                       Display help text
    -v, --version                    Display version information

 

其他資訊

如何使用指令檔比較儲存在一對 Avamar 複寫格線上的備份:

指令檔 dump_root_hashes.rb 在客戶可能已設定一對複寫 Avamar 格線的情況下,可協助識別剩餘或遺失的備份。通常,我們的預期是類似的容量層級,至少複寫了前幾天的備份。

範例:
下列命令應在來源 Avamar 格線上執行。在命令中指定目標 Avamar Server 名稱,且 backupcompare 模式已叫用。(指令檔的最新版本會自動在 Data Domain 偵測到的任何備份上報告):

ruby dump_root_hashes.rb --dstaddr=<target-avamar-servername>

 

注意:如果來源和目標上的 Avamar 根帳戶密碼不相同,指令檔會失敗,並顯示下列錯誤:

 

Failed to connect to GSAN on avamar2.xxx.com. Check name resolution, network connectivity, and firewall settings.

為了讓指令檔順利執行,必須以「genpasswordfile」模式執行指令檔,以產生經過模糊處理的密碼檔案。

 

基於安全考量,無法使用命令列將認證資料直接傳遞到指令檔:

admin@avamar1:~/>: ruby dump_root_hashes.rb --mode=genpasswordfile
Starting up dump_root_hashes.rb version 0.8.3 at 2018-02-16 14:14:34 +0000 (2018-02-16 14:14:34 UTC)

Running in password file generation mode.

Password filename: avamar2.pass
Username [root]:
Password:

Encoding password
Writing encoded password to /space/home/admin/avamar2.pass

Password information successfully written to /space/home/admin/avamar2.pass

Use --src-password-file=/space/home/admin/avamar2.pass or --dst-password-file=/space/home/admin/avamar2.pass to pass these credentials into the script.

然後,可以使用上述其中一個參數將此密碼檔傳遞到指令檔 (取決於您是嘗試遠端連線到來源或目標)。

 

範例:

ruby dump_root_hashes.rb --dstaddr=<target-avamar-servername> --dst-password-file=<path-to-password-file> --show-ddr-info

 

指令檔執行完成後,即會產生一個 .csv 檔案,其格式類似於以下內容:
backupcompare_<source>_to_<target>.domain.com_YYYY-MM-DD_HHMM

 

檔案可以在 Excel 中開啟,並使用以下欄名稱進行格式化:

  • 金鑰
  • 根雜湊
  • 在 Data Domain 上
  • 來源格線
  • 來源網域
  • 來源用戶端
  • src_created (UTC)
  • src_expires (UTC)
  • src_retention_type
  • src_bytes
  • src_labelnum
  • src_ddrindex
  • 目的地格線
  • 目的地網域
  • 目的地用戶端
  • dst_created (UTC)
  • dst_expires (UTC)
  • dst_retention_type
  • dst_bytes
  • dst_labelnum
  • dst_ddrindex

這些欄可用於對資料進行排序和篩選。

 

在這種情況下,特別有用的是第一欄「金鑰」。此處的值表示備份是儲存在來源系統 (S) 上、目的地 (D) 上,還是儲存在兩個系統 (B) 上。

 

我們預期來源系統可能有目標上 (尚) 沒有的備份。這是由於備份寫入來源備份和複寫到目標 (通常在隔天內) 之間的自然延遲。

 

觀看本影片:

 

受影響的產品

Avamar

產品

Avamar Server
文章屬性
文章編號: 000019732
文章類型: How To
上次修改時間: 24 7月 2024
版本:  16
向其他 Dell 使用者尋求您問題的答案
支援服務
檢查您的裝置是否在支援服務的涵蓋範圍內。