---
title: "Get the backup overview of a project"
method: GET
path: "/api/projects/{projectName}/backups"
tags: ["backups"]
---

# Get the backup overview of a project

`GET /api/projects/{projectName}/backups`

## Request

- Base URL: `https://api.hostim.dev`
- URL: `https://api.hostim.dev/api/projects/{projectName}/backups`
- Auth: HTTP bearer

Returns whether backups are enabled and ready, the schedule and its next run, the retention policy, every database and volume with its last backup, and the backup runs, newest first.

## Path parameters

- `projectName` string, required

## Response `200`

OK

- BackupOverview
  - `enabled` boolean, required: Whether backups are configured for the project
  - `ready` boolean, required: Whether the restic repository is initialized
  - `schedule` string, required: The backup cron schedule from the project, UTC
  - `nextRunTime` string, date-time: When the next scheduled backup runs, omitted when the schedule is empty or invalid
  - `retention` BackupRetention, required: The restic forget policy read from the project, read-only. A field that is not set is not passed to restic.
    - `keepLast` integer: Keep the last N snapshots
    - `keepDaily` integer: Keep the last N daily snapshots
    - `keepWeekly` integer: Keep the last N weekly snapshots
    - `keepMonthly` integer: Keep the last N monthly snapshots
  - `manualRetention` BackupRetention: The restic forget policy read from the project, read-only. A field that is not set is not passed to restic.
    - `keepLast` integer: Keep the last N snapshots
    - `keepDaily` integer: Keep the last N daily snapshots
    - `keepWeekly` integer: Keep the last N weekly snapshots
    - `keepMonthly` integer: Keep the last N monthly snapshots
  - `resources` BackupResource[], required: Every database and volume of the project
    - `kind` string, required: postgres, mysql or volume
    - `name` string, required: Name of the database or volume
    - `lastBackupTime` string, date-time: When the last successful backup of this resource ran
  - `runs` BackupRun[], required: The backup runs, newest first
    - `name` string, required: The name of the Backup custom resource
    - `trigger` string, required: What created the run
    - `scheduledTime` string, date-time: The cron tick this run belongs to
    - `phase` string, required: Pending, Running, Succeeded, PartiallyFailed or Failed
    - `startedAt` string, date-time: When the run started
    - `completedAt` string, date-time: When the run reached a terminal phase
    - `items` BackupItem[], required: The state of each database and volume in the run
      - `kind` string, required: postgres, mysql or volume
      - `name` string, required: Name of the database or volume
      - `phase` string, required: Pending, Running, Succeeded or Failed
      - `id` string: The restic short snapshot ID of this item
      - `sizeBytes` integer: Full size of the backed up data. Missing for backups made before sizes were recorded.
      - `error` string: The reason the item failed
      - `pruned` boolean: Restic removed this snapshot under the retention policy; it can no longer be downloaded

## Other responses

- `401`: User is not authorized
- `404`: Project not found
- `500`: Internal server error

---

[API](https://skmtc.dev/hostim/apis/hostim-api.md) · [All operations](https://skmtc.dev/hostim/apis/hostim-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hostim/apis/hostim-api/revisions/37c35e1026a9?raw)
