Ghost Backup cli - Response code 403 (Forbidden)

Hi! Try to make backup in self hosted server. Run ghost backup and got error…

ghost backup

Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org


+ sudo systemctl is-active ghost_site-com
+ sudo mkdir -p /var/www/site.com/backup
? Enter your Ghost administrator email address site@gmail.com
? Enter your Ghost administrator password [hidden]
✖ Backing up site
An error occurred.
Message: 'Response code 403 (Forbidden)'


Debug Information:
    OS: Ubuntu, v22.04.5 LTS
    Node Version: v20.19.3
    Ghost Version: 5.119.1
    Ghost-CLI Version: 1.27.0
    Environment: production
    Command: 'ghost backup'

Additional log info available in: /home/den/.ghost/logs/ghost-cli-debug-2025-06-26T21_09_33_445Z.log

Try running ghost doctor to check your system for known issues.

Login and password correct. I’ve got email with verification code. And also if login and password incorrect, after have a message about it. Here is everything is correct.

I use cloudlfare for domain. Trying Development mode. Also on server try to disable firewall. Nothing helps for now.

So maybe have another way to save database mysql through ssh and terminal?

There’s a bug open on this in @tryghost/ghost-cli.

You should still be able to export the db with sql.

2 Likes

Thanks for reply. Also 1 another way to install Webmin - open source panel for monitoring your server. Here is also possible to download files and mysql databases.

I am facing this very same issue. On the logs, via ghost log -f I get:

NAME: Needs2FAError
CODE: 2FA_NEW_DEVICE_DETECTED
MESSAGE: User must verify session to login.

I don’t think ghost backup will work for me. :confused:

As per Cathy_Sarisky’s answer this is a bug, so we can’t do nothing here. Only wait for new realese and hope this bug will fixed.