Fix typos in badger migration script

This commit is contained in:
Mariano Cano 2023-07-18 10:27:36 -07:00
parent 7bca0c2349
commit f7c33d0878
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -4,5 +4,5 @@ Please note that `install-step-ra.sh` is referenced on the `files.smallstep.com`
## badger-migration
badger-migration is a tool that allows to migrate data from a BadgerDB (v1 or
badger-migration is a tool that allows migrating data data from BadgerDB (v1 or
v2) to MySQL or PostgreSQL.

View file

@ -47,13 +47,13 @@ var (
func usage(fs *flag.FlagSet) {
name := filepath.Base(os.Args[0])
fmt.Fprintf(os.Stderr, "%s is a tool to migrate Badger databases to MySQL or PostgreSQL.\n", name)
fmt.Fprintf(os.Stderr, "%s is a tool to migrate data from BadgerDB to MySQL or PostgreSQL.\n", name)
fmt.Fprintln(os.Stderr, "\nUsage:")
fmt.Fprintf(os.Stderr, " %s [-v1|-v2] -dir=<path> [-value-dir=<path>] -type=type -database=<source>\n", name)
fmt.Fprintln(os.Stderr, "\nExamples:")
fmt.Fprintf(os.Stderr, " %s -v1 -dir /var/lib/step-ca/db -type=mysql -database \"user@unix/step_ca\"\n", name)
fmt.Fprintf(os.Stderr, " %s -v2 -dir /var/lib/step-ca/db -type=mysql -database \"user:password@tcp(localhost:3306)/step_ca\"\n", name)
fmt.Fprintf(os.Stderr, " %s -v2 -dir /var/lib/step-ca/db -type=postgresql --database \"user=postgres dbname=step_ca\"\n", name)
fmt.Fprintf(os.Stderr, " %s -v2 -dir /var/lib/step-ca/db -type=postgresql -database \"user=postgres dbname=step_ca\"\n", name)
fmt.Fprintln(os.Stderr, "\nOptions:")
fs.PrintDefaults()
}
@ -93,10 +93,10 @@ func main() {
if v1 {
if v1DB, err = badgerV1Open(dir, valueDir); err != nil {
fatal("error opening badger v2 database: %v", err)
fatal("error opening badger v1 database: %v", err)
}
} else {
if v2DB, err = badgerV2Open("/tmp/db", ""); err != nil {
if v2DB, err = badgerV2Open(dir, valueDir); err != nil {
fatal("error opening badger v2 database: %v", err)
}
}