Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jidancong/gobackup
数据库备份工具
https://github.com/jidancong/gobackup
backup databases mysql postgres
Last synced: about 2 months ago
JSON representation
数据库备份工具
- Host: GitHub
- URL: https://github.com/jidancong/gobackup
- Owner: jidancong
- Created: 2023-12-27T06:53:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-13T08:44:02.000Z (8 months ago)
- Last Synced: 2024-05-13T09:34:40.237Z (8 months ago)
- Topics: backup, databases, mysql, postgres
- Language: Go
- Homepage:
- Size: 26.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gobackup
> 简单的数据库**全量**定时备份系统, 目前还处于开发阶段, 建议使用于**开发测试环境**## 入门开始
## Linux安装
### 条件
> 安装 mysqldump/pg_dump/mongodump
### 配置说明
config.yaml
```yaml
level: "debug" # 日志等级
store: "/app/data" # 存储
cron: "* * * * *" # 定时
backup:
- type: mysql # 数据库类型 (pg, mysql)
host: 192.168.1.1 # 数据库地址
port: 3306 # 数据库端口
user: root # 数据库用户
password: root # 数据库密码
- type: pg
host: 192.168.1.1
port: 5432
user: root
password: root
- type: mongo
host: 192.168.1.1
port: 27017
user: ""
password: ""
- type: scp
user: root
password: root
host: 192.168.52.147
port: 22
fromPath: /tmp/scp
```### 命令行启动
```shell
./gobackup
```## Windows安装
### 配置说明
config.yaml
```yaml
level: "debug" # 日志等级
store: "C:\\Users\\admin\\Desktop\\goproject\\gobackup\\data" # 存储
cron: "* * * * *" # 定时
backup:
- type: mysql # 数据库类型 (pg, mysql)
host: 192.168.1.1 # 数据库地址
port: 3306 # 数据库端口
user: root # 数据库用户
password: root # 数据库密码
- type: pg
host: 192.168.1.1
port: 5432
user: root
password: root
- type: mongo
host: 192.168.1.1
port: 27017
user: ""
password: ""
- type: scp
user: root
password: root
host: 192.168.52.147
port: 22
fromPath: /tmp/scp
```
### 启动
```shell
./gobackup.exe # 执行定时任务
./gobackup.exe -run # 执行一次
```## 说明
### 支持数据库类型
###### mysql
###### postgres
###### mongo
###### scp### 支持存储
###### local