mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Rename the name of the utility "backupview" -> "clickhouse_backupview".
This commit is contained in:
parent
f12b95df7d
commit
a4d57fe108
@ -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/")
|
||||
|
@ -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.
|
||||
|
@ -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/")
|
||||
|
@ -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.
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user