Skip to content

Commit

Permalink
[db-backup] Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ashkan-shakewell committed Sep 12, 2020
1 parent fa655bb commit c95051c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ You can see usage with --help flag
| 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 | |
Expand All @@ -28,6 +29,12 @@ 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
Expand All @@ -37,4 +44,4 @@ go build -ldflags="-s -w"

### Contribution :love_letter:

Fork project and send PR to me :heart:
Fork project and send PR to me :heart:
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func parseFlags() {
flag.StringVar(&filePath, "p", "", "output file path")
flag.StringVar(&fileType, "f", "sql", "output file type (sql|zip|gz)")
flag.BoolVar(&includeDate, "d", false, "add date to output files")
flag.StringVar(&importFile, "i", "", "import file path")
flag.StringVar(&importFile, "i", "", "input file path")

flag.StringVar(&dbUsername, "db_user", "", "database user name")
flag.StringVar(&dbPassword, "db_pass", "", "database user password")
Expand Down

0 comments on commit c95051c

Please sign in to comment.