The backup has failed. .tar permissions

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🙁

1 Like

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???

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

2 Likes

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