Trigger backup with uploads per api seems not to include uploads

Hi there,

I am playing around with triggering the creation of backups for discourse via the api.

A strange thing I noticed is, that it seems not include the uploads. When triggered via the api the backup has a size of 140mb. When triggering it via the Backup-Button the backup has a size of 330mb.

I am triggering the backup with the following command:

curl -XPOST -H 'Content-Type: application/json' "https://talk.rhein-spree.com/admin/backups.json?api_key=mykey&api_username=sebastian" -d '{ "with_uploads": true }'

Am I doing something wrong or is there a bug with backups triggered via the api?

You should send it as form data instead of JSON. That works.

curl --request POST \
  --url http://example.com/admin/backups.json \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data 'api_key=<api_key>&api_username=<username>&with_uploads=true'
4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.