# The backup has failed. .tar permissions

**URL:** https://meta.discourse.org/t/the-backup-has-failed-tar-permissions/181990
**Category:** Support
**Created:** [March 4, 2021, 8:38am UTC](https://meta.discourse.org/t/the-backup-has-failed-tar-permissions/181990 "2021-03-04T08:38:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ahmed\_khan1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed_khan1/32/201517_2.png) [@ahmed\_khan1](https://meta.discourse.org/u/ahmed_khan1)
#### Post date: [March 4, 2021, 8:38am UTC](https://meta.discourse.org/t/the-backup-has-failed-tar-permissions/181990/1 "2021-03-04T08:38:29Z")

</div>

I can’t backup discourse I tried multiple time but the same error occur again and again here is the log

```
    [2021-03-04 08:24:58] Finalizing backup...
    [2021-03-04 08:24:58] Creating archive: how-to-discuss-2021-03-04-082415-v20210302164429.tar.gz
    [2021-03-04 08:24:58] Making sure archive does not already exist...
    [2021-03-04 08:24:58] Creating empty archive...
    [2021-03-04 08:24:58] EXCEPTION: lib/discourse.rb:93:in `exec': tar: /var/www/discourse/public/backups/default/how-to-discuss-2021-03-04-082415-v20210302164429.tar: Cannot open: Permission denied
    tar: Error is not recoverable: exiting now

    [2021-03-04 08:24:58] lib/discourse.rb:103:in `execute_command'
    lib/discourse.rb:93:in `exec'
    lib/discourse.rb:43:in `execute_command'
    /var/www/discourse/lib/backup_restore/backuper.rb:202: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:34: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>'
    [2021-03-04 08:24:58] Deleting old backups...
    [2021-03-04 08:24:58] Cleaning stuff up...
    [2021-03-04 08:24:58] Removing '.tar' leftovers...
    [2021-03-04 08:24:58] Marking backup as finished...
    [2021-03-04 08:24:58] Refreshing disk stats...
    [2021-03-04 08:24:59] Notifying 'HowToDiscuss' of the end of the backup...

```

plz help​🙁

---

<div class="post-metadata">

### Author: ![ahmed\_khan1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed_khan1/32/201517_2.png) [@ahmed\_khan1](https://meta.discourse.org/u/ahmed_khan1)
#### Post date: [March 4, 2021, 8:45am UTC](https://meta.discourse.org/t/the-backup-has-failed-tar-permissions/181990/2 "2021-03-04T08:45:51Z")

</div>

the main error is

`EXCEPTION: lib/discourse.rb:93:in exec: tar: /var/www/discourse/public/backups/default/how-to-discuss-2021-03-04-084222-v20210302164429.tar: Cannot open: Permission denied`

discourse is creating the file and entering wrong permissions  
any solutions???

---

<div class="post-metadata">

### Author: ![ahmed\_khan1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ahmed_khan1/32/201517_2.png) [@ahmed\_khan1](https://meta.discourse.org/u/ahmed_khan1)
#### Post date: [March 4, 2021, 9:15am UTC](https://meta.discourse.org/t/the-backup-has-failed-tar-permissions/181990/3 "2021-03-04T09:15:47Z")

</div>

deleting the default directory in /var/discourse/shared/standalone/backups/ solved the issue

---

<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: [April 3, 2021, 9:16am UTC](https://meta.discourse.org/t/the-backup-has-failed-tar-permissions/181990/4 "2021-04-03T09:16:16Z")

</div>

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