mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 15:06:37 +08:00
docs(i18n): 同步 24 篇旧英文文档与中文最新内容
guide 9 篇(quick-start/first-site/sso/troubleshooting/tunnel-usage/waf-usage/waf-ip-group-expr/credits/index)、deployment 7 篇(deployment/server/agent/relay/openflared/upgrade/index)、reference 3 篇(configuration/cli/index)、design 5 篇(architecture/agent-design/tunnel-design/waf-design/index)全部按中文最新版重写同步;waf-usage/waf-design 按新版 DAG 模型重写;修复 reference 中文锚点链接;vitepress 构建 43 个英文页面全绿
This commit is contained in:
@@ -1,52 +1,20 @@
|
||||
# Upgrade & Maintenance
|
||||
|
||||
You will learn: How to upgrade the Server and the Agent, how to clean up observability data, and which validation commands to execute before and after maintenance.
|
||||
You will learn: how to upgrade the Server and Agent, how to clean up observability data, and which verification commands to run before and after maintenance.
|
||||
|
||||
Before upgrading, verify the currently active version, the most recent Agent application results, and your database backup strategy. In production environments, never trigger upgrades while a configuration is being published, during large-scale Agent reconnections, or while database migrations are in progress.
|
||||
Before upgrading, confirm the current active version, the most recent Agent apply result, and the DB backup policy. In production, don't upgrade while a config release, a large-scale Agent reconnect, or a DB migration is in progress.
|
||||
|
||||
## Server Upgrade
|
||||
|
||||
Root users can check and trigger stable Server upgrades in the top header of the management console. You can also trigger upgrades by uploading the compiled Server binary in the console.
|
||||
|
||||
To deploy preview releases, manually check the GitHub Releases page. We highly recommend prioritizing stable releases in production environments.
|
||||
|
||||
Verify after upgrading:
|
||||
Pull the latest image and upgrade:
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
docker compose logs -n 100 openflare
|
||||
docker compose pull
|
||||
docker compose up
|
||||
```
|
||||
|
||||
If deployed from source, restart the Server and verify that no database migration or startup errors appear in the logs.
|
||||
For source deployments, restart the Server and confirm the logs show no DB migration or startup errors.
|
||||
|
||||
## Agent Upgrade
|
||||
|
||||
Node Agents automatically update following stable releases by default. Upgrading to preview releases requires a manual trigger.
|
||||
|
||||
You can re-execute the installation script to redeploy or force-update the Agent:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/install-agent.sh | bash -s -- \
|
||||
--server-url http://your-server:3000 \
|
||||
--agent-token YOUR_AGENT_TOKEN
|
||||
```
|
||||
|
||||
Note: Re-executing the current installation script wipes the entire installation directory, including the existing `agent.json`, local states, cached databases, and downloaded binaries. Ensure you have the node Token handy before executing the script.
|
||||
|
||||
Verify after upgrading:
|
||||
|
||||
```bash
|
||||
systemctl status openflare-agent
|
||||
journalctl -u openflare-agent -n 100 --no-pager
|
||||
```
|
||||
|
||||
## Data Maintenance
|
||||
|
||||
The management console's Settings page maintains options for automatic cleanup of observability data:
|
||||
|
||||
| Parameter | Description |
|
||||
| --- | --- |
|
||||
| `DatabaseAutoCleanupEnabled` | Toggles daily automatic cleanup |
|
||||
| `DatabaseAutoCleanupRetentionDays` | Data retention duration in days, minimum 1 day |
|
||||
|
||||
When enabled, the Server cleans up access logs, metrics snapshots, and request reports at 3:00 AM daily.
|
||||
The Agent only caches runtime config and state files locally — no business data. To upgrade, directly pull the latest image and recreate the container. For specific deployment commands and install methods, see **[Access Agent](./agent.md)**.
|
||||
|
||||
Reference in New Issue
Block a user