Avamar:如何使用 dump_root_hashes.rb 脚本生成客户端和备份列表

Sammanfattning: 如何使用 Avamar 工程脚本“dump_root_hashes.rb”生成客户端和备份列表。 这有助于对容量、复制和其他问题进行故障处理。本文曾经称为 KB 502709。

Den här artikeln gäller för Den här artikeln gäller inte för Den här artikeln är inte kopplad till någon specifik produkt. Alla produktversioner identifieras inte i den här artikeln.

Instruktioner

本文讨论 Avamar 工程脚本“dump_root_hashes.rb”的功能,并为读者提供了有关其使用的基本指导。

 

提醒:此脚本按“原样”提供,用于对 Avamar 问题进行故障处理。它不是 Avamar 产品支持的组件。

 

典型应用场景:

  • 在系统上生成客户端及其属性(例如客户端 ID、域)的列表。
  • 比较两个系统的客户端列表。
  • 生成 Avamar 网格上所有备份及其属性的列表。这包括根哈希、大小、插件 ID、域、客户端名称、到期时间、保留期和大小。
  • 比较一对复制 Avamar 网格上存储的备份(有助于根据以下文章确定缺少或多余的备份:Avamar:复制对显示不同的容量用量水平。如何调查原因。可能需要登录戴尔支持才能访问这篇文章。)

脚本会知道从 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

 

Ytterligare 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 中打开,其各列的名称如下:

  • Key
  • Root Hash
  • On Data Domain
  • Source Grid
  • Source Domain
  • Source Client
  • 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

这些列可用于对数据进行排序和筛选。

 

在这种情况下,第一列“Key”特别有用。此处的值指示备份是存储在源系统 (S)、目标系统 (D),还是同时存储在两个系统 (B) 上。

 

我们预计源系统可能有(尚未)存储到目标系统上的备份。这是由于备份写入源系统与复制到目标系统之间存在自然的滞后(通常在下一天内)。

 

请观看此视频:

 

Berörda produkter

Avamar

Produkter

Avamar Server
Artikelegenskaper
Artikelnummer: 000019732
Artikeltyp: How To
Senast ändrad: 24 juli 2024
Version:  16
Få svar på dina frågor från andra Dell-användare
Supporttjänster
Kontrollera om din enhet omfattas av supporttjänster.