Backup and installation failure on new site


(Hakan) #1

I already saw the problem with the backup installation, I did not upload the old backup.

I created a site again, bought a backup that was not included, but did not upload it while trying to reinstall.

I am doing a backup restore on a new site, but I get an error.

ERROR LOG:

[2018-03-15 22:30:32] [STARTED]
[2018-03-15 22:30:32] 'sword' has started the restore!
[2018-03-15 22:30:32] Marking restore as running...
[2018-03-15 22:30:32] Making sure /var/www/discourse/tmp/restores/default/2018-03-15-223032 exists...
[2018-03-15 22:30:32] Copying archive to tmp directory...
[2018-03-15 22:30:32] Unzipping archive, this may take a while...
[2018-03-15 22:30:33] No metadata file to extract.
[2018-03-15 22:30:33] Validating metadata...
[2018-03-15 22:30:33]   Current version: 20180309014014
[2018-03-15 22:30:33]   Restored version: 20180309014014
[2018-03-15 22:30:33] Extracting dump file...
[2018-03-15 22:30:33] Restoring into 'backup' schema
[2018-03-15 22:30:33] Restoring dump file... (can be quite long)
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] set_config
[2018-03-15 22:30:33] ------------
[2018-03-15 22:30:33] (1 row)
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] SET
[2018-03-15 22:30:33] ERROR:  relation "api_keys" already exists
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-03-15 22:30:33] ERROR:  current transaction is aborted, com…

(Gary Dean) #2

i seem to be having an identical problem. i cannot get any backups to restore, either from the web interface or from the command line.

to test the backup/restore, i installed discourse from scratch, then i immediately did a backup (generating a small 2MB file). i then attempted a restore. failed, with same result as above.


(Alan Tan) #3

I’m having a look :eyes:


(Alan Tan) #5

Fixed in


(Gary Dean) #6

fixed! thank you, alan.


#7

Facing a similar issue.

Here’s the log:

[2018-03-15 21:14:00] [STARTED]
[2018-03-15 21:14:00] 'EBA' has started the restore!
[2018-03-15 21:14:00] Marking restore as running...
[2018-03-15 21:14:00] Making sure /var/www/discourse/tmp/restores/default/2018-03-15-211400 exists...
[2018-03-15 21:14:00] Copying archive to tmp directory...
[2018-03-15 21:14:07] Unzipping archive, this may take a while...
[2018-03-15 21:14:07] EXCEPTION: Failed to unzip archive.

gzip: /var/www/discourse/tmp/restores/default/2018-03-15-211400/-2018-03-13-205026-v20180127005644.tar.gz: not in gzip format

[2018-03-15 21:14:07] /var/www/discourse/lib/discourse.rb:28:in `execute_command'
/var/www/discourse/lib/backup_restore/restorer.rb:191:in `block in unzip_archive'
/usr/local/lib/ruby/2.4.0/fileutils.rb:120:in `chdir'
/usr/local/lib/ruby/2.4.0/fileutils.rb:120:in `cd'
/var/www/discourse/lib/backup_restore/restorer.rb:190:in `unzip_archive'
/var/www/discourse/lib/backup_restore/restorer.rb:36:in `run'
/var/www/discourse/lib/backup_restore/backup_restore.rb:167:in `block in start!'
/var/www/discourse/lib/backup_restore/backup_restore.rb:164:in `fork'
/var/www/discourse/lib/backup_restore/backup_restore.rb:164:in `start!'
/var/www/discourse/lib/backup_restore/backup_restore.rb:23:in `restore!'
/var/www/discourse/app/controllers/admin/backups_controller.rb:103:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in `process'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in `process'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-0.10.7/lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:16:in `block in <class:Constraints>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:46:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/frame_options.rb:31:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:149:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:16:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:29:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-0.10.7/lib/mini_profiler/profiler.rb:282:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/message_bus-2.1.2/lib/message_bus/rack/middleware.rb:63:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:166:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:606:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:549:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/lib/unicorn/http_server.rb:142:in `start'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/unicorn-5.4.0/bin/unicorn:126:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/bin/unicorn:23:in `<main>'
[2018-03-15 21:14:07] Trying to rollback...
[2018-03-15 21:14:07] There was no need to rollback
[2018-03-15 21:14:07] Notifying 'EBA' of the end of the restore...

(Hakan) #8

There are no such files in the files. do I need to create a new file and add these codes?

Edit: I think the discourse managers solved the problem. Problem is solved


(Alan Tan) #9

I don’t think you have the right backup file judging from the path that the restorer is trying to use /var/www/discourse/tmp/restores/default/2018-03-15-211400


(Alan Tan) #10

This topic was automatically closed after 3 days. New replies are no longer allowed.