Created
April 12, 2022 10:57
-
-
Save mdrakiburrahman/6cea0b09a152c84e0ae150da54b92617 to your computer and use it in GitHub Desktop.
Testing Arc PITR with incorrect dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Correct date | |
cat <<EOF | kubectl create -f - | |
apiVersion: tasks.sql.arcdata.microsoft.com/v1 | |
kind: SqlManagedInstanceRestoreTask | |
metadata: | |
name: sql-restore-raki-correct | |
namespace: arc | |
spec: | |
source: | |
name: sql-gp-1 | |
database: raki_pitr_test | |
restorePoint: "2022-04-10T22:30:53Z" | |
destination: | |
name: sql-gp-1 | |
database: raki_pitr_test_restore | |
EOF | |
# As expected - goes through | |
# sql-restore-raki-correct Completed 16s | |
# Incorrect date | |
cat <<EOF | kubectl create -f - | |
apiVersion: tasks.sql.arcdata.microsoft.com/v1 | |
kind: SqlManagedInstanceRestoreTask | |
metadata: | |
name: sql-restore-raki-incorrect | |
namespace: arc | |
spec: | |
source: | |
name: sql-gp-1 | |
database: raki_pitr_test | |
restorePoint: "1990-04-10T22:30:53Z" | |
destination: | |
name: sql-gp-1 | |
database: raki_pitr_test_restore_2 | |
EOF | |
# As expected - CRD errors | |
# sql-restore-raki-incorrect Failed 25s | |
# Status: | |
# Earliest Restore Time: 2022-04-10T22:30:34.000000Z | |
# Last Update Time: 2022-04-10T22:44:59.957682Z | |
# Latest Restore Time: 2022-04-10T22:36:23.000000Z | |
# Message: '1990-04-10T22:30:53.0000000Z' is outside the range of available backups from '2022-04-10T22:30:34.0000000Z' to '2022-04-10T22:36:23.0000000Z' (Parameter 'RestoreTime') | |
# Observed Generation: 1 | |
# State: Failed | |
# Events: <none> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment