# 在新“本地”虚拟机上恢复备份文件后 - 站点无法运行

**URL:** <https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399>\
**Category:** Self-hosting\
**Created:** [2021年八月14日 11:51 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399 "2021-08-14T11:51:44Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [2021年八月15日 15:12 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/28 "2021-08-15T15:12:17Z")

</div>

根据我有限的经验，我说不准，我总是惊讶于恢复过程竟然如此简单（或者也许是运气好吧 😅）。这里发生的情况有些奇怪。建议备份 app.yml 文件，以便记住安装了哪些插件（如果可能，也备份主机代理的配置，以备不时之需）。

---

<div class="post-metadata">

**Author:** ![ITAS-Isti](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ITAS-Isti](https://meta.discourse.org/u/ITAS-Isti)\
**Post date:** [2021年八月15日 15:16 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/29 "2021-08-15T15:16:18Z")

</div>

好的，谢谢。你知道，我是 Linux 的绝对新手。没有教程，我就束手无策。好的，我复制我的 app.yml，再次尝试通过图形界面进行恢复。

---

<div class="post-metadata">

**Author:** ![ITAS-Isti](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ITAS-Isti](https://meta.discourse.org/u/ITAS-Isti)\
**Post date:** [2021年八月15日 15:25 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/30 "2021-08-15T15:25:17Z")

</div>

正如我所说，又是白屏：

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/0/102726299109a23fdffd2ec791bb0cfd96738212.png)

可以看到论坛的名称。没有报错，但没有生成任何 HTML……

---

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [2021年八月15日 15:37 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/31 "2021-08-15T15:37:50Z")

</div>

恢复过程中出现了一些错误？  
您的备份中是否包含了一些在新安装的 app.yml 中不存在的插件？

---

<div class="post-metadata">

**Author:** ![ITAS-Isti](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ITAS-Isti](https://meta.discourse.org/u/ITAS-Isti)\
**Post date:** [2021年八月15日 15:40 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/32 "2021-08-15T15:40:21Z")

</div>

恢复过程中未出现任何错误。关于插件，我将在周一交由同事检查，如果有的话，会将它们添加到新的 app.yml 中。

我已打开 SQL /Backup/ 目录，但未发现有关已安装插件的信息……

---

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [2021年八月15日 16:06 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/33 "2021-08-15T16:06:59Z")

</div>

🤔 不过这可能有点悬，因为你已经尝试过 `safe mode` 了……  
我现在的猜测是 CSP 的问题：

> [@Migrating Discourse from one DigitalOcean droplet to another without downtime](https://meta.discourse.org/t/migrating-discourse-from-one-digitalocean-droplet-to-another-without-downtime/174528/8):
>
> SSH to your server, then: cd /var/discourse sudo ./launcher enter app rails c SiteSetting.content\_security\_policy = false exit exit Note that I’d try the backup restore from CLI first - it solves the actual issue you have (restore a backup) vs the current roadblock (CSP).

---

<div class="post-metadata">

**Author:** ![ITAS-Isti](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ITAS-Isti](https://meta.discourse.org/u/ITAS-Isti)\
**Post date:** [2021年八月15日 16:28 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/34 "2021-08-15T16:28:00Z")

</div>

好的，我已经通过 WinSCP 传输了文件，

 ![image](https://global.discourse-cdn.com/meta/original/3X/1/e/1e4e198046b4aeea7dbeff9b8dcc63c0302f7dbc.png)

现在可以正常工作了 🙂

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/8/789315a107d62e860c3478d1a94121fe8b0ac960.jpeg)

非常感谢您的支持！！！

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2021年九月14日 16:28 UTC](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399/35 "2021-09-14T16:28:28Z")

</div>

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

[上一頁](https://meta.discourse.org/t/after-recoverying-a-backup-file-on-new-on-premise-vm-site-no-longer-works/200399.md?page=1)
