I have a dumb question. So I'm using GrepTime to b...
# general
m
I have a dumb question. So I'm using GrepTime to be able to backup metrics to an s3 bucket, and I'm having trouble understanding the configuration when using the greptime docker image
Copy code
docker run -d -p 0.0.0.0:4001-4003:4001-4003 -p 0.0.0.0:8080:8080 \
          -v $(pwd):/config \
          --name greptime \
          --restart unless-stopped \
          greptime/greptimedb:v0.15.2 standalone start -c /config/greptimedb.toml \
          --http-addr 0.0.0.0:8080 \
          --rpc-bind-addr 0.0.0.0:4001 \
          --mysql-addr 0.0.0.0:4002 \
          --postgres-addr 0.0.0.0:4003
This is my greptimedb.toml file
Copy code
[storage]
type = "S3"
bucket = "example_bucket"
root = "/greptimedb"
region = "us-west-2"
cache_capacity = "0GiB"

[storage.metadata]
type = "S3"
bucket = "example_bucket"
root = "/greptimedb/metadata"
region = "us-west-2"
The thing is I do see data get uploaded to s3, but let's say for example, my greptime server goes down, it doesn't try to restore values from b4. Is there something I'm missing. I've been reading docs about managing the metadata config (https://docs.greptime.com/user-guide/deployments-administration/manage-metadata/configuration), but I don't want to overcomplicate my stack by adding a MySQL etc.. any recommendations?
n
m
I see, but I'm still confused. What if my instance goes down, or the disk space of the instance I'm using is filled up, how can I query from s3 / backup data is my main ask.
n
First you may want to decide which deployment model you want to go, single node (standalone) or cluster. If you choose cluster, you will need to setup a mysql or etcd metadata store as you find in managing metadata section of the docs. The DR docs are also focusing on the cluster deployment, because most of our users are using cluster deployment in production. If you want to stick with standalone, which is also good for some use-cases when high-availability or scalability is not a requirement, you will need to keep the
greptimedb_data
directory outside the docker container, and backup it if you don't want to lose data (just like any database runs on single node). Because you already have object storage setup of data, there's only some metadata in
greptimedb_data
and it won't take much space.
👍 1
d
m
i see, yeah. I did some additional readings. I was collecting metrics for 1 job, and it crashed the instance 😐 so I might need to scale. From my understanding, I would setup. metasrv, which connects to at least 3 data nodes (i think, will play around with 🙂)?
okay everything works, tysm guys 🎉
👍 1