A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/orgrim/pg_back/commit/95f5e3780133773ba74e1bc6c31e82c4a8727cb9 below:

Fix --delete-uploaded cli option and document it · orgrim/pg_back@95f5e37 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+15

-5

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+15

-5

lines changed Original file line number Diff line number Diff line change

@@ -231,6 +231,12 @@ the prefix is separated by a / in the remote location.

231 231

The `--purge-remote` option can be set to `yes` to apply the same purge policy

232 232

on the remote location as the local directory.

233 233 234 +

The `--delete-uploaded` option can be set to `yes` (or `no` to override the

235 +

configuration file value) to remove a local file as soon as it is uploaded

236 +

successfully. (Note: it will leave unencrypted local files when

237 +

`--encrypt-keep-src` and `--encrypt` are active because only encrypted files

238 +

are uploaded in that case)

239 + 234 240

When files are encrypted and their unencrypted source is kept, only encrypted

235 241

files are uploaded.

236 242 Original file line number Diff line number Diff line change

@@ -576,7 +576,7 @@ gkLoop:

576 576

}

577 577 578 578

subs := cfg.Sections()

579 -

knonw_perdb := []string{

579 +

known_perdb := []string{

580 580

"format", "parallel_backup_jobs", "compress_level", "checksum_algorithm",

581 581

"purge_older_than", "purge_min_keep", "schemas", "exclude_schemas", "tables",

582 582

"exclude_tables", "pg_dump_options", "with_blobs", "user",

@@ -589,7 +589,7 @@ gkLoop:

589 589 590 590

dbkLoop:

591 591

for _, v := range sub.KeyStrings() {

592 -

for _, c := range knonw_perdb {

592 +

for _, c := range known_perdb {

593 593

if v == c {

594 594

continue dbkLoop

595 595

}

@@ -886,6 +886,9 @@ func mergeCliAndConfigOptions(cliOpts options, configOpts options, onCli []strin

886 886

for _, dbo := range opts.PerDbOpts {

887 887

dbo.SumAlgo = cliOpts.SumAlgo

888 888

}

889 +

case "uniform-timestamp":

890 +

opts.UniformTimestamp = cliOpts.UniformTimestamp

891 + 889 892

case "purge-older-than":

890 893

opts.PurgeInterval = cliOpts.PurgeInterval

891 894

for _, dbo := range opts.PerDbOpts {

@@ -923,6 +926,8 @@ func mergeCliAndConfigOptions(cliOpts options, configOpts options, onCli []strin

923 926

opts.ListRemote = cliOpts.ListRemote

924 927

case "purge-remote":

925 928

opts.PurgeRemote = cliOpts.PurgeRemote

929 +

case "delete-uploaded":

930 +

opts.DeleteUploaded = cliOpts.DeleteUploaded

926 931 927 932

case "b2-bucket":

928 933

opts.B2Bucket = cliOpts.B2Bucket

@@ -991,10 +996,7 @@ func mergeCliAndConfigOptions(cliOpts options, configOpts options, onCli []strin

991 996

opts.Username = cliOpts.Username

992 997

case "dbname":

993 998

opts.ConnDb = cliOpts.ConnDb

994 -

case "uniform-timestamp":

995 -

opts.UniformTimestamp = cliOpts.UniformTimestamp

996 999

}

997 1000

}

998 - 999 1001

return opts

1000 1002

}

Original file line number Diff line number Diff line change

@@ -1615,6 +1615,8 @@ func postProcessFiles(inFiles chan sumFileJob, wg *sync.WaitGroup, opts options)

1615 1615

}

1616 1616

continue

1617 1617

}

1618 + 1619 +

l.Infoln("uploaded", j.Path)

1618 1620

if opts.DeleteUploaded {

1619 1621

l.Infoln("removing", j.Path)

1620 1622

os.Remove(j.Path)

You can’t perform that action at this time.


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