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