--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "dokploy_volume_backup Resource - dokploy" subcategory: "" description: |- A scheduled backup of a Docker volume to a configured dokploy_destination. This is the counterpart to a dokploy_mount with type = "volume": the mount gives the volume a stable name, and this resource copies its contents off the host on a schedule. Set exactly one of the *_id attributes to say which service owns the volume. --- # dokploy_volume_backup (Resource) A scheduled backup of a Docker volume to a configured `dokploy_destination`. This is the counterpart to a `dokploy_mount` with `type = "volume"`: the mount gives the volume a stable name, and this resource copies its contents off the host on a schedule. Set exactly one of the `*_id` attributes to say which service owns the volume. ## Schema ### Required - `cron_expression` (String) Standard five-field cron expression, for example `0 4 * * *`. - `destination_id` (String) Backup destination (S3-compatible bucket) to upload to. - `name` (String) Display name of the backup job. - `prefix` (String) Path prefix inside the destination bucket, for example `backups/shop/`. - `volume_name` (String) Name of the Docker volume to back up. ### Optional - `app_name` (String) Docker service name that owns the volume. Derived by Dokploy when omitted. - `application_id` (String) Application that owns the volume. - `compose_id` (String) Compose stack that owns the volume. - `enabled` (Boolean) Whether the backup schedule is active. - `keep_latest_count` (Number) Number of backups to retain. Older ones are pruned. - `libsql_id` (String) libSQL instance that owns the volume. - `mariadb_id` (String) MariaDB instance that owns the volume. - `mongo_id` (String) MongoDB instance that owns the volume. - `mysql_id` (String) MySQL instance that owns the volume. - `postgres_id` (String) PostgreSQL instance that owns the volume. - `redis_id` (String) Redis instance that owns the volume. - `service_name` (String) Service inside a Compose stack that owns the volume. - `service_type` (String) The kind of service that owns the volume. Valid values: `application`, `postgres`, `mysql`, `mariadb`, `mongo`, `redis`, `compose`, `libsql`. Defaults to `application`. - `turn_off` (Boolean) Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to. ### Read-Only - `created_at` (String) RFC 3339 timestamp of when the backup job was created. - `id` (String) Unique volume backup identifier.