Restore at adminjs is not working

(Erick Guan) #1

I have to restore a site backup which is about 650MB. After I clicked the Restore, nothing happened. There is no logs, neither in the site settings, nor the logs.

The backup is created by latest Discourse

It’s The backup filename is mycard-2014-07-28-154145 (1).tar.gz. There is 404 error for the restore url.

(Jens Maier) #2

Did you check the “allow restore” box in the site settings?

(Erick Guan) #3

If you don’t check that box, the Restore button would not be available.

(Erick Guan) #4

Tough migration from old installation.

I went to the rails console and control the importer manually.

And have to refresh the admin settings to see the settings edited weirdly.

(Marty ) #5

I encountered the same issue. I changed the settings to allow restore. Then restore button on the backup page became available (after a logout/login). After a click of the restore button for a backup, a confirm dialog is displayed. I hit confirm, and then nothing happens.

@fantasticfears It sounds like you have a work around. What is this ruby console thing?


(Marty ) #6

Here is trace in the log:

Started POST "/admin/backups/discourse-2014-08-05-132802-eastkb-data.tar.gz/restore" for at 2014-08-05 14:51:32 +0000

ActionController::RoutingError (No route matches [POST] "/admin/backups/discourse-2014-08-05-132802-eastkb-data.tar.gz/restore"):
config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
config/initializers/silence_logger.rb:26:in `call'
lib/middleware/unicorn_oobgc.rb:95:in `process_client'

This is for a new install of version

(Erick Guan) #7

Actually I init the BackupRestore and move the backup to the correct location. It’s unreproduce in the development environment.

Are you in middle of migration? Where is your backup file?

(Marty ) #8

I did a conversion of a phpBB locally and had planned to export locally and then import on my new production instance.

Via the admin console I did:

  • backup and download locally, and then
  • uploaded and attempted to restore.

After that didn’t work I gave up on the restore and did the conversion in production.

(Sam Saffron) #9

@zogstrip this is odd

                 restore_admin_backup POST     /admin/backups/:id/restore(.:format)                  admin/backups#restore {:id=>/[a-zA-Z0-9\-_]*\d{4}(-\d{2}){2}-\d{6}\.tar\.gz/i}

these constraints are a bit crazy. stuff should be POSTed to /admin/backups/restore and passed in via params or id should simply an int or a hash of the name.

If people want to call their backup frogs.tar.gz or whatever they should be allowed to.

(Sam Saffron) #10

@zogstrip the repro here is create a backup file with SPACE in the filename. It can not be restored.

Your call if you want to fix or close this, I am happy with either, this almost never comes up.

(Régis Hanol) #11

Just pushed a fix. Backups only require the .tar.gz or .tgz extensions :cherries:

(Régis Hanol) #12