Add restore from SSH

This commit is contained in:
2024-07-31 22:32:07 +02:00
parent 6976bf7597
commit 5b0d450740
9 changed files with 47 additions and 27 deletions

View File

@@ -19,7 +19,6 @@ var rootCmd = &cobra.Command{
Version: appVersion,
}
var operation = ""
var s3Path = "/pg-bkup"
// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
@@ -32,7 +31,7 @@ func Execute() {
func init() {
rootCmd.PersistentFlags().StringP("storage", "s", "local", "Set storage. local or s3")
rootCmd.PersistentFlags().StringP("path", "P", s3Path, "Set s3 path, without file name. for S3 storage only")
rootCmd.PersistentFlags().StringP("path", "P", "", "Set s3 path, without file name. for S3 storage only")
rootCmd.PersistentFlags().StringP("dbname", "d", "", "Set database name")
rootCmd.PersistentFlags().IntP("timeout", "t", 30, "Set timeout")
rootCmd.PersistentFlags().IntP("port", "p", 5432, "Set database port")

View File

@@ -1,7 +1,6 @@
package cmd
import (
"github.com/jkaninda/pg-bkup/pkg"
"github.com/spf13/cobra"
)
@@ -9,6 +8,6 @@ var S3MountCmd = &cobra.Command{
Use: "s3mount",
Short: "Mount AWS S3 storage",
Run: func(cmd *cobra.Command, args []string) {
pkg.S3Mount()
//pkg.S3Mount()
},
}