Skip to main content
A snapshot is a backup of an application’s files or a database’s data. squarecloud app snapshot and squarecloud db snapshot work the same way: create makes one, list shows the ones stored, restore puts one back. For create, the app ID is optional: see how the CLI finds your app. The database ID is optional too: without it, the CLI opens a picker of your databases.

squarecloud app snapshot create

Usage
Output
The download link is valid for 1 hour. For a large application, the snapshot can still be generating when the command returns: the CLI says so, and the snapshot shows up in snapshot list in a few minutes. A download is saved readable only by you (0600 permissions), and a failed --download removes the partial file.

squarecloud app snapshot list

Usage
Without an argument, prints one row per snapshot of your applications, with the snapshot ID, how many versions it has, their total size and the last update. Recent snapshot IDs start with the application ID and end with tags such as _javascript_manual. Pass a snapshot ID from that list to see its versions and their version IDs, which restore needs:
With --json, the output keeps the same filter. Listing snapshots needs an active plan.

squarecloud app snapshot restore

Usage
Replaces the application’s current files with a snapshot version. Take <snapshotID> and <versionID> from app snapshot list. It asks for y/N confirmation first.
Output
A restore that takes longer than about 90 seconds keeps running on the platform. The CLI then checks it every 5 seconds and prints each step, until the restore succeeds or fails. A failure exits with code 1 and the reason. Ctrl+C stops watching, not the restore. With --no-wait, the command returns at that point instead, which can still take up to about 90 seconds. If a restore or a snapshot is already running on the application or database, the CLI asks you to wait for it to finish and try again. When snapshots are temporarily unavailable, try again in about 30 seconds.

squarecloud db snapshot create

Usage
Works like app snapshot create, for a database.

squarecloud db snapshot list

Usage
Without an argument, one row per snapshot of your databases. With a snapshot ID, one row per version, with the version IDs restore takes.

squarecloud db snapshot restore

Usage
Replaces the database’s current data with a snapshot version, after a y/N confirmation. A long restore is followed like app snapshot restore does.