{
  "manifest_version": "1.0.0",
  "template": {
    "id": "fb93c3c7-fcc6-4592-aa7d-c20578830aae",
    "slug": "postgres-s3-backup",
    "name": "Postgres S3 Backup",
    "description": "A simple method for postgres backups to a S3 instance on railway",
    "url": "https://railway.com/deploy/postgres-s3-backup",
    "upstream": {
      "repo_url": "https://github.com/ItsNoxius/railway-postgres-s3-backups"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres S3 Backup",
      "source": {
        "repo": "https://github.com/ItsNoxius/railway-postgres-s3-backups"
      },
      "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": "ask_user"
    },
    {
      "key": "S3_REGION",
      "service": "Postgres S3 Backup",
      "description": "The name of the region your bucket is located in, set to `us-east-1` if unknown.",
      "secret": false,
      "strategy": "default",
      "default": "us-east-1"
    },
    {
      "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": "BUN_VERSION",
      "service": "Postgres S3 Backup",
      "description": "Specify a custom Bun version to override the default version set in the Dockerfile.",
      "secret": false,
      "strategy": "default",
      "default": "1.3"
    },
    {
      "key": "MAX_BACKUPS",
      "service": "Postgres S3 Backup",
      "description": "Maximum number of backups to keep in S3. Oldest backups are deleted when exceeded. 0 = unlimited. Default `0`.",
      "secret": false,
      "strategy": "default",
      "default": "10"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres S3 Backup",
      "description": "The connection string of the database to backup.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "S3_ACCESS_KEY",
      "service": "Postgres S3 Backup",
      "description": "S3 Access Key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "S3_SECRET_KEY",
      "service": "Postgres S3 Backup",
      "description": "S3 secret key",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "BACKUP_FILE_PREFIX",
      "service": "Postgres S3 Backup",
      "description": "Add a prefix to the file name.",
      "secret": false,
      "strategy": "default",
      "default": "backup_"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "postgres-s3-backup"
      }
    },
    "cli": "railway deploy --template postgres-s3-backup",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "fb93c3c7-fcc6-4592-aa7d-c20578830aae",
            "serializedConfig": {
              "services": {
                "96d9b4df-847b-4124-89bd-e67c8b0b6274": {
                  "icon": "https://devicons.railway.com/i/postgresql.svg",
                  "name": "Postgres S3 Backup",
                  "deploy": {
                    "cronSchedule": "0 0 * * *"
                  },
                  "source": {
                    "repo": "ItsNoxius/railway-postgres-s3-backups",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "S3_BUCKET": {
                      "description": "The name of the bucket that the access key ID and secret access key are authorized to access.",
                      "defaultValue": "{{S3_BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": true,
                      "description": "The name of the region your bucket is located in, set to `us-east-1` if unknown.",
                      "defaultValue": "us-east-1"
                    },
                    "PG_VERSION": {
                      "isOptional": true,
                      "description": "Specify a custom PostgreSQL version to override the default version set in the Dockerfile.",
                      "defaultValue": "17"
                    },
                    "BUN_VERSION": {
                      "isOptional": true,
                      "description": "Specify a custom Bun version to override the default version set in the Dockerfile.",
                      "defaultValue": "1.3"
                    },
                    "MAX_BACKUPS": {
                      "isOptional": true,
                      "description": "Maximum number of backups to keep in S3. Oldest backups are deleted when exceeded. 0 = unlimited. Default `0`.",
                      "defaultValue": "10"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": true,
                      "description": "The S3 custom endpoint you want to use. Applicable for 3-rd party S3 services such as Cloudflare R2 or Backblaze R2.",
                      "defaultValue": ""
                    },
                    "DATABASE_URL": {
                      "description": "The connection string of the database to backup.",
                      "defaultValue": "{{DATABASE_URL}}"
                    },
                    "S3_ACCESS_KEY": {
                      "description": "S3 Access Key",
                      "defaultValue": "{{S3_ACCESS_KEY}}"
                    },
                    "S3_SECRET_KEY": {
                      "description": "S3 secret key",
                      "defaultValue": "{{S3_SECRET_KEY}}"
                    },
                    "BACKUP_OPTIONS": {
                      "isOptional": true,
                      "description": "Add any valid pg_dump option, supported pg_dump options can be found [here](https://www.postgresql.org/docs/current/app-pgdump.html). Example: `--exclude-table=pattern`",
                      "defaultValue": ""
                    },
                    "BACKUP_FILE_PREFIX": {
                      "isOptional": true,
                      "description": "Add a prefix to the file name.",
                      "defaultValue": "backup_"
                    },
                    "DISCORD_WEBHOOK_URL": {
                      "isOptional": true,
                      "description": "An optional Discord Webhook to notify of backup status",
                      "defaultValue": ""
                    },
                    "S3_FORCE_PATH_STYLE": {
                      "isOptional": true,
                      "description": "Use path style for the endpoint instead of the default subdomain style, useful for MinIO. Default `false`",
                      "defaultValue": ""
                    },
                    "SUPPORT_OBJECT_LOCK": {
                      "isOptional": true,
                      "description": "Enables support for buckets with object lock by providing an MD5 hash with the backup file.",
                      "defaultValue": ""
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0"
}
