Files
admin/.wiki/sources/iis-migration-to-ruvds-2026-05-23.md
vitya 22786e1865 wiki(ingest): RUVDS IIS migration + daily backup pipeline
- entities/ruvds-iis-host (NEW) — 80.64.31.36, Win Server 2025 Core,
  25 SNI HTTPS bindings, 2/24 hostnames DNS-flipped
- sources/iis-migration-to-ruvds-2026-05-23 (NEW) — chronology,
  SSH/scp pivot после home-ISP outbound 445 block
- sources/ruvds-backup-daily-kreknin-2026-05-24 (NEW) — rclone+SFTP
  SYSTEM task daily 04:30, ntfy общий канал
- concepts/traefik-acme-json-to-iis-cert-import (NEW) — PFX + SNI
  recipe
- concepts/windows-server-2025-core-bootstrap — SMB deprecate,
  HTTP middlebox warning, HTTP/2 note; backup/cert open-Qs закрыты
- entities/windows-recovery-host — partial-cutover state,
  imgproxy SPOF carve-out, tandemmebel indefinitely здесь
- overview / index / log — catalog refresh

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 23:31:14 +03:00

115 lines
9.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: IIS migration to RUVDS — session 2026-05-23/24
type: source
tags: [iis, ruvds, migration, snolla, cms, ssh, scp, smb, dns, le-certs, sni]
ingested: 2026-05-24
raw_path: ../../.tasks/iis-migration-to-ruvds.md
updated: 2026-05-24
---
# IIS migration to RUVDS — 2026-05-23/24
Перенос IIS-хостинга CMS-сайтов с [[../entities/windows-recovery-host]] (DESKTOP-NSEF0UK, дом, SPOF) на [[../entities/ruvds-iis-host]] (Win Server 2025 Core, RUVDS, 80.64.31.36). Pre-req: MSSQL+MinIO уже мигрированы на [[../entities/vds-kzntsv]] (см. [[../concepts/mssql-on-vds]], [[../concepts/minio-imgproxy-on-vds]]).
Источник истины — `.tasks/iis-migration-to-ruvds.md`. Live state RUVDS-хоста — [[../entities/ruvds-iis-host]].
## Scope finalize (2026-05-24)
Только 1 IIS site `snolla` (catch-all для ~26 hostnames через CMS multi-tenant routing) — 8.66 GB. `stostayer` уже на external MSSQL (не наш scope), `stostayer.old` local-only (defer), `snolla-identity-manager` dead conn-string (defer). `tandemmebel.ru` + www — **остаются на windows-IIS** на неопределённый срок (scope-narrow 2026-05-24). Из 25 HTTPS bindings — 2 хоста уже DNS-flipped, 22 в очереди после снижения TTL.
## Хронология
### Phase 0 — vendor selection (2026-05-22)
Закрыт research-task `windows-hosting-vendor-research` 🟢 — RUVDS выбран. Сравнение: Rusonyx (Linux only для нужного формата), Selectel, FirstVDS, Beget. Critical constraints: RDP-доступ, .NET Framework 4.8 native, IIS 10, external MSSQL/MinIO connectivity (на VDS после Фазы 2).
### Phase 1 — purchase + secrets discipline (2026-05-23 09:37)
RUVDS активирован, RDP creds сохранены изначально plaintext в `.secrets/ruvds-iis.env` в repo tree → нарушение etap-2 secrets-discipline. **Ретроспективно вынесены** в `pass show ruvds-iis/full-env`, `.secrets/` + `*.env` + `*-log.txt` + `*-size.txt` добавлены в `.gitignore`.
### Phase 2 — failed-robocopy → SMB-block discovery (2026-05-23 18:08 → 22:30)
**18:08:** Попытка robocopy через UNC `\\80.64.31.36\sites\snolla\` упала exit 16. Initial diagnostics: SMB share не создан + FW 445 не открыт. Создан concept [[../concepts/windows-server-2025-core-bootstrap]] с default-blockers + transfer-методов матрицей.
**22:30 (session-recovery):** После выполнения bootstrap'а (FW+share созданы) SMB **всё равно** не reachable — TCP/445 не выходит **с home-ISP**. **Real root cause: outbound 445 блокирует ISP** (стандартная анти-worm политика residential провайдеров RU). FW scoping на RUVDS корректен.
> **Решение:** SMB recommendation в bootstrap-концепте **deprecated**. SSH/scp = canonical transfer-метод. Концепт обновлён, см. [[../concepts/windows-server-2025-core-bootstrap]] Update 2026-05-24.
### Phase 3 — SSH/scp transfer (2026-05-23 22:35 → 23:13)
OpenSSH.Server на RUVDS уже был установлен ранее (admin'ом), sshd running. Открыт FW 22 scoped к source IP, deployed ed25519 pubkey в `C:\ProgramData\ssh\administrators_authorized_keys` (правильный ACL — SYSTEM + Administrators only).
`scp -r C:\sites\snolla → C:/sites/`**~25 мин** (8.66 GB / 5 MB/s home uplink), exit 0, count+size MATCH (44725 files / 9 302 398 880 bytes).
### Phase 4 — IIS recreate (2026-05-23 23:18)
Default Web Site удалён. AppPool `snolla` (.NET v4.0, Integrated, ApplicationPoolIdentity), Website `snolla` с physicalPath `C:\sites\snolla` + catch-all binding `*:80:`. ACL — `IIS APPPOOL\snolla` + `IIS_IUSRS` Read на 46150 file entries. Local smoke (loopback + `Host: kupimknigi.spb.ru`) — 200 OK с правильным title.
### Phase 5 — HTTP middlebox surprise (2026-05-23 23:25)
External smoke через home network: все 8 hostnames вернули **`"SNOLLA | Cloud CMS" default`** (28 406 bytes), не per-tenant content. Внутри RUVDS (loopback) — корректно. SSH tunnel localhost:8888→RUVDS:80 → correct. Тест из VDS (другая сеть) → correct.
> **Conclusion: home-side outbound HTTP mutation** — DPI/transparent proxy в OpenWRT/ISP path mangles Host header. Real end-users из других сетей не пострадают. Affected — только local smoke testing.
Зафиксировано в [[../concepts/windows-server-2025-core-bootstrap]] Update 2026-05-24.
### Phase 6 — HTTPS SNI bindings (2026-05-23 23:30)
Извлечены 14 LE certs из traefik `acme.json` (`C:\Users\vitya\projects\docker\diskstation\traefik\letsencrypt\acme.json`):
```
acme.json → openssl pkcs12 -export → PFX → Import-PfxCertificate (RUVDS) →
New-WebBinding *:443:<hostname> SslFlags=1 (SNI) → AddSslCertificate by thumbprint
```
**25 HTTPS bindings live**. Cert chain valid (LE R13, до 2026-07-22). HTTP/2 auto-negotiated. Recipe вынесен в [[../concepts/traefik-acme-json-to-iis-cert-import]].
### Phase 7 — live smoke from VDS (2026-05-23 23:35)
7 prod hostnames → 200 OK + correct content; canonical bare→www 301s (CMS-side). 4 hostnames (`maljarka.tandemmebel.ru`, `rimiz.ru`/www, `rimiz.snolla.com`) → 502/404 — **CMS-internal tenant mismatch** (на source IIS:8089 они возвращают 200 default = тоже degraded pre-existing). Не блокирует cutover.
### Phase 8 — DNS partial-cutover (2026-05-24)
- **~00:00:** user flipped A `kupimknigi.spb.ru` в reg.ru. Сначала ошибочно на `89.253.255.94` (VDS Linux), потом исправлено на `80.64.31.36` (RUVDS). Authoritative `ns1.reg.ru` отдаёт правильное; public resolver-cache (8.8.8.8=6h, 1.1.1.1=24h, Yandex=2h) держат старое до TTL expiry.
- **~12:00:** `emspb.ru` + `www.emspb.ru` flipped (1.1.1.1 + Yandex + reg.ru уже отдают новое, 8.8.8.8 кешировал старое). Smoke `--resolve` + partially-cached real DNS → 200 OK + correct content.
> **TTL=86400 — слишком много.** Lower до 300s в reg.ru для всех hostnames ДО полного DNS swap'а.
### Phase 9 — scope narrow (2026-05-24)
User-decision: `tandemmebel.ru` + `www.tandemmebel.ru` ОСТАЮТСЯ на windows-IIS на неопределённый срок. Cert на RUVDS уже импортирован, HTTPS binding existing — но DNS не свапаем. Source IIS `snolla` site нельзя decommission'ить пока tandemmebel на нём же (catch-all binding). Migration делится: 24 hostnames мигрируют, 2 остаются.
## Decisions log (summary)
- **SMB → SSH/scp pivot** (22:30) — home-ISP блокирует outbound 445, deprecate SMB-метод глобально в bootstrap-концепте.
- **Tariff 2GB / 30GB** — minimum-viable для IIS+1 site catch-all; w3wp ~330 MB cold. Под load monitor.
- **Secrets canonical store** — `pass show ruvds-iis/full-env` после ретроактивной cleanup'а .gitignore.
- **CMS-side degraded** (4 hostnames 502/404) — accept, pre-existing on source, не блокер.
- **TTL не снижен заранее** — ошибка процесса, fix recommendation сделан в pre-swap list.
## Outstanding (post-soak)
- DNS TTL drop до 300s в reg.ru для 22 hostnames.
- Full DNS swap остальных 22 hostnames.
- 1-неделя soak с RUVDS как live prod.
- LE renewal pipeline (recommend: `win-acme` standalone + HTTP-01 после full cutover, ~95 days margin).
- Decommission source IIS:8089 + traefik routes (но не traefik сам).
- Cleanup: temp FW rules `ssh-from-source` + `smb-from-source` + удалить `~/.ssh/ruvds-iis-migration*` keys + `C:\ProgramData\ssh\administrators_authorized_keys`.
- Source-info commit — image-pipeline SPOF осталось (imgproxy на windows-host).
## MinIO/imgproxy caveat (carry-over)
RUVDS IIS coupled к windows-host imgproxy через DNS `imgproxy.kzntsv.site` — SPOF home machine **сохраняется** для image-rendering. HTML rendering работает с RUVDS independent. Verified post-migration: `Test-NetConnection imgproxy.kzntsv.site -Port 443` с RUVDS = OK. См. [[../concepts/iis-cutover-to-vds-services]] для long-term resolution.
## Cross-refs
- Live state: [[../entities/ruvds-iis-host]]
- Source-host (pre-migration): [[../entities/windows-recovery-host]]
- Vendor research: `.tasks/windows-hosting-vendor-research.md` (🟢 closed 2026-05-22)
- Pre-req migrations: [[../concepts/mssql-on-vds]] + [[../concepts/minio-imgproxy-on-vds]]
- Bootstrap recipe (updated 2026-05-24): [[../concepts/windows-server-2025-core-bootstrap]]
- Cert-import recipe: [[../concepts/traefik-acme-json-to-iis-cert-import]]
- Backup pipeline: [[ruvds-backup-daily-kreknin-2026-05-24]]
- Driver (SPOF rationale): [[../concepts/future-resilient-architecture-goals]]
- Pre-existing degraded routes: [[../concepts/iis-migration-2026-05-19-postmortem]] + [[iis-host-migration-2026-05-19]]