# 数据库备份期间发生文件不存在错误

**URL:** https://meta.discourse.org/t/a-file-does-not-exist-error-occurred-during-database-backup/373471
**Category:** Support
**Tags:** backups
**Created:** [2025年七月9日 02:08 UTC](https://meta.discourse.org/t/a-file-does-not-exist-error-occurred-during-database-backup/373471 "2025-07-09T02:08:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jlcoo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jlcoo/32/386427_2.png) [@jlcoo](https://meta.discourse.org/u/jlcoo)
#### Post date: [2025年七月9日 02:08 UTC](https://meta.discourse.org/t/a-file-does-not-exist-error-occurred-during-database-backup/373471/1 "2025-07-09T02:08:32Z")

</div>

当管理员手动备份时，出现错误“EXCEPTION: No such file or directory @ rb\_io\_flush\_raw - ”，但我不知道为什么会发生此异常。Discourse 的专家能帮我吗？

```plaintext
[2025-07-09 01:37:48] 'jl-brother1' has started the backup!
[2025-07-09 01:37:48] Marking backup as running...
[2025-07-09 01:37:48] Making sure '/var/www/discourse/tmp/backups/default/2025-07-09-013748' exists...
[2025-07-09 01:37:48] Making sure '/var/www/discourse/public/backups/default' exists...
[2025-07-09 01:37:48] Updating metadata...
[2025-07-09 01:37:48] Dumping the public schema of the database...
[2025-07-09 01:37:48] EXCEPTION: No such file or directory @ rb_io_flush_raw - <STDOUT>
[2025-07-09 01:37:48] /var/www/discourse/lib/backup_restore/backuper.rb:160:in `popen'
/var/www/discourse/lib/backup_restore/backuper.rb:160:in `dump_public_schema'
/var/www/discourse/lib/backup_restore/backuper.rb:36:in `run'
/var/www/discourse/script/spawn_backup_restore.rb:9:in `backup'
/var/www/discourse/script/spawn_backup_restore.rb:31: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>'
[2025-07-09 01:37:48] Deleting old backups...
[2025-07-09 01:37:48] Cleaning stuff up...
[2025-07-09 01:37:48] Removing '.tar' leftovers...
[2025-07-09 01:37:48] Marking backup as finished...
[2025-07-09 01:37:48] Notifying 'jl-brother1' of the end of the backup...
[2025-07-09 01:37:53] Finished!

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2025年七月9日 14:13 UTC](https://meta.discourse.org/t/a-file-does-not-exist-error-occurred-during-database-backup/373471/2 "2025-07-09T14:13:26Z")

</div>

这是标准安装吗？您的磁盘已满吗？从命令行备份会发生什么？

---

<div class="post-metadata">

### Author: ![jlcoo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jlcoo/32/386427_2.png) [@jlcoo](https://meta.discourse.org/u/jlcoo)
#### Post date: [2025年七月10日 03:22 UTC](https://meta.discourse.org/t/a-file-does-not-exist-error-occurred-during-database-backup/373471/3 "2025-07-10T03:22:23Z")

</div>

> [@pfaffman](#):
>
> you back up from the command line

非常感谢！我尝试了 `discourse backup` 命令行，并且成功了。但我不知道为什么在管理员的备份网站上会出错？
