The user inj3ct0r attempted to restore a Discourse backup on a new VPS but encountered an error: gzip: stdin: invalid compressed data--format violated and tar: Unexpected EOF in archive. The issue was likely due to a corrupted or incomplete backup file, as suggested by darkpixlz and pfaffman, who noted the file didn’t match the expected .tar.gz or .sql.gz format. Canapin and Jagster recommended verifying the backup integrity and using rsync for reliable file transfers. Despite the initial failure, inj3ct0r resolved the issue by rebuilding the server with Ubuntu 22, reinstalling Docker, and successfully restoring the backup.
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.
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.