feat: add bucket description to backup manifest (#21683)
parent
a216501723
commit
e0d8a98837
|
@ -65,6 +65,7 @@ type BucketMetadataManifest struct {
|
|||
OrganizationName string `json:"organizationName"`
|
||||
BucketID platform.ID `json:"bucketID"`
|
||||
BucketName string `json:"bucketName"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
DefaultRetentionPolicy string `json:"defaultRetentionPolicy"`
|
||||
RetentionPolicies []RetentionPolicyManifest `json:"retentionPolicies"`
|
||||
}
|
||||
|
|
|
@ -52,11 +52,17 @@ func (b BucketManifestWriter) WriteManifest(ctx context.Context, w io.Writer) er
|
|||
|
||||
dbInfo := b.mc.Database(bkt.ID.String())
|
||||
|
||||
var description *string
|
||||
if bkt.Description != "" {
|
||||
description = &bkt.Description
|
||||
}
|
||||
|
||||
l = append(l, influxdb.BucketMetadataManifest{
|
||||
OrganizationID: bkt.OrgID,
|
||||
OrganizationName: org.Name,
|
||||
BucketID: bkt.ID,
|
||||
BucketName: bkt.Name,
|
||||
Description: description,
|
||||
DefaultRetentionPolicy: dbInfo.DefaultRetentionPolicy,
|
||||
RetentionPolicies: retentionPolicyToManifest(dbInfo.RetentionPolicies),
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue