Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
Exclude template0, template1 and postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
xeome committed Jul 26, 2023
1 parent 6970e33 commit ac3e0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/dumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (d *Dumper) getDBList() []string {
for _, line := range bytes.Split(out, []byte{'\n'}) {
if len(line) > 0 {
ln := strings.TrimSpace(strings.Split(string(line), "|")[0])
if ln == "" || ln[0] < 'a' || ln[0] > 'z' {
if ln == "" || ln[0] < 'a' || ln[0] > 'z' || ln == "template0" || ln == "template1" || ln == "postgres" {
continue
}
dbList = append(dbList, ln)
Expand Down

0 comments on commit ac3e0fb

Please sign in to comment.