Files
coolify/scripts/transfer-test/snapshot.php
T
Andras Bacsai c454f84545 fix(server-transfer): keep imported data exact and guard archived servers
- Skip TrimStrings and ConvertEmptyStringsToNull on the import route; an empty shared variable failed the whole import
- Keep compose parser versions, static ports, legacy variable keys, and only the bundle's variables and destinations
- Give the transfer back token the deploy permission that the import needs
- Move the Cloudflare tunnel DNS record with the server and park it on the source
- Refuse cloud server deletes, power on, tunnel and DNS changes, and scp for archives; skip their backup alerts and provider polling
- Add a column-level round-trip test, archive guard tests, and a live full-coverage transfer test
- Advance the GitLab App sequence in the dev seeder
2026-10-22 15:52:20 +02:00

11 lines
537 B
PHP

<?php
use Tests\Support\ServerTransferSnapshot;
// Writes the portable snapshot of a server (Tests\Support\ServerTransferSnapshot) to a file. snapshot.sh runs it.
// Input (set before `require`): $snapshotServer (server uuid), $snapshotOut (output file).
$snapshot = ServerTransferSnapshot::take($snapshotServer);
file_put_contents($snapshotOut, json_encode($snapshot, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
echo 'snapshot: '.collect($snapshot)->map(fn (array $rows) => count($rows))->sum()." rows\n";