-
Notifications
You must be signed in to change notification settings - Fork 1k
/
upgrade.md
51 lines (37 loc) · 2.93 KB
/
upgrade.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
id: upgrade
title: HertzBeat New Version Upgrade
sidebar_label: Version Upgrade Guide
---
**HertzBeat Release Version List**
- [Download Page](/docs/download)
- [Github Release](https://github.com/apache/hertzbeat/releases)
- [DockerHub Release](https://hub.docker.com/r/apache/hertzbeat/tags)
Apache HertzBeat (incubating)'s metadata information is stored in H2 or Mysql, PostgreSQL relational databases, and the collected metric data is stored in time series databases such as TDengine and IotDB.
**You need to save and back up the data files of the database and monitoring templates yml files before upgrading**
### Upgrade For Docker Deploy
1. If using custom monitoring templates
- Need to back up docker templates directory `docker cp hertzbeat:/opt/hertzbeat/define ./define` in the container `/opt/hertzbeat/define`
- `docker cp hertzbeat:/opt/hertzbeat/define ./define`
- And mount the template define directory when docker start `-v $(pwd)/define:/opt/hertzbeat/define`
- `-v $(pwd)/define:/opt/hertzbeat/define`
2. If using the built-in default H2 database
- Need to mount or back up `-v $(pwd)/data:/opt/hertzbeat/data` database file directory in the container `/opt/hertzbeat/data`
- Stop and delete the container, delete the local HertzBeat docker image, and pull the new version image
- Refer to [Docker installation of HertzBeat] (docker-deploy) to create a new container using a new image. Note that the database file directory needs to be mounted `-v $(pwd)/data:/opt/hertzbeat/data`
3. If using external relational database Mysql, PostgreSQL
- No need to mount the database file directory in the backup container
- Stop and delete the container, delete the local HertzBeat docker image, and pull the new version image
- Refer to [Docker installation HertzBeat] (docker-deploy) to create a new container using the new image, and configure the database connection in `application.yml`
### Upgrade For Package Deploy
1. If using the built-in default H2 database
- Back up the database file directory under the installation package `/opt/hertzbeat/data`
- If there is a custom monitoring template, you need to back up the template YML under `/opt/hertzbeat/define`
- `bin/shutdown.sh` stops the HertzBeat process and downloads the new installation package
- Refer to [Installation package to install HertzBeat](package-deploy) to start using the new installation package
2. If using external relational database Mysql, PostgreSQL
- No need to back up the database file directory under the installation package
- If there is a custom monitoring template, you need to back up the template YML under `/opt/hertzbeat/define`
- `bin/shutdown.sh` stops the HertzBeat process and downloads the new installation package
- Refer to [Installation package to install HertzBeat](package-deploy) to start with the new installation package and configure the database connection in `application.yml`
**HAVE FUN**