# Migration Rollback Plan

## If Things Go Wrong

### Immediate Rollback (During Migration)

**If service fails on new VPS:**
1. DO NOT stop TX1 service
2. Revert DNS in Cloudflare (instant)
3. TX1 service continues working
4. Debug VPS issue offline

**Maximum Downtime:** DNS TTL (5 minutes)

---

## Service-Specific Rollback

### Gitea Rollback
```bash
# On Cloudflare
git.firefrostgaming.com A record → 38.68.14.26 (TX1)

# On TX1
systemctl start gitea
```

### Uptime Kuma Rollback
```bash
# On Cloudflare
status.firefrostgaming.com A record → 38.68.14.26 (TX1)

# On TX1
systemctl start uptime-kuma
```

### MkDocs Rollback
```bash
# On Cloudflare
docs.firefrostgaming.com A record → 38.68.14.26 (TX1)

# On TX1
systemctl start mkdocs
```

---

## Data Recovery

### If Backup Needed
All backups stored in `/root/migration-backups/` on TX1:
- `gitea-backup.tar.gz` + `gitea-dump.sql`
- `kuma-backup.tar.gz`
- `mkdocs-source.tar.gz`

**Retention:** 7 days after successful migration

---

## Lessons Learned Log

**What went wrong:**
- 

**Root cause:**
- 

**How we fixed it:**
- 

**How to prevent next time:**
- 

---

**Remember:** Don't panic. TX1 services are still running. DNS changes are instant.
