You've already forked docker-volume-backup
mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-11-23 21:44:40 +02:00
Add "none" compression type (#457)
* Add "none" compression type * Add "none" compression to docs * Use passThroughWriteCloser for "none" compression * Add test for none compression --------- Co-authored-by: Frederik Ring <frederik.ring@gmail.com>
This commit is contained in:
@@ -86,7 +86,12 @@ func (s *script) init() error {
|
||||
|
||||
var bf bytes.Buffer
|
||||
if tErr := tmplFileName.Execute(&bf, map[string]string{
|
||||
"Extension": fmt.Sprintf("tar.%s", s.c.BackupCompression),
|
||||
"Extension": func() string {
|
||||
if s.c.BackupCompression == "none" {
|
||||
return "tar"
|
||||
}
|
||||
return fmt.Sprintf("tar.%s", s.c.BackupCompression)
|
||||
}(),
|
||||
}); tErr != nil {
|
||||
return errwrap.Wrap(tErr, "error executing backup file extension template")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user