diff --git a/docs/en/operations/utilities/backupview.md b/docs/en/operations/utilities/backupview.md index 773eb466711..c4f1cc0ae71 100644 --- a/docs/en/operations/utilities/backupview.md +++ b/docs/en/operations/utilities/backupview.md @@ -1,9 +1,11 @@ --- slug: /en/operations/utilities/backupview -title: backupview +title: clickhouse_backupview --- -Python module to help analyzing backups made by the [BACKUP command](https://clickhouse.com/docs/en/operations/backup) +# clickhouse_backupview {#clickhouse_backupview} + +Python module to help analyzing backups made by the [BACKUP](https://clickhouse.com/docs/en/operations/backup) command. The main motivation was to allows getting some information from a backup without actually restoring it. This module provides functions to @@ -15,7 +17,7 @@ This module provides functions to ## Example: ```python -from backupview import open_backup, FileInfo, S3 +from clickhouse_backupview import open_backup, S3, FileInfo # Open a backup. We could also use a local path: # backup = open_backup("/backups/my_backup_1/") diff --git a/docs/en/operations/utilities/index.md b/docs/en/operations/utilities/index.md index 15136f9dfb8..8959073d00e 100644 --- a/docs/en/operations/utilities/index.md +++ b/docs/en/operations/utilities/index.md @@ -16,4 +16,4 @@ pagination_next: 'en/operations/utilities/clickhouse-copier' - [clickhouse-disks](../../operations/utilities/clickhouse-disks.md) -- Provides filesystem-like operations on files among different ClickHouse disks. - [clickhouse-odbc-bridge](../../operations/utilities/odbc-bridge.md) — A proxy server for ODBC driver. -- [backupview](../../operations/utilities/backupview.md) — A python module to analyze ClickHouse backups. +- [clickhouse_backupview](../../operations/utilities/backupview.md) — A python module to analyze ClickHouse backups. diff --git a/docs/ru/operations/utilities/backupview.md b/docs/ru/operations/utilities/backupview.md index e64a75853e3..702fafadc17 100644 --- a/docs/ru/operations/utilities/backupview.md +++ b/docs/ru/operations/utilities/backupview.md @@ -1,8 +1,10 @@ --- slug: /en/operations/utilities/backupview -title: backupview +title: clickhouse_backupview --- +# clickhouse_backupview {#clickhouse_backupview} + Модуль на Питоне для анализа бэкапов, созданных командой [BACKUP](https://clickhouse.com/docs/ru/operations/backup) Главная идея этого модуля была в том, чтобы позволить извлечение информации из бэкапа без выполнения команды RESTORE. @@ -15,7 +17,7 @@ title: backupview ## Пример: ```python -from backupview import open_backup, S3 +from clickhouse_backupview import open_backup, S3, FileInfo # Открыть бэкап. Можно также использовать локальный путь: # backup = open_backup("/backups/my_backup_1/") diff --git a/docs/ru/operations/utilities/index.md b/docs/ru/operations/utilities/index.md index 68cdfab40af..9eb90a3037c 100644 --- a/docs/ru/operations/utilities/index.md +++ b/docs/ru/operations/utilities/index.md @@ -13,4 +13,4 @@ sidebar_position: 56 - [ClickHouse obfuscator](../../operations/utilities/clickhouse-obfuscator.md) — обфусцирует данные. - [ClickHouse compressor](../../operations/utilities/clickhouse-compressor.md) — упаковывает и распаковывает данные. - [clickhouse-odbc-bridge](../../operations/utilities/odbc-bridge.md) — прокси-сервер для ODBC. -- [backupview](../../operations/utilities/backupview.md) — модуль на Питоне для анализа бэкапов ClickHouse. +- [clickhouse_backupview](../../operations/utilities/backupview.md) — модуль на Питоне для анализа бэкапов ClickHouse. diff --git a/utils/backupview/backupview.py b/utils/backupview/clickhouse_backupview.py similarity index 100% rename from utils/backupview/backupview.py rename to utils/backupview/clickhouse_backupview.py diff --git a/utils/backupview/test/test.py b/utils/backupview/test/test.py index 561d3c22224..9a1dc5cab2e 100755 --- a/utils/backupview/test/test.py +++ b/utils/backupview/test/test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Tests for the backupview utility. +# Tests for the clickhouse_backupview utility. # Use pytest ./test.py to run. import pytest @@ -8,13 +8,12 @@ import pytest import os.path import sys import tempfile -import pathlib script_dir = os.path.dirname(os.path.realpath(__file__)) backupview_dir = os.path.abspath(os.path.join(script_dir, "..")) if backupview_dir not in sys.path: sys.path.append(backupview_dir) -from backupview import open_backup, FileInfo, ExtractionInfo +from clickhouse_backupview import open_backup, S3, FileInfo def calculate_num_files(dir):