{
  "manifest_version": "1.0.0",
  "template": {
    "id": "dca3ed24-cb74-4195-aeb1-7e152e07ccdb",
    "slug": "postgres-s3-backup-1",
    "name": "Postgres S3 Backup (Fastest)",
    "description": "A simple Bun app to back up your PostgreSQL database to S3 via a cron",
    "url": "https://railway.com/deploy/postgres-s3-backup-1",
    "upstream": {
      "repo_url": "https://github.com/slvssb/railway-postgres-s3-backup"
    }
  },
  "services": [
    {
      "name": "Postgres S3 Backup",
      "source": {
        "repo": "https://github.com/slvssb/railway-postgres-s3-backup"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "S3_BUCKET",
      "service": "Postgres S3 Backup",
      "description": "The name of the bucket that the access key ID and secret access key are authorized to access",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "Postgres S3 Backup",
      "description": "The name of the region your bucket is located in, set to auto if unknown.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PG_VERSION",
      "service": "Postgres S3 Backup",
      "description": "Specify a custom PostgreSQL version to override the default version set in the Dockerfile",
      "secret": false,
      "strategy": "default",
      "default": "17"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "Postgres S3 Backup",
      "description": "The S3 custom endpoint you want to use. Applicable for 3rd party S3 services such as Cloudflare R2 or Backblaze R2",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres S3 Backup",
      "description": "The connection string of the database to backup",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_ACCESS_KEY_ID",
      "service": "Postgres S3 Backup",
      "description": "AWS access key ID",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BACKUP_FILE_PREFIX",
      "service": "Postgres S3 Backup",
      "description": "Add a prefix to the file name",
      "secret": false,
      "strategy": "default",
      "default": "backup"
    },
    {
      "key": "S3_FORCE_PATH_STYLE",
      "service": "Postgres S3 Backup",
      "description": "Use path style for the endpoint instead of the default subdomain style, useful for MinIO",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "BUCKET_STORAGE_CLASS",
      "service": "Postgres S3 Backup",
      "description": "Storage class of the Bucket",
      "secret": false,
      "strategy": "default",
      "default": "STANDARD"
    },
    {
      "key": "AWS_SECRET_ACCESS_KEY",
      "service": "Postgres S3 Backup",
      "description": "AWS secret access key, sometimes also called an application key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "postgres-s3-backup-1"
      }
    },
    "cli": "railway deploy --template postgres-s3-backup-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "dca3ed24-cb74-4195-aeb1-7e152e07ccdb",
            "serializedConfig": {
              "buckets": {
                "841f6dbf-233f-47d7-b43a-f99285e9c71e": {
                  "name": "Bucket"
                }
              },
              "services": {
                "f4e0303f-e022-49d1-9761-ea53574512b3": {
                  "icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Postgresql_elephant.svg/1163px-Postgresql_elephant.svg.png",
                  "name": "Postgres S3 Backup",
                  "source": {
                    "repo": "slvssb/railway-postgres-s3-backup",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "S3_BUCKET": {
                      "isOptional": true,
                      "description": "The name of the bucket that the access key ID and secret access key are authorized to access",
                      "defaultValue": "${{Bucket.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": true,
                      "description": "The name of the region your bucket is located in, set to auto if unknown.",
                      "defaultValue": "${{Bucket.REGION}}"
                    },
                    "PG_VERSION": {
                      "isOptional": true,
                      "description": "Specify a custom PostgreSQL version to override the default version set in the Dockerfile",
                      "defaultValue": "17"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "The S3 custom endpoint you want to use. Applicable for 3rd party S3 services such as Cloudflare R2 or Backblaze R2",
                      "defaultValue": "${{Bucket.ENDPOINT}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "The connection string of the database to backup",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "BACKUP_OPTIONS": {
                      "isOptional": true,
                      "description": "Add any valid pg_dump option. Example: --exclude-table=pattern",
                      "defaultValue": ""
                    },
                    "BUCKET_SUBFOLDER": {
                      "isOptional": true,
                      "description": "Define a subfolder to place the backup files in",
                      "defaultValue": ""
                    },
                    "AWS_ACCESS_KEY_ID": {
                      "isOptional": true,
                      "description": "AWS access key ID",
                      "defaultValue": "${{Bucket.ACCESS_KEY_ID}}"
                    },
                    "BACKUP_FILE_PREFIX": {
                      "isOptional": true,
                      "description": "Add a prefix to the file name",
                      "defaultValue": "backup"
                    },
                    "S3_FORCE_PATH_STYLE": {
                      "isOptional": true,
                      "description": "Use path style for the endpoint instead of the default subdomain style, useful for MinIO",
                      "defaultValue": "false"
                    },
                    "BUCKET_STORAGE_CLASS": {
                      "isOptional": true,
                      "description": "Storage class of the Bucket",
                      "defaultValue": "STANDARD"
                    },
                    "AWS_SECRET_ACCESS_KEY": {
                      "isOptional": true,
                      "description": "AWS secret access key, sometimes also called an application key",
                      "defaultValue": "${{Bucket.SECRET_ACCESS_KEY}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-22T16:14:56.866Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-21T02:11:16.293Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_f76e238c40be4d83b40e",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ]
  }
}
