# כשל גיבוי מקומי, הקובץ קיים

**URL:** <https://meta.discourse.org/t/local-backup-failure-file-exists/194997>\
**Category:** Product Support\
**Created:** [25 ביוני,‏ 2021,‏ 11:12am UTC](https://meta.discourse.org/t/local-backup-failure-file-exists/194997 "2021-06-25T11:12:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![nachotester](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nachotester](https://meta.discourse.org/u/nachotester)\
**Post date:** [25 ביוני,‏ 2021,‏ 11:12am UTC](https://meta.discourse.org/t/local-backup-failure-file-exists/194997/1 "2021-06-25T11:12:00Z")

</div>

I have a docker-based Discourse instance building from a template provided by DigitalOcean. When I enabled automated backup for the first time, a dump file was generated in `/var/discourse/shared/standalone/backups/default/...` as expected.

I decided to delete the `backups` dir and created a `backups` symlink pointing it to a volume. Since then the backup job has been failing (I also entered the container and initiated manual backup, same error message).  
Here’s the stack trace:

```plaintext
File exists @ dir_s_mkdir - /var/www/discourse/public/backups
/usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `mkdir'
/usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `fu_mkdir'
/usr/local/lib/ruby/2.7.0/fileutils.rb:228:in `block (2 levels) in mkdir_p'
/usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `reverse_each'
/usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `block in mkdir_p'
/usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `each'
/usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `mkdir_p'
/var/www/discourse/lib/backup_restore/local_backup_store.rb:10:in `base_directory'
...

```

\*\*Edit  
I entered the container and did some debugging. As it turns out, there’s a symlink pointing ` /var/www/discourse/public/backups` → `/shared/backups` on the host, which is also a symlink in my case. There’s a file permission issue preventing the ruby process from writing to backups dir on the host.

Any tips?

---

_[View the full topic](https://meta.discourse.org/t/local-backup-failure-file-exists/194997)._
