mirror of
https://github.com/This-weiyuqing/mi-fitness-health.git
synced 2026-10-18 11:13:48 +08:00
整理 NAS 部署目录并归档迁移工具
更新 Compose 和部署更新脚本以使用新的状态、凭据及日历目录布局;新增目录迁移、诊断和历史清理工具及本机演练测试,并记录 NAS 迁移与清理结果。
This commit is contained in:
1 parent
1af63ff83a
commit
6e2a53ad20
14 files changed
+838
-8
No files matched your search
@@ -0,0 +1,13 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$remote = '/tmp/mi-fitness-migration-diagnose-' + (Get-Date -Format 'yyyyMMdd-HHmmss') + '.py'
|
||||
& scp (Join-Path $PSScriptRoot 'diagnose.py') "fn:$remote"
|
||||
if ($LASTEXITCODE -ne 0) { throw '诊断脚本上传失败' }
|
||||
Write-Host '此次仅收集容器状态、迁移时事件和候选配置检查,不迁移、不重启。'
|
||||
$output = & ssh -t fn "sudo python3 '$remote'"
|
||||
$code = $LASTEXITCODE
|
||||
$output | ForEach-Object { Write-Host $_ }
|
||||
$directory = Join-Path $PSScriptRoot '../../artifacts/directory-migration'
|
||||
New-Item -ItemType Directory -Force -Path $directory | Out-Null
|
||||
$output | Set-Content -LiteralPath (Join-Path $directory 'diagnose.local.txt') -Encoding utf8NoBOM
|
||||
if ($code -ne 0) { throw '诊断未完成,请保留输出。' }
|
||||
Write-Host '诊断结果已保存到本机,可以回到聊天回复“已完成”。'
|
||||
Reference in new issue
Block a user