Ghost-CLI: The `ghost backup` command no longer works
Issue Summary
Impossible to BACKUP (ghost backup) due to 2FA
Steps to Reproduce
ghost backup
Ghost Version
5.118.0
Node.js Version
20.19.0
How did you install Ghost?
self hosting/ Ubuntu 22.xxx
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
Response code 403 (Forbidden)
Code of Conduct
- I agree to be friendly and polite to people in this repository
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 18 (10 by maintainers)
Commits related to this issue
- Added e2e tesitng for integration tokens ref https://linear.app/ghost/issue/ENG-2148/improve-staff-token-api-access ref https://github.com/TryGhost/Ghost/commit/2320aff94c33dbb71fce17ea798939275fbbec... — committed to TryGhost/Ghost by ErisDS 2 years ago
- Added e2e testing for integration tokens (#23509) ref https://linear.app/ghost/issue/ENG-2148/improve-staff-token-api-access ref https://github.com/TryGhost/Ghost/commit/2320aff94c33dbb71fce17ea79893... — committed to TryGhost/Ghost by ErisDS a year ago
- ✨ Added member export perms to backup integration closes https://linear.app/ghost/issue/ENG-2407/add-member-export-permissions-to-backup-integration ref https://github.com/TryGhost/Ghost-CLI/issues/1... — committed to TryGhost/Ghost by ErisDS a year ago
- ✨ Added member export perms to backup integration (#23589) closes https://linear.app/ghost/issue/ENG-2407/add-member-export-permissions-to-backup-integration ref https://github.com/TryGhost/Ghost-CLI... — committed to TryGhost/Ghost by ErisDS a year ago
- Fixed staff tokens not giving user permissions (#24180) ref https://github.com/TryGhost/Ghost/pull/2336 ref https://github.com/TryGhost/Ghost/pull/23585/files#diff-3d98e1fd51a0472fe91d09aa0749a462500... — committed to TryGhost/Ghost by ErisDS a year ago
- Added GET /db/ to allowed endpoints for api tokens ref https://github.com/TryGhost/Ghost-CLI/issues/1952#issuecomment-2927594223 ref https://github.com/TryGhost/Ghost/commit/3c5f1116335abdf81d4cc6712... — committed to TryGhost/Ghost by ErisDS a year ago
- Added explicit passthrough for Backup Integration ref https://github.com/TryGhost/Ghost-CLI/issues/1952#issuecomment-2927594223 ref https://github.com/TryGhost/Ghost/commit/3c5f1116335abdf81d4cc6712e... — committed to TryGhost/Ghost by ErisDS a year ago
- Added GET /db/ to allowed endpoints for api tokens ref https://github.com/TryGhost/Ghost-CLI/issues/1952#issuecomment-2927594223 ref https://github.com/TryGhost/Ghost/commit/3c5f1116335abdf81d4cc6712... — committed to TryGhost/Ghost by ErisDS a year ago
- Added GET /db/ to allowed endpoints for api tokens (#24208) ref https://github.com/TryGhost/Ghost-CLI/issues/1952#issuecomment-2927594223 ref https://github.com/TryGhost/Ghost/commit/3c5f1116335abdf8... — committed to TryGhost/Ghost by ErisDS a year ago
Hey @vikaspotluri123 I found the problems with auth and am working on fixing them 😬
FYI, there’s a hidden config option to disable 2FA for staff; I put the following in my config.*.json:
Probably not recommended, but helpful for doing backups until this gets fixed.
I’ve made the necessary changes to Ghost itself, such that the DB Backup Integration is able to do both content and member exports. Administrator level staff tokens can also do the same.
This will be released in Ghost v5.121 tomorrow
Now getting this fixed is a matter of switching the auth modes here in Ghost-CLI. Would love a PR for that.
@vikaspotluri123 I agree that there should be an internal tool in Ghost for reading the token and performing the backups. I’d definitely be happy to work on PRs for that, but I don’t think that’s necessary to close this issue. This just needs the prompt changing to get a different kind of auth.
Then we can improve it more after if needed.
Ok as of TryGhost/Ghost#24180, Staff Tokens really should actually have the right permissions 🙈
And as of TryGhost/Ghost#24208, the backup integration will have export as well as backup capabilities.
Both should be in the next release of Ghost