I would like support of backup to a backblaze destination.
At the moment Im not able to set a endpoint like: s3.eu-central-003.backblazeb2.com
I would like support of backup to a backblaze destination.
At the moment Im not able to set a endpoint like: s3.eu-central-003.backblazeb2.com
Just in case you havenāt seen this: Configure an S3 compatible object storage provider for uploads
Nope I had not⦠Now I have ![]()
But then again you need a ph.d to be able to do a simple thing. For futrure release Admin Usability could be an issue.
Discourse have many advance features - but they are also too advance to use for an average user (me :
)
By the way - I only want the backup to be stored remote from the server.
No need for upload like images etc is stored on a CDN. My forum is not that big or have that high usageā¦
Its on a simple 5 dollars dropletā¦
Oh, that should be quite simple then. Though if itās not too big, maybe itās just less hassle to use AWS S3? Their pricing isnāt too bad for storage, itās just kind of hectic for bandwidth.
I think youād just need to put this in your app.yml with the correct info and rebuild. Itās excluding the parts that are for user uploads. You wouldnāt need to include the after_assets_precompile other part from the tutorial.
Just SSH into your server as root then run:
cd /var/discourse
nano containers/app.yml
Use the keyboard arrows to move the curser around and paste in the info below underneath the part of the file that says: #DISCOURSE_CDN_URL: https://discourse-cdn.example.com
DISCOURSE_S3_REGION: "us-west-002"
DISCOURSE_S3_INSTALL_CORS_RULE: false
DISCOURSE_S3_ENDPOINT: https://s3.us-west-002.backblazeb2.com
DISCOURSE_S3_ACCESS_KEY_ID: myaccesskey
DISCOURSE_S3_SECRET_ACCESS_KEY: mysecretkey
DISCOURSE_S3_BACKUP_BUCKET: falcoland-files/backup
DISCOURSE_BACKUP_LOCATION: s3
Make sure youāve put the correct info in for the region, endpoint, access key, secret key and backup bucket name.
Press ctrl+o and confirm to save, then press ctrl+x to exit. Then run:
./launcher rebuild app
Fairly confident it should work fine.
Seeing you are on Digital Ocean, itād be a good idea to make a backup before you do this though. So rolling back is easy if something goes wrong.
Thanks for the description @markersocial
I did go to Sign In and created a new bucket
I then went to App Keys to create a new app key for access
After the creation you temporary gets an info like below - be aware you only see this once:
Based and that I used:
DISCOURSE_S3_REGION: ās3.eu-central-003ā
DISCOURSE_S3_INSTALL_CORS_RULE: false
DISCOURSE_S3_ENDPOINT: https://s3.eu-central-003.backblazeb2.com
DISCOURSE_S3_ACCESS_KEY_ID: myaccesskey
DISCOURSE_S3_SECRET_ACCESS_KEY: mysecretkey
DISCOURSE_S3_BACKUP_BUCKET: my_buckets_Name
DISCOURSE_BACKUP_LOCATION: s3
Then I did a rebuild after I did make a snapshot of my droplet at digital ocean
./launcher rebuild app
I then went to /admin/backups and made a backup
[2020-08-27 09:25:57] Creating archive: studmed-dk-2020-08-27-092518-v20200820232017.tar.gz
[2020-08-27 09:25:57] Making sure archive does not already existā¦
[2020-08-27 09:25:57] pg_dump: executing SEQUENCE SET topic_allowed_users_id_seq
[2020-08-27 09:25:57] Creating empty archiveā¦
[2020-08-27 09:25:57] Archiving data dumpā¦
[2020-08-27 09:25:59] Archiving uploadsā¦
[2020-08-27 09:26:06] Removing tmp ā/var/www/discourse/tmp/backups/default/2020-08-27-092518ā directoryā¦
[2020-08-27 09:26:06] Gzipping archive, this may take a whileā¦
[2020-08-27 09:26:31] Uploading archiveā¦
[2020-08-27 09:26:41] Executing the after_create_hook for the backupā¦
[2020-08-27 09:26:41] Deleting old backupsā¦
[2020-08-27 09:26:41] Cleaning stuff upā¦
[2020-08-27 09:26:41] Removing archive from local storageā¦
[2020-08-27 09:26:41] Removing ā.tarā leftoversā¦
[2020-08-27 09:26:41] Marking backup as finishedā¦
[2020-08-27 09:26:41] Refreshing disk statsā¦
[2020-08-27 09:26:42] Notifying āfroldā of the end of the backupā¦
[2020-08-27 09:26:53] Finished!
Then I went to backblaze to see if anything happend there:
I owe you a ![]()
Nice work! If anyone else stumbles here, I believe that if you provide a key that can create buckets, discourse will even create the bucket for you.
Closing as this is supported out of the box by following Using Object Storage for Uploads (S3 & Clones)