I did a backup of my site before I upgraded to the latest version of the discourse however I can’t even access my site any more even though the upgrade appears to be successful as no error is displayed. Is there anyway that I can restore my site from the backup that I created earlier from terminal app as I can’t access the site?
Is it possible?
If yes, where do discourse save or store the backups that I executed from the admin panel?
Is there any guide on how to restore the site from backup?
This seems like a handy thing to be able to do since if you screw up configuring SSO you can’t get back into your site. I spent a week one day trying to get SSO configured, and now that it is configured correctly it seems that my account on the SSO (which I don’t control) is gone, so I can’t get in.
So, script/discourse restore fails because thor isn’t installed.
gem install thor fixes that, but then I’m still denied because:
URGENT: FATAL: Peer authentication failed for user "discourse"
Solving my immediate problem, I suppose I could turn off SSO from the Rails console. . .
edit: to disable SSO from the rails console:
cd /var/discourse
./launcher enter app
rails c
SiteSetting.enable_sso=false
exit
exit
The goal was to automate it without any entering container with the launcher.
Imagine your instance got lost for any reason. The only files you stored in git was your containers/app.yml and luckily you have a daily tarball backup.
لم أكن متأكدًا مما إذا كانت هذه هي الطريقة الصحيحة للوصول إلى ملف “خارج التطبيق من داخل التطبيق”، لكن يبدو أنه عثر على ملف النسخ الاحتياطي وبدأ عملية الاستعادة. انتهت عملية الاستعادة برسائل غامضة:
تم الانتهاء!
[فشل]
تمت عملية الاستعادة.
حاولت الوصول إلى المنتدى مرة أخرى، لكنه لا يزال لا يعمل، لذا أعتقد أن عملية الاستعادة لم تنجح؟
لا يمكنك ذلك. تحتاج إلى نسخ ملف النسخة الاحتياطية إلى الدليل الصحيح. يرجى اتباع التعليمات في Restore a backup from the command line إذا كنت ترغب في الاستعادة من سطر الأوامر.
يسعدني أن لديك حلاً. إليك بعض الأشياء التي ستجعل الأمر أسهل لشخص آخر.
إذا استخدمت DISCOURSE_ALLOW_RESTORE: 'true' في ملف app.yml الخاص بك، يمكنك تخطي تمكين الاستعادة. (يمكنك بالمثل وضع مصادقة Google الخاصة بك في متغيرات البيئة (ENV) وإبقائها خارج قاعدة البيانات تمامًا.)
إذا كان لديك كل من بيئة الاختبار والإنتاج يستخدمان نفس مستودع S3، يمكنك استعادة أحدث نسخة احتياطية باستخدام