Skip to content

Commit 644a8cf

Browse files
committed
Fixed kubectl command syntax
1 parent cf06428 commit 644a8cf

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

samples/features/sql-big-data-cluster/bootstrap-sample-db.cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if /i "%CTP_VERSION%" EQU "CTP2.4" (set MASTER_POD_NAME=mssql-master-pool-0) els
4646

4747
REM Copy the backup file, restore the database, create necessary objects and data file
4848
echo Copying sales database backup file to SQL Master instance...
49-
%DEBUG% kubectl cp tpcxbb_1gb.bak %CLUSTER_NAMESPACE%/%MASTER_POD_NAME%:/var/opt/mssql/data -c mssql-server || goto exit
49+
%DEBUG% kubectl cp tpcxbb_1gb.bak %CLUSTER_NAMESPACE%/%MASTER_POD_NAME%:var/opt/mssql/data -c mssql-server || goto exit
5050

5151
REM Download and copy the sample backup files
5252
if /i "%AW_WWI_SAMPLES%" EQU "--install-extra-samples" (
@@ -57,7 +57,7 @@ if /i "%AW_WWI_SAMPLES%" EQU "--install-extra-samples" (
5757
%DEBUG% curl -L -G "https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/%%f" -o %%f
5858
)
5959
echo Copying %%f database backup file to SQL Master instance...
60-
%DEBUG% kubectl cp %%f %CLUSTER_NAMESPACE%/%MASTER_POD_NAME%:/var/opt/mssql/data -c mssql-server || goto exit
60+
%DEBUG% kubectl cp %%f %CLUSTER_NAMESPACE%/%MASTER_POD_NAME%:var/opt/mssql/data -c mssql-server || goto exit
6161
)
6262

6363
set FILES=WideWorldImporters-Full.bak WideWorldImportersDW-Full.bak
@@ -67,7 +67,7 @@ if /i "%AW_WWI_SAMPLES%" EQU "--install-extra-samples" (
6767
%DEBUG% curl -L -G "https://github.com/Microsoft/sql-server-samples/releases/download/wide-world-importers-v1.0/%%f" -o %%f
6868
)
6969
echo Copying %%f database backup file to SQL Master instance...
70-
%DEBUG% kubectl cp %%f %CLUSTER_NAMESPACE%/%MASTER_POD_NAME%:/var/opt/mssql/data -c mssql-server || goto exit
70+
%DEBUG% kubectl cp %%f %CLUSTER_NAMESPACE%/%MASTER_POD_NAME%:var/opt/mssql/data -c mssql-server || goto exit
7171
)
7272
)
7373

samples/features/sql-big-data-cluster/bootstrap-sample-db.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ else
6060
MASTER_POD_NAME=master-0
6161
fi
6262

63-
echo Copying database backup file...
64-
$DEBUG kubectl cp tpcxbb_1gb.bak $CLUSTER_NAMESPACE/$MASTER_POD_NAME:/var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
63+
echo Copying sales database backup file...
64+
$DEBUG kubectl cp tpcxbb_1gb.bak $CLUSTER_NAMESPACE/$MASTER_POD_NAME:var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
6565
# $DEBUG rm tpcxbb_1gb.bak
6666

6767
if [ "$AW_WWI_SAMPLES" == "--install-extra-samples" ]
@@ -74,7 +74,7 @@ then
7474
$DEBUG curl -L -G "https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/$file" -o $file
7575
fi
7676
echo Copying $file database backup file to SQL Master instance...
77-
$DEBUG kubectl cp $file $CLUSTER_NAMESPACE/$MASTER_POD_NAME:/var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
77+
$DEBUG kubectl cp $file $CLUSTER_NAMESPACE/$MASTER_POD_NAME:var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
7878
done
7979

8080

@@ -86,7 +86,7 @@ then
8686
$DEBUG curl -L -G "https://github.com/Microsoft/sql-server-samples/releases/download/wide-world-importers-v1.0/$file" -o $file
8787
fi
8888
echo Copying $file database backup file to SQL Master instance...
89-
$DEBUG kubectl cp $file $CLUSTER_NAMESPACE/$MASTER_POD_NAME:/var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
89+
$DEBUG kubectl cp $file $CLUSTER_NAMESPACE/$MASTER_POD_NAME:var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
9090
done
9191
fi
9292

@@ -97,7 +97,7 @@ $DEBUG sqlcmd -S $SQL_MASTER_INSTANCE -Usa -P$SQL_MASTER_SA_PASSWORD -I -b < "$S
9797

9898
# remove files copied into the pod:
9999
echo Removing database backup files...
100-
kubectl exec $MASTER_POD_NAME -n $CLUSTER_NAMESPACE -c mssql-server -i -t -- bash -c "rm -rvf /var/opt/mssql/data/*.bak"
100+
$DEBUG kubectl exec $MASTER_POD_NAME -n $CLUSTER_NAMESPACE -c mssql-server -i -t -- bash -c "rm -rvf /var/opt/mssql/data/*.bak"
101101

102102
for table in web_clickstreams inventory customer
103103
do

0 commit comments

Comments
 (0)