مرحباً،
لديّ منتدى Discourse تالف وأرغب في نقله إلى خادم آخر. لدي نسخة احتياطية في المجلد:
$ ls /var/discourse/shared/standalone/backups/default
$ forum-2019-05-06-033420-v20180920042415.tar
في الخادم الجديد، حاولت تحميل النسخة الاحتياطية لكنها فشلت:
$ ./launcher enter app
$ discourse enable_restore
$ gzip public/backups/default/forum-2019-05-06-033420-v20180920042415.tar
$ discourse restore forum-2019-05-06-033420-v20180920042415.tar.gz
Starting restore: forum-2019-05-06-033420-v20180920042415.tar.gz
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2019-05-08-180427 exists...
Copying archive to tmp directory...
Unzipping archive, this may take a while...
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
No metadata file to extract.
Validating metadata...
Current version: 20190508135348
Restored version: 20180920042415
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Extracting dump file...
EXCEPTION: /var/www/discourse/lib/backup_restore/restorer.rb:264:in `block in extract_dump': Failed to extract dump file.
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
/var/www/discourse/lib/discourse.rb:29:in `execute_command'
/var/www/discourse/lib/backup_restore/restorer.rb:264:in `block in extract_dump'
/usr/local/lib/ruby/2.6.0/fileutils.rb:128:in `chdir'
/usr/local/lib/ruby/2.6.0/fileutils.rb:128:in `cd'
/var/www/discourse/lib/backup_restore/restorer.rb:263:in `extract_dump'
/var/www/discourse/lib/backup_restore/restorer.rb:58:in `run'
script/discourse:141:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor.rb:387:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor/base.rb:466:in `start'
script/discourse:282:in `<top (required)>'
/usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
/usr/local/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Trying to rollback...
There was no need to rollback
Cleaning stuff up...
Removing tmp '/var/www/discourse/tmp/restores/default/2019-05-08-180427' directory...
Unpausing sidekiq...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
لا أعرف السبب، لكن النسخة الاحتياطية من المنتدى السابق تالفة ولا يمكنني الوصول إلى واجهة المستخدم anymore، بل فقط إلى سطر الأوامر.
كيف يمكنني يدوياً استخراج قاعدة البيانات والملفات من منتدى Discourse السابق إلى الجديد؟
يحتوي ملف tar الاحتياطي على ما يلي:


