I’ve just installed Discourse on a new server and now I’m trying to upload a backup with about 400MB.
It stucks at 40% with the following error: Slow down, too many requests from this IP address. Please retry again in 2 seconds. Error code: ip_10_secs_limit.
I followed your link to restore the backup from CLI, but nothing was restored, it was still the same as a fresh install.
Is in the backup the “old” app.yml file and will it be overwritten when I restore the backup? If not, the whole backup is useless.
I tried to restore the backup than from within Discourse and now I have a blank site.
This is from the command line when I try to restore the backup. Of course I followed the commands from the link, but it seems that something has changed.
Starting restore: backup-2021-12-06-185610-v20211201221028.tar.gz
[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /var/www/discourse/tmp/restores/default/2021-12-18-163225 exists...
Copying archive to tmp directory...
EXCEPTION: lib/discourse.rb:127:in `exec': Failed to copy archive to tmp directory.
cp: cannot stat '/var/www/discourse/public/backups/default/backup-2021-12-06-185610-v20211201221028.tar.gz': No such file or directory
lib/discourse.rb:154:in `execute_command'
lib/discourse.rb:127:in `exec'
lib/discourse.rb:34:in `execute_command'
/var/www/discourse/lib/backup_restore/local_backup_store.rb:42:in `download_file'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:62:in `copy_archive_to_tmp_directory'
/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:149:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
script/discourse:290:in `<top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:58:in `load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:58:in `kernel_load'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:23:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:477:in `exec'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:25:in `start'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:49:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:37: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/2021-12-18-163225' directory...
Marking restore as finished...
Notifying 'system' of the end of the restore...
Finished!
[FAILED]
Restore done.
I know what you mean. but I did it exactly according to the instructions (without making a mistake, I copied the paths), so I ask if the instructions are wrong or if something has changed in the paths in the last 2 years.
I will try it again, but maybe I have to reinstall Discourse again because now I have only a blank site.
So I could restore the backup with discourse restore, but some categories are missing, the whole header is missing, I can’t login, the app.yml is still the same as a fresh install and many more.
The backup was from 06.12.21 and I chose to backup everything, but half of the things are missing.
So for me the whole backup and restore process is a totally mess!
This should be said at the time the backup is created (as an info at the end). I have no access to the old file, and creating a new one is possible, but I can’t remember which plugins I had.
But then there is still the question why some categories and topics are missing, and why the header is missing and I can’t login.
It was a fresh install on a new server, and I thought the app.yml is in the backup but I was wrong. I have no access to the “old” discourse instance so there’s no way to restore the app.yml file as it seems.
You can edit the existing app.yml to add the things you think it might be missing? I’m not sure what would stop categories or logins being copied over though?
Did you restore a full back-up file? The one in the OP stalled out at 40%. If you restored that version it may explain why half your stuff is missing?
I’m just guessing at this point though. Sorry I couldn’t be more help.
Sorry you’ve have such trouble. I can’t explain how it might have happened.
I cannot imagine a way that a backup would restore only some categories. If only some categories are restored then that’s what is in the backup you took. Perhaps you have an old backup.
The app.yml doesn’t have anything to do with your data, just the hostname and other stuff required to set up Discourse. You can restore any database to any site.
I will reinstall Discourse again (with a fresh server image) and will try to restore the backup again.
The 40% stucking was with the upload in Discourse directly, after that I copied the backup via SCP to the server.
Yes, that’s true, but I thought something important will be saved in the backup too. Now I don’t know which plugins I had installed in the old instance and how the settings were from the them.
The backup was from 6th December this year, so only a few days ago.