https://github.com/nlm/rdb-autoresize
Beta: Tool to automatically grow your Scaleway RDB volumes
https://github.com/nlm/rdb-autoresize
Last synced: 12 months ago
JSON representation
Beta: Tool to automatically grow your Scaleway RDB volumes
- Host: GitHub
- URL: https://github.com/nlm/rdb-autoresize
- Owner: nlm
- License: mit
- Created: 2023-09-05T15:53:40.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-14T08:31:29.000Z (almost 3 years ago)
- Last Synced: 2025-01-21T21:47:33.670Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RDB Autoresize
Automatic resizer for RDB volumes.
This tool helps you keep the size of your Scaleway Database Instances volumes adapted to the
amount of data you store in it.
## How to use
What you need:
- A Scaleway API Key (access key + secret key)
- A Scaleway Database instance
### Using docker compose
Export mandatory variables:
```bash
export SCW_ACCESS_KEY="a-scaleway-access-key"
export SCW_SECRET_KEY="a-scaleway-secret-key"
export SCW_RDB_REGION="the-region-your-rdb-instance-is-deployed-on"
export SCW_RDB_INSTANCE_ID="your-rdb-instance-id"
```
Optionally, you can tweak additional settings:
```bash
# the % above which triggering will happen. Defaults to 90%
export SCW_RDB_TRIGGER_PERCENTAGE=90
# the limit size of your volume, defaults to 100GB
export SCW_RDB_VOLUME_SIZE_LIMIT=100GB
```
Start the stack:
```bash
docker compose up --build
```
### Manually
```bash
go build
export SCW_ACCESS_KEY="a-scaleway-access-key"
export SCW_SECRET_KEY="a-scaleway-secret-key"
export SCW_RDB_REGION="the-region-your-rdb-instance-is-deployed-on"
export SCW_RDB_INSTANCE_ID="your-rdb-instance-id"
./rdb-autoresize -volume-size-limit 100GB
```
## Configuration
Several parameters can be tweaked via environment variables:
- `SCW_RDB_TRIGGER_PERCENTAGE`: resize will happen when disk usage is above this percentage.
- `SCW_RDB_VOLUME_SIZE_LIMIT`: resize will no happen if target size is above this.
You also have some command line options:
- `-trigger-percentage`: equivalient of `SCW_RDB_TRIGGER_PERCENTAGE`
- `-volume-size-limit`: equivalent of `SCW_RDB_VOLUME_SIZE_LIMIT`
- `-log-json`: activate json-formatted logging
- `-debug`: activate debug logging