Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yasnateam/db-backup
https://github.com/yasnateam/db-backup
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yasnateam/db-backup
- Owner: YasnaTeam
- Created: 2019-09-24T12:49:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-12T11:37:20.000Z (over 4 years ago)
- Last Synced: 2024-06-21T03:16:00.068Z (7 months ago)
- Language: Go
- Size: 17.6 KB
- Stars: 5
- Watchers: 8
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoBackup :floppy_disk:
GoBackup is a `mysqldumper` wrapper to full/partial backup and/or compress mysql databases.
### Download
You can download the release file from [releases](https://github.com/YasnaTeam/db-backup/releases) page.### Usage
You can see usage with --help flag| Flag | Usage | Default |
| ------------- |:-------------:| -----:|
| t | name of table(s) you want to dump comma separated. | * |
| n | output file name | dump |
| p | output file path | |
| f | output file type (sql,zip,gz) | sql |
| d | add date to output file | false |
| i | input file path | |
| db_user | database user name | |
| db_pass | database user password | |
| db_host | database host | |
| db_name | database name | |
| db_port | database port number | 3306 |
| config | database config file | |Example usage :
```bash
gobackup -f gz -config /laravel/.env -n out
```
This command will create a file named `out` and `out.gz` by dumping all tables with connection info of `.env` file### Import Command
You can also import a sql file with any of these mime-types (`sql`,`gz`,`zip`):
```bash
gobackup -i path/to/file.sql -config /laravel/.env
```### Build Executable From Source
You May build the executable file with following command :
```bash
go build -ldflags="-s -w"
```
###### Flags are for decreasing output size### Contribution :love_letter:
Fork project and send PR to me :heart: