From ccc386a6415246913d82a2f5b0e405ee7de70f58 Mon Sep 17 00:00:00 2001 From: Guangyu Chen Date: Mon, 13 Mar 2023 22:42:59 -0700 Subject: [PATCH] fix: set proper ttl in createsnapshot ttl was not added to the expiration time and the Now ts was sent to the server. This leads to errors like "Expire time must be at least 6h from the time the backup was started, which should be XXX, but got XXXX" --- cbt.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cbt.go b/cbt.go index 9818b5a..182df4b 100755 --- a/cbt.go +++ b/cbt.go @@ -1611,8 +1611,7 @@ func doSnapshotTable(ctx context.Context, args ...string) { } } - t := time.Now() - t.Add(ttl) + t := time.Now().Add(ttl) err = getAdminClient().CreateBackup(ctx, tableName, clusterName, snapshotName, t) if err != nil {