# Backup file not downloaded with .tar.gz extension

**URL:** https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109
**Category:** Support
**Created:** [April 2, 2015, 12:39pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109 "2015-04-02T12:39:24Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![frederic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frederic/32/38177_2.png) [@frederic](https://meta.discourse.org/u/frederic)
#### Post date: [April 2, 2015, 12:39pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/1 "2015-04-02T12:39:25Z")

</div>

Hello,

I’m testing the backup/restore process, and I found something annoying but non-blocking :

I have configure my discourse instance with the automatic daily backup on S3.

I made a fresh discourse install, created a new admin user, then go to Admin \> Settings \> Backups \> “Allow Restore”, so ready for Restore process.

Then I went to [aws.amazon.com](http://aws.amazon.com), downloaded the latest backup, and tried to upload it on my new instance.

Here is the blocking message :

> There has been an error while uploading ‘mydiscourseinstance-2015-04-02-030000.gz’: The backup file should be a .tar.gz archive.

Indeed, the backup is a “.gz” archive.

So I downloaded Z-zip for Windows 7, and created a .tar then a .tar.gz archive, uploaded it on my new instance. Here the welcome message :

> mydiscourseinstance-2015-04-02-030000.tar.gz’ has successfully been uploaded.

then … nothing 😱

“No backup available.” on the backup listing 😱

How can I restore my instance ?

Thanks for your help !

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 2, 2015, 1:19pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/2 "2015-04-02T13:19:02Z")

</div>

I think your browser changed the extension of the backup when you downloaded it. To fix it, you only need to change the extension back to “`.tar.gz`”.

As for the uploaded backup not showing up, you’ll need to make sure sidekiq is working by checking `you.discourse.org/sidekiq/scheduler` and making sure there’s no warning about sidekiq being paused.

---

<div class="post-metadata">

### Author: ![frederic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frederic/32/38177_2.png) [@frederic](https://meta.discourse.org/u/frederic)
#### Post date: [April 2, 2015, 2:12pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/3 "2015-04-02T14:12:56Z")

</div>

Yes ! You’re right Régis ! 😄

After changing the extension to “.tar.gz”, I finally could restore the archive. Many Thanks ! (Sidekiq gave no indice)

So I’m facing a new trouble : the restore process didn’t restore my settings : logo url, s3 bucket for backup, baseline, etc, etc, etc

How can I save those kind of information ? If there is no other way, I will make some screenshots 🙂

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 2, 2015, 2:14pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/4 "2015-04-02T14:14:10Z")

</div>

The site settings are indeed saved in the backup. Due to how we cache them, you’ll need to restart the application for them to show up after a restore.

---

<div class="post-metadata">

### Author: ![frederic](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frederic/32/38177_2.png) [@frederic](https://meta.discourse.org/u/frederic)
#### Post date: [April 2, 2015, 2:26pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/5 "2015-04-02T14:26:38Z")

</div>

Perfect Régis. Many thanks again !

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 2, 2015, 10:27pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/6 "2015-04-02T22:27:50Z")

</div>

I’m glad you brought this up because I think I ran into the same thing. Not sure why downloading from Amazon S3 somehow replaces `.tar.gz` file extension with just `.gz` .. very odd.

@zogstrip should we accept both filetypes here? Is that safe, I have no idea.

---

<div class="post-metadata">

### Author: ![lidel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lidel/32/115991_2.png) [@lidel](https://meta.discourse.org/u/lidel)
#### Post date: [April 7, 2015, 12:48pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/7 "2015-04-07T12:48:29Z")

</div>

Or maybe just use `.tgz` instead? ☀  
It seems to be a generally accepted shorthand for `tar.gz`:

> **[tar (computing)](https://en.wikipedia.org/wiki/Tar_%28computing%29#Naming_of_compressed_tar_files)**
>
> savannah.gnu.org/projects/tar (GNU tar)
> u s t a r \\040 \\040 \\0  (for old GNU tar format)
> tar is a file format and a file archiver program. The program combines multiple files into a single archive file in the tar file format. It was originally developed for magnetic tape computer storage – reading and writing data for a sequential I/O device with no file system, and the name is short for the format description "tape archive". When stored in a file system, a file that tar reads and writes is of...

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 7, 2015, 1:28pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/8 "2015-04-07T13:28:02Z")

</div>

Just allowed `.tgz` and `.gz` extensions for backup files 🐙

[https://github.com/discourse/discourse/commit/babbbc06d1535affce6b5e0280332eb2f28ee542](https://github.com/discourse/discourse/commit/babbbc06d1535affce6b5e0280332eb2f28ee542)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 7, 2015, 1:28pm UTC](https://meta.discourse.org/t/backup-file-not-downloaded-with-tar-gz-extension/27109/9 "2015-04-07T13:28:05Z")

</div>


