@@ -83,6 +83,7 @@ type options struct {
83
83
DumpOnly bool
84
84
85
85
Upload string // values are none, s3, sftp, gcs
86
+
UploadPrefix string
86
87
Download string // values are none, s3, sftp, gcs
87
88
ListRemote string // values are none, s3, sftp, gcs
88
89
PurgeRemote bool
@@ -288,6 +289,7 @@ func parseCli(args []string) (options, []string, error) {
288
289
pflag.StringVar(&opts.CipherPrivateKey, "cipher-private-key", "", "AGE private key for decryption; in Bech32 encoding starting with 'AGE-SECRET-KEY-1'\n")
289
290
290
291
pflag.StringVar(&opts.Upload, "upload", "none", "upload produced files to target (s3, gcs,..) use \"none\" to override\nconfiguration file and disable upload")
292
+
pflag.StringVar(&opts.UploadPrefix, "upload-prefix", "", "add this prefix to uploaded files, similar to a target directory")
291
293
pflag.StringVar(&opts.Download, "download", "none", "download files from target (s3, gcs,..) instead of dumping. DBNAMEs become\nglobs to select files")
292
294
pflag.StringVar(&opts.ListRemote, "list-remote", "none", "list the remote files on s3, gcs, sftp, azure instead of dumping. DBNAMEs become\nglobs to select files")
293
295
purgeRemote := pflag.String("purge-remote", "no", "purge the file on remote location after upload, with the same rules\nas the local directory")
@@ -502,7 +504,7 @@ func validateConfigurationFile(cfg *ini.File) error {
502
504
"sftp_port", "sftp_user", "sftp_password", "sftp_directory", "sftp_identity",
503
505
"sftp_ignore_hostkey", "gcs_bucket", "gcs_endpoint", "gcs_keyfile",
504
506
"azure_container", "azure_account", "azure_key", "azure_endpoint", "pg_dump_options",
505
-
"dump_role_passwords", "dump_only",
507
+
"dump_role_passwords", "dump_only", "upload_prefix",
506
508
}
507
509
508
510
gkLoop:
@@ -597,6 +599,7 @@ func loadConfigurationFile(path string) (options, error) {
597
599
opts.EncryptKeepSrc = s.Key("encrypt_keep_source").MustBool(false)
598
600
599
601
opts.Upload = s.Key("upload").MustString("none")
602
+
opts.UploadPrefix = s.Key("upload_prefix").MustString("")
600
603
opts.PurgeRemote = s.Key("purge_remote").MustBool(false)
601
604
602
605
opts.S3Region = s.Key("s3_region").MustString("")
@@ -832,6 +835,8 @@ func mergeCliAndConfigOptions(cliOpts options, configOpts options, onCli []strin
832
835
833
836
case "upload":
834
837
opts.Upload = cliOpts.Upload
838
+
case "upload-prefix":
839
+
opts.UploadPrefix = cliOpts.UploadPrefix
835
840
case "download":
836
841
opts.Download = cliOpts.Download
837
842
case "list-remote":
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4