EXCEPTION: not in gzip format (failed to unzip)


(Johnny) #1

hey,

I recently downloaded a backup file, and its “filename.tar”, seems like my browser removed the ‘tar.gz’ file and saved as ‘.tar’ only. However, its been a few days and I didn’t see this. But now, when I am trying to restore discourse is giving me an error. I tried to rename the file as tar.gz but error continues.

[2018-09-20 16:44:59] Marking restore as running...
[2018-09-20 16:44:59] Making sure /var/www/discourse/tmp/restores/default/2018-09-20-164459 exists...
[2018-09-20 16:44:59] Copying archive to tmp directory...
[2018-09-20 16:44:59] Unzipping archive, this may take a while...
[2018-09-20 16:44:59] EXCEPTION: /var/www/discourse/lib/backup_restore/restorer.rb:211:in `block in unzip_archive': Failed to unzip archive.

gzip: /var/www/discourse/tmp/restores/default/2018-09-20-164459/community-2018-09-19-122224-v20180521191418.tar.gz: not in gzip format

Any help?


(Jay Pfaffman) #2

You’ll need to re-gzip the file. This might work:

cd /var/discourse/shared/app/backups/default
gzip *.tar

(Johnny) #3

I cannot upload .tar file, thus I changed the file to tar.gz and then uploaded, in /var/discourse/shared/standalone/backups/default I renamed the file.tar.gz to file.tar and then again performed the command you asked for. Then restored, and now I am getting Oops - Error 500.

UPDATE: after rebuilding its fixed now.