# Sshfs and backup

**URL:** <https://meta.discourse.org/t/sshfs-and-backup/256225>\
**Category:** Self-hosting\
**Tags:** backups\
**Created:** [February 25, 2023, 5:51am UTC](https://meta.discourse.org/t/sshfs-and-backup/256225 "2023-02-25T05:51:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![puchal](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@puchal](https://meta.discourse.org/u/puchal)\
**Post date:** [February 25, 2023, 5:51am UTC](https://meta.discourse.org/t/sshfs-and-backup/256225/1 "2023-02-25T05:51:40Z")

</div>

Hi,  
I host discourse for a small community. We have a very small, old VPS. The disk space cannot accommodate backups anymore, so I did a quick trick and mounted remote file system (using sshfs) as /var/discourse/shared/standalone/backups/default . Everything seems to work, I can create / delete a file or directory in /var/www/discourse/public/backups/default/ , but when I try to run a backup it fails. Is there anything I can do to make it work? Permissions are set to 777.

Alternatively - maybe in next version of software option to disable compression for backups will finally exist? That would give us few years of storage 🙂

Thank you!

```plaintext
[2023-02-25 04:41:33] pg_dump: executing SEQUENCE SET category_featured_topics_id_seq
[2023-02-25 04:41:33] pg_dump: executing SEQUENCE SET category_groups_id_seq
[2023-02-25 04:41:33] pg_dump: executing SEQUENCE SET category_required_tag_groups_id_seq
[2023-02-25 04:41:33] pg_dump: executing SEQUENCE SET category_tag_groups_id_seq
[2023-02-25 04:41:33] pg_dump: executing SEQUENCE SET category_tag_stats_id_seq
[2023-02-25 04:41:33] Finalizing backup...
[2023-02-25 04:41:33] Creating archive: p-e-2023-02-25-043914-v20230201192925.tar.gz
[2023-02-25 04:41:33] Making sure archive does not already exist...
[2023-02-25 04:41:34] EXCEPTION: /var/www/discourse/lib/discourse.rb:137:in `exec': rm: cannot remove '/var/www/discourse/public/backups/default/p-e-2023-02-25-043914-v20230201192925.tar': Permission denied

[2023-02-25 04:41:34] /var/www/discourse/lib/discourse.rb:171:in `execute_command'
/var/www/discourse/lib/discourse.rb:137:in `exec'
/var/www/discourse/lib/discourse.rb:33:in `execute_command'
/var/www/discourse/lib/backup_restore/backuper.rb:216:in `create_archive'
/var/www/discourse/lib/backup_restore/backuper.rb:40: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>'
[2023-02-25 04:41:34] Deleting old backups...
[2023-02-25 04:41:34] Cleaning stuff up...
[2023-02-25 04:41:34] Removing '.tar' leftovers...
[2023-02-25 04:41:34] Marking backup as finished...
[2023-02-25 04:41:34] Refreshing disk stats...
[2023-02-25 04:41:34] Notifying 'siteadmin' of the end of the backup...
[2023-02-25 04:41:42] Finished!

```

---

_[View the full topic](https://meta.discourse.org/t/sshfs-and-backup/256225)._
