Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

537 B
Raw Blame
<?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";