{
  "manifest_version": "1.0.0",
  "template": {
    "id": "2306a32a-4e25-4aae-878e-56a2ad09eb5b",
    "slug": "backup-postgres-to-r2",
    "name": "Backup Postgres to R2",
    "description": "Backup Postgres to R2 (or S3) using Railway's Cron",
    "url": "https://railway.com/deploy/backup-postgres-to-r2",
    "upstream": {
      "repo_url": "https://github.com/dbanty/rclone-postgres-backup"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "rclone-postgres-backup",
      "source": {
        "repo": "https://github.com/dbanty/rclone-postgres-backup"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGHOST",
      "service": "rclone-postgres-backup",
      "description": "The host to connect to, for example localhost or 127.0.0.1.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPORT",
      "service": "rclone-postgres-backup",
      "description": "The port to connect to, defaults to 5432",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGUSER",
      "service": "rclone-postgres-backup",
      "description": "Username for Postgres",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "R2_BUCKET",
      "service": "rclone-postgres-backup",
      "description": "The name of the bucket to upload to",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGDATABASE",
      "service": "rclone-postgres-backup",
      "description": "The name of the database to back up.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "rclone-postgres-backup",
      "description": "Password for Postgres",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "R2_ENDPOINT",
      "service": "rclone-postgres-backup",
      "description": "The S3 API URL for your R2 account",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "R2_ACCESS_KEY_ID",
      "service": "rclone-postgres-backup",
      "description": "An S3-compatible access key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "R2_SECRET_ACCESS_KEY",
      "service": "rclone-postgres-backup",
      "description": "An S3-compatible access key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "backup-postgres-to-r2"
      }
    },
    "cli": "railway deploy --template backup-postgres-to-r2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "2306a32a-4e25-4aae-878e-56a2ad09eb5b",
            "serializedConfig": {
              "services": {
                "937187b9-4100-4788-a97a-2624cbfd5cdd": {
                  "name": "rclone-postgres-backup",
                  "source": {
                    "repo": "dbanty/rclone-postgres-backup",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "PGHOST": {
                      "isOptional": false,
                      "description": "The host to connect to, for example localhost or 127.0.0.1.",
                      "defaultValue": "${{Postgres.PGHOST}}"
                    },
                    "PGPORT": {
                      "isOptional": true,
                      "description": "The port to connect to, defaults to 5432",
                      "defaultValue": "${{Postgres.PGPORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Username for Postgres",
                      "defaultValue": "${{Postgres. PGUSER}}"
                    },
                    "R2_PATH": {
                      "isOptional": true,
                      "description": "A path within the R2 bucket to upload the .tar to, defaults to \"postgres-backup.tar\"",
                      "defaultValue": ""
                    },
                    "R2_BUCKET": {
                      "isOptional": false,
                      "description": "The name of the bucket to upload to",
                      "defaultValue": "{{R2_BUCKET}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "The name of the database to back up.",
                      "defaultValue": "${{Postgres.PGDATABASE}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Password for Postgres",
                      "defaultValue": "${{Postgres. PGPASSWORD}}"
                    },
                    "R2_ENDPOINT": {
                      "isOptional": false,
                      "description": "The S3 API URL for your R2 account",
                      "defaultValue": "{{R2_ENDPOINT}}"
                    },
                    "R2_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "An S3-compatible access key",
                      "defaultValue": "{{R2_ACCESS_KEY_ID}}"
                    },
                    "R2_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "An S3-compatible access key",
                      "defaultValue": "{{R2_SECRET_ACCESS_KEY}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0"
}
