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

Most upvoted comments

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:

  "security": {
    "staffDeviceVerification": false
  },

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