Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
6380c7b
docs: v2.3.14
yinbo3 Nov 3, 2025
bf66ae7
minor
yinbo3 Nov 5, 2025
9b9ee36
minor
yinbo3 Nov 5, 2025
73e93da
minor
yinbo3 Nov 6, 2025
13a4c0a
minor
yinbo3 Nov 6, 2025
294da75
minor
yinbo3 Nov 6, 2025
f8a60af
add supported types
xiaopeng8570 Nov 6, 2025
4f513aa
minor
xiaopeng8570 Nov 6, 2025
151afee
minor
yinbo3 Nov 6, 2025
5027609
minor
yinbo3 Nov 6, 2025
1112c6e
support excludes
xiaopeng8570 Nov 6, 2025
38eebfd
minor
yinbo3 Nov 6, 2025
73ec630
minor
yinbo3 Nov 7, 2025
2ee63eb
minor
yinbo3 Nov 7, 2025
a88edd0
minor
yinbo3 Nov 7, 2025
ba7fac8
minor
yinbo3 Nov 7, 2025
cd12f1f
minor
yinbo3 Nov 7, 2025
6d02785
minor
yinbo3 Nov 7, 2025
a4ab055
minor
yinbo3 Nov 7, 2025
cf9ecca
minor
yinbo3 Nov 7, 2025
91a4ff4
minor
yinbo3 Nov 7, 2025
647f8b8
minor
yinbo3 Nov 7, 2025
496d2c8
minor
yinbo3 Nov 7, 2025
3f54e2f
minor
yinbo3 Nov 7, 2025
45f34c9
minor
yinbo3 Nov 7, 2025
4fa697e
minor
yinbo3 Nov 7, 2025
426db60
minor
yinbo3 Nov 7, 2025
9df0031
minor
yinbo3 Nov 7, 2025
967692d
minor
yinbo3 Nov 7, 2025
c71f707
minor
yinbo3 Nov 8, 2025
c2ca5ba
minor
yinbo3 Nov 8, 2025
a757d4f
change default host to peer address
xiaopeng8570 Nov 11, 2025
d34efc7
minor
yinbo3 Nov 11, 2025
df61925
minor
yinbo3 Nov 11, 2025
244e9c8
minor
yinbo3 Nov 11, 2025
f2cab7a
minor
yinbo3 Nov 11, 2025
bc40705
minor
yinbo3 Nov 11, 2025
a311dca
minor
yinbo3 Nov 11, 2025
9706b63
minor
yinbo3 Nov 11, 2025
a6cf58b
minor
yinbo3 Nov 11, 2025
5bd5ebf
minor
yinbo3 Nov 11, 2025
3a60723
minor
yinbo3 Nov 11, 2025
80ebc7e
minor
yinbo3 Nov 11, 2025
ef7eb68
change uds configure
xiaopeng8570 Nov 11, 2025
848bfb2
minor
yinbo3 Nov 12, 2025
ce9ca93
minor
yinbo3 Nov 12, 2025
b477058
minor
yinbo3 Nov 12, 2025
3ed74f0
minor
yinbo3 Nov 12, 2025
fd6d4a4
minor
yinbo3 Nov 13, 2025
2bfc223
minor
yinbo3 Nov 13, 2025
0766bd2
minor
yinbo3 Nov 13, 2025
fb171d6
minor
yinbo3 Nov 13, 2025
f968c42
minor
yinbo3 Nov 13, 2025
dc51fe0
minor
yinbo3 Nov 13, 2025
f2f7b1d
docs: prometheus
Ke-Wng Nov 13, 2025
0fcc3d7
minor
Ke-Wng Nov 13, 2025
3d0285a
minor
yinbo3 Nov 13, 2025
eae26b9
minor
yinbo3 Nov 13, 2025
f109722
minor
yinbo3 Nov 13, 2025
82b9e85
minor
yinbo3 Nov 13, 2025
9408126
minor
yinbo3 Nov 13, 2025
699933c
minor
yinbo3 Nov 13, 2025
d692e26
minor
yinbo3 Nov 13, 2025
0f4fbdb
minor
yinbo3 Nov 13, 2025
18510ba
minor
yinbo3 Nov 14, 2025
48bf16d
minor
yinbo3 Nov 14, 2025
c0b0537
minor
yinbo3 Nov 17, 2025
15e7709
Merge branch 'main' into docs/v2.3.14
yinbo3 Nov 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions CONTRIBUTING-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

欢迎您的参与,以帮助改善 Datalayers 文档。当您反馈问题,编辑、新增、翻译文档内容时,可以为 Datalayers 开源社区提供非常有价值的帮助。


## 目录

- [文档编写指南](#文档编写指南)
Expand All @@ -14,12 +13,10 @@
- [PR 自动检查](#pr-自动检查)
- [如何寻求帮助](#如何寻求帮助)


## 文档编写指南

为了确保文档的一致性,我们要求所有贡献者参考我们的 [文档编写指南](./DOCS-WRITING-GUIDE-CN.md),该指南对文档**目录配置**及 **Markdown 书写规范**进行了详细的说明。


## 如何贡献文档

Datalayers 的文档发布在 [https://docs.datalayers.io/](https://docs.datalayers.io/),您可以通过以下几种方式贡献文档。
Expand Down Expand Up @@ -70,7 +67,7 @@ todo截图

2. 将 Fork 的仓库 Clone 到本地,然后进入本地目录,添加上游仓库。

```
```shell
git remote add upstream https://github.com/datalayers-io/docs-datalayers.git
```

Expand Down Expand Up @@ -102,12 +99,10 @@ Datalayers 中文文档一般会先于英文文档发布,所以文档翻译大

回到步骤 2 里认领的 PR 里,依次添加 2 条评论:`/unlabel translation/doing` 及 `/label translation/done`,表明翻译已完成。


## PR 自动检查

文档项目将会根据 [文档编写指南](./DOCS-WRITING-GUIDE-CN.md) 里的规则进行自动检查,检查通过的 PR 才能被合并。假如你提 PR 时遇到了 markdownlint check 失败,报错信息里会明确提示哪一个文件的哪一行出了什么问题,请根据提示修改后再更新到 PR 里。


## 如何寻求帮助

在进行文档贡献时遇到任何问题,都可以通过以下方式联系我们获取帮助。
Expand All @@ -117,4 +112,3 @@ Datalayers 中文文档一般会先于英文文档发布,所以文档翻译大
todo截图

- 直接提交 GitHub Issue:[https://github.com/datalayers-io/docs-datalayers/issues/new](https://github.com/datalayers-io/docs-datalayers/issues/new)。

10 changes: 4 additions & 6 deletions CONTRIBUTING-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ Thank you for your contributions to Datalayers open-source project.
- [PR automatic check](#pr-automatic-check)
- [How to get help](#how-to-get-help)


## Documentation Writing Guide

To ensure consistency throughout all Datalayers documentation,
we kindly request all contributors reference our [Documentation Writing Guide](./DOCS-WRITING-GUIDE-EN.md).
This guideline provides detailed instructions on document **directory configuration** and **Markdown writing specifications**.


## How to contribute

Datalayers's documentation is published at [https://docs.datalayers.io/](https://docs.datalayers.io/).
Expand Down Expand Up @@ -82,7 +80,8 @@ We recommend first-time contributors to directly use the [Online editing](#onlin
1. Open the document repository [https://github.com/datalayers-io/docs-datalayers](https://github.com/datalayers-io/docs-datalayers) for Fork.

1. Clone the forked repository into your local workspace and then go to the local directory and add the upstream repository.
```

```shell
git remote add upstream https://github.com/datalayers-io/docs-datalayers.git
```

Expand All @@ -92,14 +91,14 @@ We recommend first-time contributors to directly use the [Online editing](#onlin
1. Optional: Checkout a work-branch `git checkout -b my-first-pr-branch-for-datalayers-1.0`

1. Edit, commit, and push the branch to your fork
```

```shell
git commit -a -m 'docs(WHICH_DOC): fix xxxx in WHICH_DOC'
git push origin my-first-pr-branch-for-datalayers-1.0
```

1. Create a Pull request from your forked repository to the upstream repository.


## PR automatic check

Document projects will be automatically checked according to the rules in the [Documentation Writing Guide](./DOCS-WRITING-GUIDE-EN.md).
Expand All @@ -111,5 +110,4 @@ so please follow the instructions to modify and update the PR.

If you encounter any problems when contributing to the documentation, you can contact us for getting help in the following methods.


- Submit the GitHub Issue directly: [https://github.com/datalayers-io/docs-datalayers/issues/new](https://github.com/datalayers-io/docs-datalayers/issues/new).
58 changes: 37 additions & 21 deletions dir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,21 @@
- title_en: Arrow Flight SQL
title_cn: Arrow Flight SQL
path: development-guide/arrow-flight-sql
- title_en: PostgreSQL Protocol
title_cn: PostgreSQL 协议
path: development-guide/postgresql/overview
- title_en: Prometheus Protocol
title_cn: Prometheus 协议
path: development-guide/prometheus/overview
- title_en: REST API
title_cn: REST API
collapsed: true
children:
- title_en: Authentication
title_cn: 认证
path: development-guide/auth-with-restapi
- title_en: Insert
title_cn: 数据写入
path: development-guide/insert-with-restapi
- title_en: Query
title_cn: 数据查询
path: development-guide/query-with-restapi
- title_en: ERROR CODE
title_cn: 错误码说明
path: development-guide/errno-with-restapi
- title_en: Multi-language Access Examples
title_cn: 多语言接入示例
path: development-guide/multi-language-examples
path: development-guide/rest-api/overview
- title_en: InfluxDB Line Protocol
title_cn: InfluxDB Line Protocol
path: development-guide/writing-with-influxdb-line-protocol
- title_en: Redis Protocol
title_cn: Redis 协议
path: development-guide/redis
- title_en: Table design best practices
title_cn: 数据表设计
path: development-guide/table-design/overview
Expand All @@ -98,7 +91,7 @@
path: development-guide/table-design/timeseries-table-design
- title_en: High-performance writing
title_cn: 高性能写入
path: development-guide/high-performance-writing
path: development-guide/high-performance-ingestion
- title_en: Query Performance Tuning
title_cn: 查询加速
path: development-guide/query-performance-tuning-overview
Expand Down Expand Up @@ -126,7 +119,7 @@
path: development-guide/query-optimization/hints/index
- title_en: Downsampling
title_cn: 时间窗口查询
path: development-guide/downsampling
path: development-guide/time-window-aggregation-query
- title_en: Object Storage
title_cn: 对象存储
path: development-guide/object-storage
Expand Down Expand Up @@ -352,6 +345,20 @@
title_cn: Redis 兼容性
path: key-value-data-model/redis-compatibility

- title_en: Prometheus
title_cn: Prometheus
collapsed: true
children:
- title_en: Overview
title_cn: 概述
path: prometheus/overview
- title_en: Quick Start
title_cn: 快速开始
path: prometheus/quick-start
- title_en: PromQL Compatibility
title_cn: PromQL 兼容性
path: prometheus/promql-compatibility

- title_en: Operation Guide
title_cn: 运维指南
collapsed: true
Expand Down Expand Up @@ -395,9 +402,15 @@
- title_en: Log Configuration
title_cn: 日志配置
path: admin/configuration-fields/log
- title_en: Audit logs
title_cn: 审计日志
path: admin/configuration-fields/audit-logs
- title_en: License Configuration
title_cn: License 配置
path: admin/configuration-fields/license
- title_en: MCP
title_cn: MCP 配置
path: admin/configuration-fields/mcp
- title_en: Command Line Interface
title_cn: 命令行接口
path: admin/datalayers-cli
Expand Down Expand Up @@ -444,8 +457,8 @@
title_cn: DBeaver
path: integration/datalayers-with-dbeaver
- title_en: User & Security
title_cn: 用户与安全
collapsed: false
title_cn: 安全与合规
collapsed: true
children:
- title_en: TLS
title_cn: 连接加密(TLS)
Expand Down Expand Up @@ -481,6 +494,9 @@
- title_en: Privileges
title_cn: 权限管理
path: user-security/rbac/privilege
- title_en: Audit Logs
title_cn: 审计日志
path: user-security/audit-logs
- title_en: Release Notes
title_cn: 版本发布说明
collapsed: true
Expand Down
Empty file added en_US/prometheus/overview.md
Empty file.
Empty file.
Empty file added en_US/prometheus/quick-start.md
Empty file.
Empty file.
23 changes: 22 additions & 1 deletion zh_CN/admin/backup-restore.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# 数据备份与恢复

## 概述

数据库备份和恢复的目的是为了保护数据安全,防止数据丢失或损坏。通过定期备份,能够在系统故障、硬件损坏或人为错误时,将数据库恢复到最近的可用状态,确保业务连续性和数据完整性。本章节主要介绍数据备份与恢复功能。

## 工具使用说明

`dldump` 工具提供了丰富的选项以供配置,您可以通过执行 `dldump --help` 以查看 `dldump` 的所有子命令和选项。此处对一些重要的选项进行说明:

| 参数 | <div style="width:40px">简写</div> | 描述 |
Expand All @@ -25,17 +27,21 @@
| --help | | show this help, then exit |

## 备份与恢复

以下通过一个示例来介绍 **dldump** 工具的使用。这个示例首先为单机版 Datalayers 写入一些数据,然后使用 **dldump** 将数据导出到备份目录;再创建一个新的 Datalayers 实例,从备份目录加载数据并写入到新的 Datalayers 实例;最后使用 **dlsql** 工具查询新的 Datalayers 实例,以验证成功执行了备份与恢复。

为方便叙述,本文将被备份的 Datalayers 实例称为 1 号节点,将被恢复的 Datalayers 实例称为 2 号节点。

### 准备工作

启动 1 号节点:

``` shell
datalayers standalone -c datalayers.toml
```

使用 `dlsql` 工具创建数据库 `test`、表 `device`、以及往 `device` 表写入一些数据,对应的 SQL 及输出如下:

``` sql
> CREATE DATABASE test;
Query OK, 0 rows affected. (0.001 sec)
Expand Down Expand Up @@ -66,40 +72,52 @@ Query OK, 10 rows affected. (0.002 sec)
```

### 数据备份

执行数据备份:

``` shell
dldump -h localhost -P 8360 -d test -o /tmp/datalayers/backup
```

该命令将 1 号节点的数据导出到指定的 `/tmp/datalayers/backup` 目录。

备份完成后,`/tmp/datalayers/backup` 目录将会有如下的层次结构:
```

```text
backup
- test
- create.sql
- device_0.parquet
```

根据 `dldump` 工具的设计,每个数据库会有一个独立的备份目录,这个目录会以数据库的名称命名。例如,`test` 数据库对应一个同名的 `test` 目录。数据库目录下存在一个 `create.sql` 文件,它里面包含了这个数据库的建库语句和每个表的建表语句。数据库目录下的其他文件则为表数据文件。表数据文件的命名规则是 `<table_name>_<sequence>.parquet`,`table_name` 为表名,如示例中的 `device` 表;`sequence` 表示该数据文件为这张表的第几个数据文件,`dldump` 会根据数据导出时的顺序对数据文件进行排序。

> **注**:如果您开启了文件系统的“显示隐藏文件和目录”的选项,那么您还会在 `test` 目录下发现 `.schema` 文件。为了保证数据恢复时的 schema 与备份时的一致,`dldump` 在备份时会将所有表的 schema 统一编码到 `.schema` 文件中,在恢复时再从中解码出 schema。

### 数据恢复

启动 2 号节点:

``` shell
datalayers standalone -c datalayers.toml
```

请注意,您需要对配置文件 `datalayers.toml` 做必要的修改。一方面,2 号节点使用的数据目录 `storage.local.path` 必须与 1 号节点不同,否则会导致恢复失败。另一方面,如果 1 号节点没有关闭,那么您需要改动 2 号节点使用的 SQL 服务端口 `server.port` 和 HTTP 服务端口 `server.http_port`,以确保其能够成功启动。

执行数据恢复:

``` shell
dldump -h localhost -P 8360 -i /tmp/datalayers/backup
```

该命令将从 `/tmp/datalayers/backup` 路径加载备份文件,并将数据写入到 2 号节点中。待该命令执行完成后,便完成了数据恢复。

### 验证数据

使用 `dlsql` 工具对 2 号节点执行查询,以验证恢复数据的完整性。

验证 `test` 数据库被成功恢复:

``` sql
> SHOW DATABASES;
+--------------------+---------------------------+
Expand All @@ -110,9 +128,11 @@ dldump -h localhost -P 8360 -i /tmp/datalayers/backup
+--------------------+---------------------------+
2 rows in set (0.003 sec)
```

> **注**:`information_schema` 是每个 Datalayers 实例自动生成的系统表组成的数据库,默认不会备份和恢复它。

验证 `test` 数据库的 `device` 表被成功恢复:

``` sql
> USE test;
Database changed to `test`
Expand All @@ -127,6 +147,7 @@ test> SHOW TABLES;
```

验证 `device` 表的所有数据被成功恢复:

``` sql
test> SELECT * FROM device;
+---------------------------+-----+-------+------+
Expand Down
Loading