{
  "manifest_version": "1.0.0",
  "template": {
    "id": "cb0bb819-2919-4827-84d5-af5dd1cbbda1",
    "slug": "bun-pg-s3-backup",
    "name": "bun-pg-s3-backup",
    "description": "A simple Bun cron job to backup PostgreSQL databases to an S3 bucket",
    "url": "https://railway.com/deploy/bun-pg-s3-backup",
    "upstream": {
      "repo_url": "https://github.com/logic-pad/postgres-s3-backups"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "postgres-backups-cron",
      "source": {
        "repo": "https://github.com/logic-pad/postgres-s3-backups"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "AWS_S3_BUCKET",
      "service": "postgres-backups-cron",
      "description": "S3 bucket name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_S3_REGION",
      "service": "postgres-backups-cron",
      "description": "S3 region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_S3_ENDPOINT",
      "service": "postgres-backups-cron",
      "description": "Custom S3 endpoint",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "AWS_ACCESS_KEY_ID",
      "service": "postgres-backups-cron",
      "description": "S3 access key ID",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BACKUP_DATABASE_URL",
      "service": "postgres-backups-cron",
      "description": "URL of the Postgres database you want to backup",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "AWS_SECRET_ACCESS_KEY",
      "service": "postgres-backups-cron",
      "description": "S3 secret access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "BACKUP_RETENTION_DAYS",
      "service": "postgres-backups-cron",
      "description": "Number of days the backups should be retained for. Leave empty to retain indefinitely",
      "secret": false,
      "strategy": "default",
      "default": "7"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "bun-pg-s3-backup"
      }
    },
    "cli": "railway deploy --template bun-pg-s3-backup",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "cb0bb819-2919-4827-84d5-af5dd1cbbda1",
            "serializedConfig": {
              "buckets": {
                "d53a6725-de1d-45d0-b203-3cdef26d2e56": {
                  "name": "postgres-backups"
                }
              },
              "services": {
                "3c405038-66dd-47c5-8ab5-91276ddddca8": {
                  "icon": "https://devicons.railway.com/i/bun.svg",
                  "name": "postgres-backups-cron",
                  "deploy": {
                    "cronSchedule": "0 0 * * *",
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "repo": "https://github.com/logic-pad/postgres-s3-backups",
                    "rootDirectory": null
                  },
                  "variables": {
                    "AWS_S3_BUCKET": {
                      "isOptional": false,
                      "description": "S3 bucket name",
                      "defaultValue": "${{postgres-backups.BUCKET}}"
                    },
                    "AWS_S3_REGION": {
                      "isOptional": false,
                      "description": "S3 region",
                      "defaultValue": "${{postgres-backups.REGION}}"
                    },
                    "BACKUP_OPTIONS": {
                      "isOptional": true,
                      "description": "Any valid pg_dump options",
                      "defaultValue": ""
                    },
                    "AWS_S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Custom S3 endpoint",
                      "defaultValue": "${{postgres-backups.ENDPOINT}}"
                    },
                    "BUCKET_SUBFOLDER": {
                      "isOptional": true,
                      "description": "An optional subfolder to place the backups in",
                      "defaultValue": ""
                    },
                    "AWS_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "S3 access key ID",
                      "defaultValue": "${{postgres-backups.ACCESS_KEY_ID}}"
                    },
                    "BACKUP_FILE_PREFIX": {
                      "isOptional": true,
                      "description": "An optional prefix to the file name",
                      "defaultValue": ""
                    },
                    "BACKUP_DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL of the Postgres database you want to backup",
                      "defaultValue": "{{BACKUP_DATABASE_URL}}"
                    },
                    "AWS_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "S3 secret access key",
                      "defaultValue": "${{postgres-backups.SECRET_ACCESS_KEY}}"
                    },
                    "BACKUP_RETENTION_DAYS": {
                      "isOptional": true,
                      "description": "Number of days the backups should be retained for. Leave empty to retain indefinitely",
                      "defaultValue": "7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0"
}
