Skip to main content
Snapshots come in three scopes: per application, per database, and account-wide.

The Snapshot struct

Listing methods return []squarecloud.Snapshot:

Application snapshots

Listing

Creating

api.CreateApplicationSnapshot(appID) triggers a fresh snapshot and returns a squarecloud.SnapshotCreated with the signed download URL.

Restoring

api.RestoreApplicationSnapshot(appID, snapshotID, versionID) rolls the application back to a previous snapshot version.

Database snapshots

The database scope mirrors the application one:

Listing snapshots account-wide

api.UserSnapshots(scope) returns every snapshot you own across all your applications or databases. The scope is one of the squarecloud.SnapshotScope* constants:
Account-wide snapshot listing requires an active paid plan. Each plan also has a daily snapshot quota — once it’s exhausted, creation fails with the DAILY_SNAPSHOTS_LIMIT_REACHED code, distinct from the generic KEEP_CALM rate-limit error.