refactor: clean up code

This commit is contained in:
2024-02-25 14:40:48 +01:00
parent 4e16823072
commit 519d659644
6 changed files with 24 additions and 24 deletions

View File

@@ -30,25 +30,25 @@ PostgreSQL Backup and Restoration tool. Backup database to AWS S3 storage or any
### Usage
| Options | Shorts | Usage |
|-----------------------|--------|----------------------------------------------------------------------|
| pg-bkup | bkup | CLI utility |
| backup | | Backup database operation |
| restore | | Restore database operation |
| history | | Show the history of backup |
| --storage | -s | Set storage. local or s3 (default: local) |
| --file | -f | Set file name for restoration |
| --path | | Set s3 path without file name. eg: /custom_path |
| --dbname | -d | Set database name |
| --port | -p | Set database port (default: 5432) |
| --mode | -m | Set execution mode. default or scheduled (default: default) |
| --disable-compression | | Disable database backup compression |
| --prune | | Delete old backup, default disabled |
| --keep-last | | Delete files created more than specified days ago, default 7 days |
| --period | | Set crontab period for scheduled mode only. (default: "0 1 * * *") |
| --timeout | -t | Set timeout (default: 60s) |
| --help | -h | Print this help message and exit |
| --version | -V | Print version information and exit |
| Options | Shorts | Usage |
|-----------------------|--------|------------------------------------------------------------------------|
| pg-bkup | bkup | CLI utility |
| backup | | Backup database operation |
| restore | | Restore database operation |
| history | | Show the history of backup |
| --storage | -s | Set storage. local or s3 (default: local) |
| --file | -f | Set file name for restoration |
| --path | | Set s3 path without file name. eg: /custom_path |
| --dbname | -d | Set database name |
| --port | -p | Set database port (default: 5432) |
| --mode | -m | Set execution mode. default or scheduled (default: default) |
| --disable-compression | | Disable database backup compression |
| --prune | | Delete old backup, default disabled |
| --keep-last | | Delete old backup created more than specified days ago, default 7 days |
| --period | | Set crontab period for scheduled mode only. (default: "0 1 * * *") |
| --timeout | -t | Set timeout (default: 60s) |
| --help | -h | Print this help message and exit |
| --version | -V | Print version information and exit |
## Environment variables

View File

@@ -1,6 +1,6 @@
// Package cmd /*
/*
Copyright © 2024 Jonas Kaninda <jonaskaninda@gmail.com>
Copyright © 2024 Jonas Kaninda
*/
package cmd

View File

@@ -1,7 +1,7 @@
package cmd
/*
Copyright © 2024 Jonas Kaninda <jonaskaninda@gmail.com>
Copyright © 2024 Jonas Kaninda
*/
import (

View File

@@ -1,6 +1,6 @@
// Package pkg /*
/*
Copyright © 2024 Jonas Kaninda <jonaskaninda.gmail.com>
Copyright © 2024 Jonas Kaninda
*/
package pkg

View File

@@ -1,6 +1,6 @@
// Package pkg /*
/*
Copyright © 2024 Jonas Kaninda <jonaskaninda.gmail.com>
Copyright © 2024 Jonas Kaninda
*/
package pkg

View File

@@ -2,7 +2,7 @@ package pkg
// Package pkg /*
/*
Copyright © 2024 Jonas Kaninda <jonaskaninda.gmail.com>
Copyright © 2024 Jonas Kaninda
*/
import (
"fmt"