# 备份还原失败，原因在于 .tar 与 .tar.gz 文件扩展名不一致

**URL:** <https://meta.discourse.org/t/backup-restore-failing-due-to-tar-versus-tar-gz-file-extension/145971>\
**Category:** Product Support\
**Created:** [2020 年3 月 28 日 17:47 UTC](https://meta.discourse.org/t/backup-restore-failing-due-to-tar-versus-tar-gz-file-extension/145971 "2020-03-28T17:47:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

作者： ![martim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martim/32/482990_2.png) [@martim](https://meta.discourse.org/u/martim)\
发布日期： [2025 年1 月 23 日 18:42 UTC](https://meta.discourse.org/t/backup-restore-failing-due-to-tar-versus-tar-gz-file-extension/145971/6 "2025-01-23T18:42:26Z")

</div>

> [@gerhard](#):
>
> 您可能需要使用 `--format ustar` 选项创建一个新的 tar 文件

我也遇到了同样的问题，并尝试了此操作。文件上传正常，但恢复时找不到数据库转储：

```plaintext
[2025-01-23 18:39:45] EXCEPTION: No such file or directory @ rb_check_realpath_internal - /var/www/discourse/tmp/restores/default/2025-01-23-183945/dump.sql.gz

```

有什么建议吗？谢谢。

---

_[View the full topic](https://meta.discourse.org/t/backup-restore-failing-due-to-tar-versus-tar-gz-file-extension/145971)._
