feat(tplus): 新增同步暂存与任务管理迁移和环境配置
This commit is contained in:
1 parent
823d9f02ec
commit
78bef43c06
29 files changed
+1326
-5
No files matched your search
@@ -0,0 +1,23 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$BackupFileName,
|
||||
[string]$ContainerName = "ys-tplus-sqlserver-dev",
|
||||
[string]$BackupRoot = "D:\work\app\tplus-sqlserver\backup",
|
||||
[Parameter(Mandatory = $true)]
|
||||
[SecureString]$SaPassword
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
. (Join-Path $PSScriptRoot "container_sql.ps1")
|
||||
|
||||
$backupPath = Join-Path $BackupRoot $BackupFileName
|
||||
if (-not (Test-Path -LiteralPath $backupPath)) {
|
||||
throw "找不到备份文件:$backupPath"
|
||||
}
|
||||
|
||||
$containerPath = "/var/opt/mssql/backup/$BackupFileName"
|
||||
$sql = "RESTORE VERIFYONLY FROM DISK = N'$($containerPath.Replace("'", "''"))'; RESTORE FILELISTONLY FROM DISK = N'$($containerPath.Replace("'", "''"))';"
|
||||
Invoke-TPlusContainerSql -ContainerName $ContainerName -Sql $sql -SaPassword $SaPassword
|
||||
Reference in new issue
Block a user