Skip to content

Commit

Permalink
Use different date command
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Mar 27, 2024
1 parent 8277844 commit 9d2b978
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/endtoend/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,13 @@ function takeBackup() {
# $1: tablet alias for which the backup needs to be restored
function restoreBackup() {
tabletAlias=$1
if [[ -z "$tabletAlias" ]]; then
echo "Tablet alias not provided as restore target"
exit 1
fi

# Issue the PITR restore command to vtctldclient.
vtctldclient RestoreFromBackup --restore-to-timestamp $(date --rfc-3339=seconds) "${tabletAlias}"
vtctldclient RestoreFromBackup --restore-to-timestamp $(date -u "+%Y-%m-%dT%H:%M:%S") "${tabletAlias}"

if [[ $? -ne 0 ]]; then
echo "Restore failed"
Expand Down

0 comments on commit 9d2b978

Please sign in to comment.