The restore failed. Please check the logs

hello

i just deleted my old VPS and buy new one ( every thing in hetzner ) and im trying to backup last edit.

i got this log

[2023-06-04 13:01:35] Making sure /var/www/discourse/tmp/restores/default/2023-06-04-130135 exists...
[2023-06-04 13:01:35] Copying archive to tmp directory...
[2023-06-04 13:01:36] Unzipping archive, this may take a while...
[2023-06-04 13:01:36] EXCEPTION: /var/www/discourse/lib/discourse.rb:137:in `exec': Failed to decompress archive.

gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

[2023-06-04 13:01:36] /var/www/discourse/lib/discourse.rb:171:in `execute_command'
/var/www/discourse/lib/discourse.rb:137:in `exec'
/var/www/discourse/lib/discourse.rb:33:in `execute_command'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:78:in `decompress_archive'
/var/www/discourse/lib/backup_restore/backup_file_handler.rb:23:in `decompress'
/var/www/discourse/lib/backup_restore/restorer.rb:42:in `run'
/var/www/discourse/script/spawn_backup_restore.rb:20:in `restore'
/var/www/discourse/script/spawn_backup_restore.rb:33:in `block in <main>'
/var/www/discourse/script/spawn_backup_restore.rb:4:in `fork'
/var/www/discourse/script/spawn_backup_restore.rb:4:in `<main>'
[2023-06-04 13:01:36] Trying to rollback...
[2023-06-04 13:01:36] There was no need to rollback
[2023-06-04 13:01:36] Cleaning stuff up...
[2023-06-04 13:01:36] Removing tmp '/var/www/discourse/tmp/restores/default/2023-06-04-130135' directory...
[2023-06-04 13:01:36] Marking restore as finished...
[2023-06-04 13:01:36] Notifying 'inj3ct0r' of the end of the restore...
[2023-06-04 13:01:38] Finished!
[2023-06-04 22:08:20] EXCEPTION: /var/www/discourse/lib/discourse.rb:137:in `exec': Failed to decompress archive.

Were you doign this via the UI or CLI?

im doing it by UI

I’m no expert on this matter, but it feels to me like your backup is incomplete or corrupted. Do you have another one?

3 Likes

My guess is that somehow the whole backup didn’t get transferred or uploaded.

I’d try moving it via scp/rsync. It needs to be in

/var/discourse/shared/standalone/backups/default

2 Likes

This is more or less just salt in the open wound, but next time rsync /var/discourse/ and after that setup-script is way much easier solution.

But sure — everyone should test every now and then that restoring actually happends.

i think its fully completed cuz i tried another one and same problem

actually its uploaded

i don’t have much exp with discourse so IDK how to rsync it and what was the impact ?

That does not look like the filename of a Discourse backup. It should be a .tar.gz or .sql.gz file.

So maybe the file got corrupted when you tried to download it.

3 Likes

I’ll rebuild the container and upload another one.

Actually its finally worked !

After many trying to restore the backup and for somereasone idk its failed

I rebuild the server with ubuntu 22 and after that i installed the docker-ce
and pull the discourse again and install it
and everything goes fine !

thank u all <3

1 Like

rsync is ordinary command of all linux distroes. It is one (and quite common) way to copy dirs and files from one server to another. It isn’t part on Discourse but your OS.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.