1
0
Fork 0

Support compressing backups

master
Philip O'Toole 9 months ago
parent 2d9485fb56
commit fccddbf4ae

@ -103,6 +103,11 @@ func (qp QueryParams) Vacuum() bool {
return qp.HasKey("vacuum")
}
// Compress returns true if the query parameters request compression.
func (qp QueryParams) Compress() bool {
return qp.HasKey("compress")
}
// Key returns the value of the key named "key".
func (qp QueryParams) Key() string {
return qp["key"]

@ -600,9 +600,10 @@ func (s *Service) handleBackup(w http.ResponseWriter, r *http.Request, qp QueryP
}
br := &proto.BackupRequest{
Format: qp.BackupFormat(),
Leader: !qp.NoLeader(),
Vacuum: qp.Vacuum(),
Format: qp.BackupFormat(),
Leader: !qp.NoLeader(),
Vacuum: qp.Vacuum(),
Compress: qp.Compress(),
}
addBackupFormatHeader(w, qp)

Loading…
Cancel
Save