https://github.com/jcoupalk/go-pgdump-cli
A CLI tool for the go-pgdump library
https://github.com/jcoupalk/go-pgdump-cli
backup-tool cli golang postgresql
Last synced: 2 months ago
JSON representation
A CLI tool for the go-pgdump library
- Host: GitHub
- URL: https://github.com/jcoupalk/go-pgdump-cli
- Owner: JCoupalK
- License: mit
- Created: 2024-09-03T04:14:11.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T01:59:34.000Z (5 months ago)
- Last Synced: 2025-01-09T02:38:35.319Z (5 months ago)
- Topics: backup-tool, cli, golang, postgresql
- Language: Go
- Homepage: https://jcoupal.com
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-pgdump-cli
CLI tool using the library
## Usage of go-pgdump-cli
- `-u` string, username for PostgreSQL
- `-p` string, password for PostgreSQL
- `-h` string, hostname for PostgreSQL
- `-d` string, database name for PostgreSQL
- `-P` string, port number for PostgreSQL (default 5432)
- `-csv` bool, dump to CSV
- `-o` string, path to output directory
- `-px` string, prefix of tablen names for dump
- `-s` string, schema filter for dump
- `-sx` string, suffix of tablen names for dump
### Usage for a database dump with default port in directory called "test"
```bash
./go-pgdump-cli -u user -p example -h localhost -d test -o test -sx example -px test -s myschema
```### Usage for a CSV dump with custom port in directory called "test"
```bash
./go-pgdump-cli -u user -p example -h localhost -d test -P 5433 -o test -csv
```## License
This project is licensed under MIT - see the LICENSE file for details.