Skip to content

Commit

Permalink
Add support to set backups with tag, which overwrites existing
Browse files Browse the repository at this point in the history
Notice, this will overwrite existing tag if it exists, use with caution
  • Loading branch information
nvtkaszpir committed Sep 28, 2021
1 parent 1edd313 commit 449c014
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cain/nodetool.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ import (
// TakeSnapshots takes a snapshot using nodetool in all pods in parallel
func TakeSnapshots(iClient interface{}, pods []string, namespace, container, keyspace string, username string, password string, tag string) string {
k8sClient := iClient.(*skbn.K8sClient)

// get current time as tag
realtag := utils.GetTimeStamp()
if len(tag) == 0 {
// set custom tag if provided
if len(tag) != 0 {
realtag = tag
}

bwgSize := len(pods)
bwg := utils.NewBoundedWaitGroup(bwgSize)
for _, pod := range pods {
Expand Down

0 comments on commit 449c014

Please sign in to comment.