Авамар: Як використовувати скрипт dump_root_hashes.rb для створення списку клієнтів і резервних копій

Summary: Як використовувати скрипт Avamar Engineering "dump_root_hashes.rb" для створення списку клієнтів і резервних копій. Це може бути корисним для усунення несправностей ємності, реплікації та інших проблем. Ця стаття історично була відома як KB 502709. ...

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

У цій статті розглядаються особливості сценарію Avamar Engineering "dump_root_hashes.rb» і надає читачеві основні вказівки щодо його використання.

 

Примітка: Цей скрипт надається «як є» для усунення проблем з Avamar. Він НЕ є підтримуваним компонентом продукту Avamar.

 

Типові випадки використання:

  • Формування списку клієнтів та їх властивостей (наприклад, ідентифікатор клієнта, домен) у системі.
  • Порівняння списку клієнтів між двома системами.
  • Створення списку всіх резервних копій у сітці Avamar та їх властивостей. До них відносяться кореневий хеш, розмір, ідентифікатор плагіна, домен, ім'я клієнта, термін дії, утримання та розмір.
  • Порівняння резервних копій, які зберігаються в парі реплікуючих сіток Avamar (корисно для виявлення відсутніх або надлишкових резервних копій для Avamar: Пара, що реплікується, показує різні рівні використання потужності. Як з'ясувати причини. Можливо, доведеться увійти в службу підтримки Dell, щоб отримати доступ до цієї статті.)

Скрипт знає про резервні копії, які запускаються з Avamar, але надсилаються до Data Domain.

 

Завантаження скрипта:

Перегляньте наступну статтю, щоб дізнатися більше про пошук і завантаження скрипта: Авамар: Як знайти та завантажити сценарії та інструменти Avamar зі сторінки Dell Central 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 у команді та піктограму 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 і відформатувати з такими іменами стовпців:

  • Ключ
  • Хешування коренів
  • Про домен даних
  • Сітка джерела
  • Вихідний домен
  • Клієнт-джерело
  • 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).

 

Ми очікуємо, що вихідна система може мати резервні копії, яких (поки що) немає на цілі. Це пов'язано з природною затримкою між записом резервної копії у вихідну резервну копію та реплікацією до цілі (зазвичай протягом наступного дня).

 

Дивіться це відео:

 

Affected Products

Avamar

Products

Avamar Server
Article Properties
Article Number: 000019732
Article Type: How To
Last Modified: 24 Jul 2024
Version:  16
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.