Restoring backup fails in Win10/Ubuntu development environment

Couldn’t get the upload system to work (it never put the backup where it needed to be), so I gave up and copied the file manually to /~discourse/public/backups/default. That got the backup to appear in the list.

Clicking Restore on my backup produces the following log output.

I am trying to restore to my local development machine in Windows 10’s Linux Subsystem so I can hack at the database (import a ton of content from a proprietary forum system) and then backup/restore to my production site. Any help would be appreciated!

I’m running Discourse v2.0.0.beta9 on both development and production.

[2018-05-06 16:12:23] EXCEPTION: Invalid argument
[2018-05-06 16:12:23] /root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/connection/hiredis.rb:19:in 'connect'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/connection/hiredis.rb:19:in 'connect'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:334:in 'establish_connection'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:99:in 'block in connect'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:291:in 'with_reconnect'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:98:in 'connect'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:363:in 'ensure_connected'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:219:in 'block in process'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:304:in 'logging'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:218:in 'process'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis/client.rb:118:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis.rb:2448:in 'block in _eval'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis.rb:45:in 'block in synchronize'
/root/.rbenv/versions/2.4.2/lib/ruby/2.4.0/monitor.rb:214:in 'mon_synchronize'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis.rb:45:in 'synchronize'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis.rb:2447:in '_eval'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/redis-4.0.1/lib/redis.rb:2499:in 'evalsha'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/message_bus-2.1.4/lib/message_bus/backends/redis.rb:381:in 'cached_eval'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/message_bus-2.1.4/lib/message_bus/backends/redis.rb:141:in 'publish'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/message_bus-2.1.4/lib/message_bus.rb:253:in 'publish'
/root/discourse/lib/backup_restore/restorer.rb:512:in 'publish_log'
/root/discourse/lib/backup_restore/restorer.rb:505:in 'log'
/root/discourse/lib/backup_restore/restorer.rb:42:in 'run'
/root/discourse/lib/backup_restore/backup_restore.rb:167:in 'block in start!'
/root/discourse/lib/backup_restore/backup_restore.rb:164:in 'fork'
/root/discourse/lib/backup_restore/backup_restore.rb:164:in 'start!'
/root/discourse/lib/backup_restore/backup_restore.rb:23:in 'restore!'
/root/discourse/app/controllers/admin/backups_controller.rb:103:in 'restore'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in 'send_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in 'block in process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in 'run_callbacks'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in 'block in process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in 'block in instrument'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in 'instrument'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in 'instrument'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in 'process_action'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in 'process'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in 'process'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiling_methods.rb:104:in 'block in profile_method'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in 'dispatch'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in 'dispatch'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in 'dispatch'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in 'serve'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:16:in 'block in <class:Constraints>'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:46:in 'serve'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in 'block in serve'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in 'each'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in 'serve'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:in 'call'
/root/discourse/lib/middleware/omniauth_bypass_middleware.rb:24:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/conditional_get.rb:38:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/head.rb:12:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:232:in 'context'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:226:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.1.4/lib/active_record/migration.rb:556:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in 'block in call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in 'run_callbacks'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:84:in 'protected_app_call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:79:in 'better_errors_call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:57:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in 'call_app'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in 'call'
/root/discourse/config/initializers/100-quiet_logger.rb:16:in 'call'
/root/discourse/config/initializers/100-silence_logger.rb:29:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/method_override.rb:22:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/sendfile.rb:111:in 'call'
/root/discourse/lib/middleware/missing_avatars.rb:21:in 'call'
/root/discourse/lib/middleware/turbo_dev.rb:34:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiler.rb:285:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/message_bus-2.1.4/lib/message_bus/rack/middleware.rb:63:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in 'public_send'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in 'method_missing'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:68:in 'block in call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in 'each'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in 'call'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:602:in 'handle_request'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:435:in 'process_client'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:299:in 'block in run'
/root/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in 'block in spawn_thread'
[2018-05-06 16:12:23] Trying to rollback...
[2018-05-06 16:12:23] There was no need to rollback
[2018-05-06 16:12:23] Notifying 'magic' of the end of the restore...
[2018-05-06 16:12:27] Cleaning stuff up...
[2018-05-06 16:12:27] Removing tmp '/root/discourse/tmp/restores/default/2018-05-06-161222' directory...
[2018-05-06 16:12:27] Unpausing sidekiq...
[2018-05-06 16:12:27] Marking restore as finished...
[2018-05-06 16:12:27] Finished!

Redis is chucking an invalid argument on connect. That means your Redis configuration is busticated. Nothing to do with the backup. Probably explains why the upload didn’t work in the first place, too.

1 Like

I am a C# / ASP.NET developer so this is my very first exposure to Ruby/Rails. And I have very limited Linux experience.

However, both my development site and production site are working 100% (on the surface) – what part is redis responsible for, and why would the rest of the site work without problems?

More importantly: do you have any suggestions? :slight_smile:

My setup is exactly as instructed & described here: Beginners Guide to Install Discourse on Windows 10 for Development

Redis handles work queues, message bus, and caching. Basic click-around browsing works because it doesn’t need any of those things. My suggestion is to fix your Redis config.

I sincerely appreciate your time in replying, but is there a specific suggestion you can make to “fix your Redis config?” I have zero experience with redis, Linux, Ruby, Rails, etc.

If I followed the directions at Beginners Guide to Install Discourse on Windows 10 for Development should redis be working properly? Do I need to start over?

Basically, I have no idea where to begin to debug/fix this issue…

EDIT:

redis is running and responding:

C:\WINDOWS\system32>bash
root@Jeff-PC:/mnt/c/Windows/System32# redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set mykey somevalue
OK
127.0.0.1:6379> get mykey
"somevalue"
127.0.0.1:6379>

I’d appreciate any help so I can get started on importing the actual forum content. I’ll be manually inserting 96,000 registered members and over 8 MILLION posts.

I can’t give you any more specifics because there are no specific details to work with. Given that there was a post on the topic you linked to yesterday saying the guide was “very very helpful”, I’m inclined to think the guide is probably OK, and it’s some variance in your execution of the instructions (or in your environment) that’s causing the problem, and without knowing what that difference is, there’s not a lot anyone can do to help. You’re a developer, you know how this dance goes – user says “nothing’s changed!”, you spend a lot of time debugging, user finally mentions in passing, “my disk was getting full so I deleted all those useless files under C:\WINDOWS\system32 yesterday, could that be the problem?”.

I suppose you could edit the code that’s throwing the exception and print out all the variables involved in the call to connect (something like p config; p connect_timeout should do it), but while that’ll give you slightly more info about what is broken, it still won’t tell you why.

3 Likes

So I blew it all away and started from scratch.

My mistake was running bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux) as root, against the stated directions.

Now I can get as far as trying to Restore my backup and get this in the logs:

[2018-05-06 22:46:19] 'magic' has started the restore!
[2018-05-06 22:46:19] Marking restore as running...
[2018-05-06 22:46:19] Making sure /home/discourse/discourse/tmp/restores/default/2018-05-06-224617 exists...
[2018-05-06 22:46:19] Copying archive to tmp directory...
[2018-05-06 22:46:19] Unzipping archive, this may take a while...
[2018-05-06 22:46:19] No metadata file to extract.
[2018-05-06 22:46:19] Validating metadata...
[2018-05-06 22:46:19]   Current version: 20180504000531
[2018-05-06 22:46:19]   Restored version: 20180504000531
[2018-05-06 22:46:19] Extracting dump file...
[2018-05-06 22:46:19] Cannot restore into different schema, restoring in-place
[2018-05-06 22:46:19] Enabling readonly mode...
[2018-05-06 22:46:19] Pausing sidekiq...
[2018-05-06 22:46:19] Waiting for sidekiq to finish running jobs...
[2018-05-06 22:46:20] Restoring dump file... (can be quite long)
[2018-05-06 22:46:20] SET
[2018-05-06 22:46:20] SET
[2018-05-06 22:46:20] ERROR:  unrecognized configuration parameter "idle_in_transaction_session_timeout"
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:20] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:20] LINE 2:     AS integer
[2018-05-06 22:46:20] ^
[2018-05-06 22:46:20] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  current transaction is aborted, commands ignored until end of transaction block
[2018-05-06 22:46:21] ERROR:  syntax error at or near "AS"
[2018-05-06 22:46:21] LINE 2:     AS integer
[2018-05-06 22:46:21] ^
[2018-05-06 22:46:21] EXCEPTION: psql failed
[2018-05-06 22:46:21] /home/discourse/discourse/lib/backup_restore/restorer.rb:327:in 'restore_dump'
/home/discourse/discourse/lib/backup_restore/restorer.rb:68:in 'run'
/home/discourse/discourse/lib/backup_restore/backup_restore.rb:167:in 'block in start!'
/home/discourse/discourse/lib/backup_restore/backup_restore.rb:164:in 'fork'
/home/discourse/discourse/lib/backup_restore/backup_restore.rb:164:in 'start!'
/home/discourse/discourse/lib/backup_restore/backup_restore.rb:23:in 'restore!'
/home/discourse/discourse/app/controllers/admin/backups_controller.rb:103:in 'restore'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/basic_implicit_render.rb:4:in 'send_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:186:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rendering.rb:30:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:20:in 'block in process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:131:in 'run_callbacks'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/callbacks.rb:19:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/rescue.rb:20:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:32:in 'block in process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in 'block in instrument'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in 'instrument'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/notifications.rb:166:in 'instrument'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/instrumentation.rb:30:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal/params_wrapper.rb:252:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.1.4/lib/active_record/railties/controller_runtime.rb:22:in 'process_action'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/abstract_controller/base.rb:124:in 'process'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionview-5.1.4/lib/action_view/rendering.rb:30:in 'process'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiling_methods.rb:104:in 'block in profile_method'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:189:in 'dispatch'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_controller/metal.rb:253:in 'dispatch'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:49:in 'dispatch'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:31:in 'serve'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:16:in 'block in <class:Constraints>'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/mapper.rb:46:in 'serve'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:50:in 'block in serve'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in 'each'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/journey/router.rb:33:in 'serve'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:834:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:in 'call'
/home/discourse/discourse/lib/middleware/omniauth_bypass_middleware.rb:24:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/conditional_get.rb:38:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/head.rb:12:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:232:in 'context'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/session/abstract/id.rb:226:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/cookies.rb:613:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.1.4/lib/active_record/migration.rb:556:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:26:in 'block in call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:97:in 'run_callbacks'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/callbacks.rb:24:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:84:in 'protected_app_call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:79:in 'better_errors_call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:57:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:59:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/show_exceptions.rb:31:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/logster-1.2.9/lib/logster/middleware/reporter.rb:31:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:36:in 'call_app'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/rack/logger.rb:26:in 'call'
/home/discourse/discourse/config/initializers/100-quiet_logger.rb:16:in 'call'
/home/discourse/discourse/config/initializers/100-silence_logger.rb:29:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/remote_ip.rb:79:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/request_id.rb:25:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/method_override.rb:22:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/executor.rb:12:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/static.rb:125:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/sendfile.rb:111:in 'call'
/home/discourse/discourse/lib/middleware/missing_avatars.rb:21:in 'call'
/home/discourse/discourse/lib/middleware/turbo_dev.rb:34:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-1.0.0/lib/mini_profiler/profiler.rb:285:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/message_bus-2.1.4/lib/message_bus/rack/middleware.rb:63:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/engine.rb:522:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in 'public_send'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/railtie.rb:185:in 'method_missing'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:68:in 'block in call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in 'each'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rack-2.0.4/lib/rack/urlmap.rb:53:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in 'call'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:602:in 'handle_request'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:435:in 'process_client'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/server.rb:299:in 'block in run'
/home/discourse/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in 'block in spawn_thread'
[2018-05-06 22:46:21] Trying to rollback...
[2018-05-06 22:46:21] Rolling back...
[2018-05-06 22:46:21] Notifying 'magic' of the end of the restore...
[2018-05-06 22:46:28] Cleaning stuff up...
[2018-05-06 22:46:28] Removing tmp '/home/discourse/discourse/tmp/restores/default/2018-05-06-224617' directory...
[2018-05-06 22:46:28] Unpausing sidekiq...
[2018-05-06 22:46:28] Disabling readonly mode...
[2018-05-06 22:46:28] Marking restore as finished...
[2018-05-06 22:46:28] Finished!

The first ERROR seems to be because the SQL is invalid for postgres 9.5: psql - Postgresql - unrecognized configuration parameter - Stack Overflow

What version of postgresql is in the Docker image? 9.6?

Postgres 10 currently

Off topic and just for personal curiosity, what forum are you migrating from @Cheeser?

You mentioned a .Net and C# background - the forum isn’t MVCForum is it? The scale of data your moving suggests its something different.

I’m moving from MVCForum and am writing some migration code. I’m also new to Ruby and Rails as I’ve come from Python and am only a hobbyists coder these days.

Happy to share anything I’ve learned via PM.

Assuming you’ll be hosting your production environment on Linux, my recommendation for your current problem would be to move to Linux for your development - either via dual boot or VM.

Everything just seems to work better there and you’ll soon feel at home. Plus all of the guides you’ll be reading and those in this community that you’ll try to lean on for advice will almost certainly be coming at your problem from a Linux perspective.

OK thanks @codinghorror – so the instructions I followed are not current, since it installs Postgres 9.5: Beginners Guide to Install Discourse on Windows 10 for Development

The production Docker version (w/Postgres 10) apparently creates a backup script that is incompatible with Postgres 9.5 even though the same version/build of Discourse is used during backup & restore.

What do you recommend for my unique situation, @codinghorror? I need to import a VERY large amount of content (millions of posts from almost 100,000 members) from a proprietary forum system I wrote. [@bletch that should answer your question as well. ]

My idea was to have a local Discourse installation, use .NET’s Entity Framework Core to scaffold the Discourse database and then directly add my data to the Postgres database using a .NET Core console app. Then backup & restore that database onto my production site (hosted on Google Cloud Compute in a Docker container).

So, it would seem I need to use a full Docker/Ubuntu VM installation with Hyper-V on Windows 10 to achieve my goals? And not the (admittedly cool) new Linux Subsystem?

4 Likes

I’d just install Postgres 10 in the subsystem, there’s no reason why this shouldn’t work.

Going to try that right now.

I’ll report back, thank you for the tip!

Just finished…

Upgraded to Postgres 10 and the Restore worked!

Now I can begin the arduous task of importing 10 years worth of existing forum content into Discourse.

Wish me luck. :slight_smile:

Thanks for everyone’s help in this thread.

4 Likes