Octal string exception while importing database

AI-generated summary

Octal String Exception While Importing Database

mantis is experiencing an octal string exception error while trying to import a database backup using Discourse version 2.5.0.beta4. The error message indicates an issue with decompressing the archive.

gerhard has pushed a fix for this issue, which is available in the test-passed branch. The fix is based on a commit that addresses the octal string exception error.

After applying the patch, mantis was able to bypass the original error, but encountered disk space errors. The import process has not been completed yet due to these errors.

I trying to import a database backup but I’m getting the below error.
I have the latest version (2.5.0.beta4) and rebuild does not work. Please advise.


[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2020-05-19-193633 exists...
Copying archive to tmp directory...
Unzipping archive, this may take a while...
EXCEPTION: "\x80\x00\x00\x00\x00\x00\x00\x04\xE8\xD3\xA8\x01" is not an octal string
/usr/local/lib/ruby/site_ruby/2.6.0/rubygems/package/tar_header.rb:130:in `strict_oct'
/usr/local/lib/ruby/site_ruby/2.6.0/rubygems/package/tar_header.rb:112:in `from'
/usr/local/lib/ruby/site_ruby/2.6.0/rubygems/package/tar_reader.rb:61:in `each'
/var/www/discourse/lib/compression/strategy.rb:18:in `block in decompress'
/var/www/discourse/lib/compression/tar.rb:26:in `get_compressed_file_stream'
/var/www/discourse/lib/compression/strategy.rb:15:in `decompress'
/var/www/discourse/lib/compression/pipeline.rb:26:in `block in decompress'
/var/www/discourse/lib/compression/pipeline.rb:24:in `each'
/var/www/discourse/lib/compression/pipeline.rb:24:in `reduce'
/var/www/discourse/lib/compression/pipeline.rb:24:in `decompress'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:69:in `decompress_archive'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:22:in `decompress'
/var/www/discourse/lib/backup_restore/restorer.rb:42:in `run'
script/discourse:143:in `restore'
script/discourse:159:in `import'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
script/discourse:284:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:34: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/2020-05-19-193633' directory...
Unpausing sidekiq...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
Restore done.

I pushed a fix. It should be available in the test-passed branch in ~15 minutes

https://github.com/discourse/discourse/commit/0a700d81fca8d84c83428e44e6ff31f392535fc1

Thank you, the patch at least gets me past the error, but now I’m running into disk space errors. I’ll let you know if it doesn’t import after I fix the disk space errors.