Cannot run "ghost backup"

Cannot run “ghost backup”: Response code 401 (Unauthorized)

I have copied the Ghost Staff access token from my profile.


ghost backup --verbose
...

✔ **Enter your Ghost Staff access token**
✖ Backing up site

An error occurred.
Message: 'Response code 401 (Unauthorized)'

Stack: HTTPError: Response code 401 (Unauthorized)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/ghost-cli/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (node:events:519:28)
    ...
    Path: /ghost/api/admin/db/

Debug Information:
OS: Ubuntu, v24.04.3 LTS
Node Version: v22.23.2
Ghost Version: 6.57.1
Ghost-CLI Version: 1.31.1
Environment: production
Command: 'ghost backup --verbose'

ghost doctor: everything OK

I had different versions of
node -v, ghost -v

  • with and without nvm
  • as user root and as user ghostadmin

I sorted everything out!
Now it works :slight_smile: