backup
The backup router: 20 methods of the backup capability, with tier, scope, input and output.
Capability backup · scope system · mode singleton · source packages/types/src/capabilities/backup.cap.ts:327.
Every method is called at /trpc/backup.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
listDestinations | query | admin | admin only | no |
trigger | mutation | admin | admin only | no |
listRuns | query | admin | admin only | no |
cancel | mutation | admin | admin only | no |
list | query | admin | admin only | no |
listLocations | query | admin | admin only | no |
getEntries | query | admin | admin only | no |
restore | mutation | admin | admin only | no |
getEncryption | query | admin | admin only | no |
setupEncryption | mutation | admin | admin only | no |
disableEncryption | mutation | admin | admin only | no |
checkBackupKey | mutation | admin | admin only | no |
delete | mutation | admin | admin only | no |
listArchives | query | admin | admin only | no |
upsertDestinationPolicy | mutation | admin | admin only | no |
previewSchedule | query | protected | view | no |
listSchedules | query | admin | admin only | no |
listAvailableDatabases | query | admin | admin only | no |
upsertSchedule | mutation | admin | admin only | no |
deleteSchedule | mutation | admin | admin only | no |
backup.listDestinations
- Kind: query —
GET /trpc/backup.listDestinations - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.listDestinationson your hub
Input
voidOutput
BackupDestinationInfoSchema[]Shapes: BackupDestinationInfoSchema
backup.trigger
- Kind: mutation —
POST /trpc/backup.trigger - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.triggeron your hub
Input
{ destinations?: string[]; locations?: string[]; label?: string; retentionCount?: number; databases?: DataStoreDatabaseSchema[] }?Output
BackupTriggerResultSchemaShapes: DataStoreDatabaseSchema · BackupTriggerResultSchema
backup.listRuns
- Kind: query —
GET /trpc/backup.listRuns - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.listRunson your hub
Input
voidOutput
BackupRunSchema[]Shapes: BackupRunSchema
backup.cancel
- Kind: mutation —
POST /trpc/backup.cancel - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.cancelon your hub
Input
{ runId: string }Output
{ cancelled: boolean }backup.list
- Kind: query —
GET /trpc/backup.list - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.liston your hub
Input
voidOutput
BackupEntrySchema[]Shapes: BackupEntrySchema
backup.listLocations
- Kind: query —
GET /trpc/backup.listLocations - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.listLocationson your hub
Input
voidOutput
LocationStatSchema[]Shapes: LocationStatSchema
backup.getEntries
- Kind: query —
GET /trpc/backup.getEntries - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.getEntrieson your hub
Input
{ destinationId: string; backupId: string }Output
ArchiveManifestSchema | nullShapes: ArchiveManifestSchema
backup.restore
- Kind: mutation —
POST /trpc/backup.restore - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.restoreon your hub
Input
{ destinationId: string; backupId: string; locations?: string[]; backupSecretKey?: string }Output
voidbackup.getEncryption
- Kind: query —
GET /trpc/backup.getEncryption - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.getEncryptionon your hub
Input
voidOutput
BackupEncryptionStatusSchemaShapes: BackupEncryptionStatusSchema
backup.setupEncryption
- Kind: mutation —
POST /trpc/backup.setupEncryption - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.setupEncryptionon your hub
Input
{}Output
{ keyId: string; secretKey: string; publicKey: string; createdAt: number; replacedKeyId: string | null }backup.disableEncryption
- Kind: mutation —
POST /trpc/backup.disableEncryption - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.disableEncryptionon your hub
Input
{}Output
{ disabledKeyId: string | null }backup.checkBackupKey
- Kind: mutation —
POST /trpc/backup.checkBackupKey - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.checkBackupKeyon your hub
Input
{ backupSecretKey: string }Output
{ valid: boolean; keyId: string | null; known: boolean; active: boolean; error?: string }backup.delete
- Kind: mutation —
POST /trpc/backup.delete - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.deleteon your hub
Input
{ destinationId: string; backupId: string }Output
voidbackup.listArchives
- Kind: query —
GET /trpc/backup.listArchives - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.listArchiveson your hub
Input
{ destinationId: string }Output
({ id: string; filename: string; createdAt: number; sizeBytes: number; label?: string; locations: string[]; encryption?: BackupArchiveEncryptionSchema; databases?: DataStoreDatabaseSchema[] })[]Shapes: BackupArchiveEncryptionSchema · DataStoreDatabaseSchema
backup.upsertDestinationPolicy
- Kind: mutation —
POST /trpc/backup.upsertDestinationPolicy - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.upsertDestinationPolicyon your hub
Input
{ locationId: string; enabled: boolean; retentionCount: number; label?: string }Output
voidbackup.previewSchedule
- Kind: query —
GET /trpc/backup.previewSchedule - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitybackup, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=backup.previewScheduleon your hub
Input
{ cron: string; count?: number }Output
{ ok: boolean; error?: string; nextRuns: number[] }backup.listSchedules
- Kind: query —
GET /trpc/backup.listSchedules - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.listScheduleson your hub
Input
voidOutput
({ id: string; label: string; cron: string; enabled: boolean; locationIds: string[]; retentionCount: number; dataSources?: string[]; databases?: DataStoreDatabaseSchema[]; lastAttemptAt?: number; lastSuccessAt?: number; lastError?: string; nextRunAt?: number })[]Shapes: DataStoreDatabaseSchema
backup.listAvailableDatabases
- Kind: query —
GET /trpc/backup.listAvailableDatabases - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.listAvailableDatabaseson your hub
Input
voidOutput
{ answered: boolean; databases: DataStoreDatabaseSchema[] }Shapes: DataStoreDatabaseSchema
backup.upsertSchedule
- Kind: mutation —
POST /trpc/backup.upsertSchedule - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.upsertScheduleon your hub
Input
{ id?: string; label: string; cron: string; enabled: boolean; locationIds: string[]; retentionCount: number; dataSources?: string[]; databases?: DataStoreDatabaseSchema[] }Output
{ id: string; label: string; cron: string; enabled: boolean; locationIds: string[]; retentionCount: number; dataSources?: string[]; databases?: DataStoreDatabaseSchema[]; lastAttemptAt?: number; lastSuccessAt?: number; lastError?: string; nextRunAt?: number }Shapes: DataStoreDatabaseSchema
backup.deleteSchedule
- Kind: mutation —
POST /trpc/backup.deleteSchedule - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=backup.deleteScheduleon your hub
Input
{ id: string }Output
void