Avamar: dump_root_hashes.rb 스크립트를 사용하여 클라이언트 및 백업 목록을 생성하는 방법
Summary: Avamar 엔지니어링 스크립트 "dump_root_hashes.rb"를 사용하여 클라이언트 및 백업 목록을 생성하는 방법 이는 용량, 복제 및 기타 문제를 해결하는 데 유용할 수 있습니다. 이 문서는 이전에는 KB 502709로 알려져 있었습니다.
Instructions
이 문서에서는 Avamar 엔지니어링 스크립트 "dump_root_hashes.rb"의 기능에 대해 설명하고 독자에게 사용 방법에 대한 기본 지침을 제공합니다.
일반적인 활용 사례:
- 시스템에서 클라이언트 및 해당 속성(예: 클라이언트 ID, 도메인) 목록을 생성합니다.
- 두 시스템 간의 클라이언트 목록을 비교합니다.
- Avamar 그리드에 있는 모든 백업 및 해당 속성의 목록을 생성합니다. 여기에는 루트 해시, 크기, 플러그인 ID, 도메인, 클라이언트 이름, 만료, 보존, 크기가 포함됩니다.
- 복제 Avamar 그리드 쌍에 저장된 백업 비교(Avamar당 누락되거나 잉여 백업을 식별하는 데 유용함 복제 쌍이 서로 다른 수준의 용량 사용량을 표시합니다. 원인을 조사하는 방법. 이 문서에 액세스하려면 Dell Support에 로그인해야 할 수 있음)
이 스크립트는 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
Additional Information
스크립트를 사용하여 Avamar 복제 그리드 쌍에 저장된 백업을 비교하는 방법:
이 dump_root_hashes.rb 스크립트는 고객이 복제 Avamar 그리드 쌍을 구성한 경우 잉여 또는 누락된 백업을 식별하는 데 유용할 수 있습니다. 일반적으로 용량 수준이 비슷하며 최소한 이전 날짜의 백업이 복제될 것으로 예상됩니다.
예:
소스 Avamar 그리드에서 다음 명령을 실행해야 합니다. 명령에서 대상 Avamar Server 이름을 정확하게 입력하면 backupcompare 모드가 호출됩니다. (스크립트의 최신 버전은 Data Domain에서 감지된 모든 백업을 자동으로 보고함)
ruby dump_root_hashes.rb --dstaddr=<target-avamar-servername>
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
- Destination Grid
- Destination Domain
- Destination Client
- dst_created(UTC)
- dst_expires(UTC)
- dst_retention_type
- dst_bytes
- dst_labelnum
- dst_ddrindex
이러한 열을 사용하여 데이터를 정렬하고 필터링할 수 있습니다.
이 상황에서 특히 유용한 것은 첫 번째 열 'Key'입니다. 이 값은 백업이 소스 시스템(S)에 저장되는지, 대상(D)에 저장되는지 또는 두 시스템(B)에 저장되는지 여부를 나타냅니다.
타겟 시스템에 아직 없는 백업들이 소스 시스템에는 있을 것으로 예상합니다. 이는 백업이 소스 백업에 기록되고 타겟에 복제되는 시점(일반적으로 다음 날 이내) 사이에 자연스러운 지연으로 인해 발생합니다.
이 비디오를 시청하십시오.