Antes de ejecutar cualquier script de restauración, debes confirmar que el mapa está realmente corrupto y no sufriendo un fallo de permisos, falta de RAM o un mod incompatible. En servidores de **ARK: Survival Evolved/Ascended** y **Rust**, el 40% de los "mapas corruptos" reportados son en realidad problemas de **I/O** o bloqueos de archivos.
Síntomas de corrupción real
| Juego | Archivo afectado | Síntoma en consola/log | |-------|------------------|------------------------| | ARK | `TheIsland.ark` o `*.arkprofile` | `Fatal error: Corrupted data` o `Couldn't read file` | | ARK | `*.arktribe` | `Tribe data mismatch` | | Rust | `proceduralmap.*.map` | `Invalid checksum` o `Map load failed` | | Rust | `player.blueprints.*.db` | `SQLite corruption detected` |
Verificación rápida de integridad (Linux)
# ARK: verificar tamaño y firma del archivo
ls -lh /home/container/ShooterGame/Saved/SavedArks/TheIsland.ark
file /home/container/ShooterGame/Saved/SavedArks/TheIsland.ark
# Rust: verificar checksum del mapa procedural md5sum /home/container/server/rustserver/proceduralmap.4000.12345.map ```
Si el archivo tiene **0 bytes** o un tamaño anormalmente pequeño (menos del 10% del tamaño habitual), la corrupción es estructural. Si el tamaño es correcto pero el servidor no arranca, puede ser un problema de **encabezado** o **footer** del archivo.
Paso 1: Congelar el Estado del Servidor
**Nunca** intentes reparar un mapa mientras el servidor está escribiendo datos. Esto empeora la corrupción.
# Detener el servidor inmediatamente (ARK)
./ShooterGameServer TheIsland?listen -server -log &
kill -STOP $(pgrep -f ShooterGameServer)
# Detener Rust pkill -STOP -f RustDedicated ```
La señal `SIGSTOP` congela el proceso sin cerrar archivos abiertos, permitiéndote copiar el estado exacto antes de que el kernel sincronice buffers corruptos.
Paso 2: Backup Forense con Copia Binaria
No uses `cp` simple. Utiliza `dd` para capturar el archivo byte a byte, incluyendo sectores dañados:
# Backup forense del mapa ARK
dd if=/home/container/ShooterGame/Saved/SavedArks/TheIsland.ark \
of=/backup/TheIsland.ark.corrupto.$(date +%Y%m%d_%H%M%S) \
bs=4096 conv=noerror,sync
# Backup del mapa Rust dd if=/home/container/server/rustserver/proceduralmap.4000.12345.map \ of=/backup/proceduralmap.corrupto.$(date +%Y%m%d_%H%M%S) \ bs=4096 conv=noerror,sync ```
La opción `conv=noerror,sync` permite continuar la copia incluso si encuentra sectores ilegibles, rellenando con ceros.
Paso 3: Restauración desde Backups Incrementales
ARK: Sistema de snapshots automáticos
ARK guarda automáticamente copias con sufijo temporal:
ls -lt /home/container/ShooterGame/Saved/SavedArks/ | head -20
Busca archivos como `TheIsland_AntiCorruptionBackup.bak` o `TheIsland_2024.01.15_08.30.00.ark`. El archivo `AntiCorruptionBackup.bak` es la última instantánea válida que el motor guardó antes de detectar la corrupción.
**Restauración manual:**
# Detener servidor
pkill -9 -f ShooterGameServer
# Mover archivo corrupto a cuarentena mv TheIsland.ark TheIsland.ark.corrupto_manual
# Restaurar backup más reciente cp TheIsland_AntiCorruptionBackup.bak TheIsland.ark
# Verificar integridad file TheIsland.ark ```
Rust: Rotación de mapas y backups
Rust no tiene snapshots automáticos, pero puedes configurar rotación manual:
# Script de backup incremental para Rust (crontab cada 30 min)
*/30 * * * * tar -czf /backup/rust_map_$(date +\%Y\%m\%d_\%H\%M).tar.gz \
/home/container/server/rustserver/proceduralmap.*.map \
/home/container/server/rustserver/player.blueprints.*.db