Skip to content

Commit 6ca2d7e

Browse files
committed
add new environment variables
1 parent 47c5d9e commit 6ca2d7e

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

docs/configuration/dtable-db-conf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ General configuration options of the output of the SQL endpoint.
9696
<!-- md:version 3.0 -->
9797
<!-- md:feature -->
9898

99-
Section `[backup]` contains options to configure backup functions for big data backend:
99+
Section `[backup]` contains options to configure backup functions for big data backend.
100100

101101
| Parameter | Description | Default |
102102
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |

docs/configuration/dtable-events-conf.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ enabled = true
4646

4747
### `[DATABASE]`
4848

49-
??? success "Database can configure in .env"
49+
??? success "Database can be configured in .env"
50+
5051
From SeaTable 5.3, you can specify the database configurations in [`.env`](./environment-variables.md#table-of-settings). There is no need to keep this configuration in your `dtable-events.conf`.
5152

5253
| Parameter | Description | Default |
@@ -60,7 +61,7 @@ enabled = true
6061

6162
### `[REDIS]`
6263

63-
??? success "Redis can configure in .env"
64+
??? success "Redis can be configured in .env"
6465
From SeaTable 5.3, you can specify the redis configurations in [`.env`](./environment-variables.md#table-of-settings). There is no need to keep this configuration in your `dtable-events.conf`.
6566

6667
| Parameter | Description | Default |

docs/configuration/dtable-storage-server-conf.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,28 @@ openssl rand -base64 24
9797

9898
### `[snapshot]`
9999

100+
<!-- md:version 5.2 -->
101+
100102
| Parameter | Description | Default |
101103
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
102104
| `interval` | The interval for generating snapshots of a base, if there are changes to the base. Unit is in seconds. | 86400 |
103105
| `enable_cleanup` | Controls snapshot cleanup. Activate on only one node in multi-server setups. | true |
104106
| `keep_days` | Specifies the snapshot retention period in days. Older snapshots are deleted. As of version 5.2, the default is 180 days; previously, it was unlimited (0). | 180 |
105107
| `keep_frequency_days` | Specifies daily snapshot period for changed bases. After this, only one snapshot per month is kept. Default is 0 (always daily). Requires keep_days to be set and > `keep_frequency_days`. | 0 |
108+
| `cleanup_at` | Specifies the time when old snapshots are deleted. | 03:00 |
109+
110+
By default, SeaTable creates daily snapshots for changed bases, deleting snapshots older than 180 days. The cleanup
106111

107-
!!! warning "Example of new tiered snapshot retention"
112+
**Since version 5.2**, SeaTable offers a tiered retention strategy for snapshots. This approach balances recent, detailed backups with efficient long-term storage.
113+
For example, setting `keep_days = 180` and `keep_frequency_days = 7` would retail:
108114

109-
By default, SeaTable creates daily snapshots for changed bases, deleting snapshots older than 180 days.
115+
- Daily snapshots for the past week
116+
- Monthly snapshots for the past six months, except for the past week.
110117

111-
Since version 5.2, SeaTable offers a tiered retention strategy for snapshots. This approach balances recent, detailed backups with efficient long-term storage.
112-
For example, setting `keep_days = 180` and `keep_frequency_days = 7` would retail:
118+
#### Possible combinations of `keep_days` and `keep_frequency_days` for new tiered snapshot retention
113119

114-
- Daily snapshots for the past week
115-
- Monthly snapshots for the past six months, except for the past week.
120+
| Condition | Action |
121+
| --- | ---- |
122+
| `keep_days = 0` | No snapshots are deleted, no matter of `keep_frequency_days`. |
123+
| `keep_frequency_days = 0` and `keep_days > 0` | All snapshots older than `keep_days` are deleted. |
124+
| `keep_frequency_days > 0` and `keep_days > 0` | Snapshots older than `keep_days` are deleted immediately, while snapshots older than `keep_frequency_days` but not exceeding `keep_days` are grouped by month to apply frequency-based cleaning logic. |

docs/configuration/environment-variables.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,16 @@ SEATABLE_TEMPLATE_BASE_API_TOKEN=
5454
SEATABLE_TEMPLATE_TABLE_NAME=
5555
SEATABLE_ENABLE_CREATE_BASE_FROM_TEMPLATE=
5656

57+
# SeaTable Storage Server (Cleanup of snapshots)
58+
# not yet part of the seatable-server.yml
59+
#STORAGE_SERVER_ENABLE_SNAPSHOT_CLEANUP=
60+
#STORAGE_SERVER_SNAPSHOT_CLEANUP_AT=
61+
#STORAGE_SERVER_SNAPSHOT_KEEP_DAYS=
62+
#STORAGE_SERVER_SNAPSHOT_KEEP_FREQUENCY_DAYS=
63+
5764
# Logging
5865
SEATABLE_LOG_LEVEL=INFO # (10)!
66+
#SEATABLE_LOG_TO_STDOUT=
5967

6068
# Docker Images
6169
# You can use these variables to override the default images

0 commit comments

Comments
 (0)