a month ago
Hello Railway Support,
I am using Railway CLI 5.49.3 with an interactive OAuth login. Read-only access to my target succeeds, but the documented on-demand PostgreSQL volume-backup command is rejected.
Latest failed attempt:
- UTC time: 2026-09-07 18:18:20Z
- Project: respectful-nature
- Environment: production
- Service: Postgres
- Volume: postgres-volume
- Requested backup name: M23-Part8-PreRelease-2026-09-07
- CLI exit code: 1
- Error code: OAUTH_INSUFFICIENT_GRANT
- Error: Failed to create a backup
- CLI hint: If you believe you have access, run
railway loginagain and ensure the integration has access to this project.
Sanitized command template—the actual project identifier is intentionally omitted:
railway.cmd postgres pitr backup create --project "<respectful-nature project ID>" --environment production --service Postgres --name M23-Part8-PreRelease-2026-09-07 --jsonEvidence available before the mutation:
railway whoamisucceeds.- The account was returned as workspace
ADMINby a read-only authorization query. - The CLI can resolve the exact project, environment, service, and volume.
railway postgres pitr backup listsucceeds for that exact target.- The duplicate guard found one older backup, zero records with the requested name, and zero newly timed records.
- Railway Account Settings → Apps shows the authorized app
Railway CLIwith these scopes:workspace:admin,project:admin,ssh_keys,offline_access,openid,email, andprofile. - In that app,
respectful-natureis visibly checked under Selected Projects. - The selected workspace is visibly checked. Its workspace-level Save button appears enabled in the screenshot, so I cannot claim from the screenshot alone that every displayed workspace selection was persisted.
Recovery attempts already completed:
- An ordinary Railway CLI login did not resolve the denial.
- A full
railway.cmd logout, followed byrailway.cmd loginand browser consent, also did not resolve it. - After each failed create, the backup list still contained only the older backup; no matching backup or acknowledged workflow appeared.
- No create command was automatically retried.
Railway CLI v5.49.3's public source shows that this command calls the volumeInstanceBackupCreate GraphQL mutation. The same source classifies OAUTH_INSUFFICIENT_GRANT only after the OAuth session remains live but the resource request is still denied.
Could you please explain how the effective OAuth authorization is resolved for volumeInstanceBackupCreate when the Authorized Apps page displays project:admin and the target project is selected? In particular:
- Is
volumeInstanceBackupCreatesupported for the Railway CLI interactive OAuth client with a project-scopedproject:admingrant? - Is there another account, workspace, project, environment, or volume permission that the mutation requires but the UI does not show?
- If the displayed grant should be sufficient, could this be a stale grant, authorization-resolution, or backend-policy issue?
- What is the supported least-privilege remedy that does not require sharing credentials or broadening access to unrelated projects?
Unsupported inference, stated separately: the displayed grant and successful reads make an authorization-resolution mismatch plausible, but they do not by themselves prove a Railway backend defect. I am asking Railway to confirm the effective server-side authorization decision.
No nonsecret correlation or request ID was returned or retained. I can provide the sanitized UTC timestamp, CLI version, target names, and error above, but I will not provide access tokens, refresh tokens, cookies, authorization headers, connection strings, or secrets.
Thank you.
4 Replies
a month ago
The volumeInstanceBackupCreate mutation requires a Pro plan ($20/month). Hobby workspaces have a backup limit of zero, and the mutation is rejected outright regardless of OAuth scopes or workspace role. Listing backups is not plan-gated, which is why reads succeed under the same session. Upgrading to Pro unlocks creating, restoring, locking, and scheduling volume backups.
Status changed to Awaiting User Response Railway • 28 days ago
21 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 21 days ago
9 days ago
Follow-up on production Postgres volume backups for respectful-nature. The workspace now displays PRO, and completed volume backups were created on Sep 21 and Sep 22 after the earlier Hobby-plan reply. The attached postgres-volume is 500 MB, with current usage about 150 MB, below the documented 50% manual-backup limit.
On Sep 23, one New backup click did not produce a visible backup. Today, Sep 26 at approximately 23:50 UTC, I clicked New backup once in the production Postgres Backups tab. The UI showed 'Creating backup' and briefly disabled the button, then returned to normal. After refresh and several minutes, the newest listed completed backup is still M26-Part6A-Pre144-20260922 (156 MB); there is no new or pending entry, and project activity has no new backup event. I did not repeat today's click.
Could you check the server-side outcome of today's request and the Sep 23 attempt, identify why no backup appears, and tell us the supported safe way to obtain and verify a fresh pre-migration volume backup? Please also confirm whether any backup is still in progress before we retry. We will not share credentials, tokens, connection strings, or database contents. Thank you.
Status changed to Awaiting Railway Response Railway • 9 days ago
9 days ago
The production postgres-volume is currently in a READY state, 500 MB in size with about 156 MB used, and it shows no backup or restore running against it, so there is nothing in progress to wait on before you try again.
On Pro, the manual backup limit is 10 backups per volume and total backup storage of up to 50% of the volume's size. That cap applies to the combined size of the backups kept for the volume, not to how much of the volume is in use. For a 500 MB volume the backup allowance is about 250 MB, and your Sep 22 backup alone takes 156 MB of it before counting the Sep 21 backup and the older one. A new backup of about the same size would take the total over that allowance.
To get a fresh pre-migration backup, delete one or more older backups you no longer need from the Postgres service's Backups tab, then click New backup once. Deleting backups is always available. The new backup is confirmed once it shows in that tab as a completed entry with a size close to the volume's current usage.
Status changed to Awaiting User Response Railway • 9 days ago
Railway
The production `postgres-volume` is currently in a READY state, 500 MB in size with about 156 MB used, and it shows no backup or restore running against it, so there is nothing in progress to wait on before you try again. On Pro, the manual backup limit is 10 backups per volume and total backup storage of up to 50% of the volume's size. That cap applies to the combined size of the backups kept for the volume, not to how much of the volume is in use. For a 500 MB volume the backup allowance is about 250 MB, and your Sep 22 backup alone takes 156 MB of it before counting the Sep 21 backup and the older one. A new backup of about the same size would take the total over that allowance. To get a fresh pre-migration backup, delete one or more older backups you no longer need from the Postgres service's Backups tab, then click New backup once. Deleting backups is always available. The new backup is confirmed once it shows in that tab as a completed entry with a size close to the volume's current usage.
9 days ago
Thanks for checking. Please escalate to a human Railway engineer before we alter production recovery. The public Backups documentation says manual backups are limited to 50% of volume size, but does not say whether this is a combined retained-backup cap. The UI lists seven existing 136–156 MB backups on this 500 MB volume; since backups are incremental/copy-on-write, adding displayed sizes may not represent actual exclusive storage. Please confirm the exact backend denial for the Sep 23 and Sep 26 requests, actual quota/usage, and whether a live volume increase to 1 GB would safely allow one fresh backup while preserving every existing recovery point. We will not delete older backups or retry until the backend outcome and safe remedy are confirmed.
Status changed to Awaiting Railway Response Railway • 9 days ago
8 days ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • 8 days ago