garethgeorge/backrest

error: failed to backup

Closed this issue · 7 comments

I am using Backrest via docker. It is all good but sometimes the backup stops before reaching 100% (1TB backup). Anyway, the resolution is very easy in this regards, I have to stop backrest container and re-lunch the backup a second time starting from 0% and hoping for the best

The issue I would like to report and ask for support is different. I am using backrest to backup remotely to a remote pc via ssh. The remote backup is working fine. However I did a backup using restic CLI in the remote pc using the same repository to backup containers/docker folders. Once the backup is finished I have this error in Backerst. No error using resict CLI. Can you help me to understand the issue?

error: failed to backup: command "/bin/restic-0.16.4 backup --json /HDD1/Backup /HDD1/Ebook /HDD1/Pers /HDD1/Photo HDD1/Music -o sftp.args=-i /HDD1root/AppData/backrest/.ssh/id_rsa --exclude-caches --tag plan:Backupgen --tag created-by:Backrest_casa --exclude .cache --exclude .tmp --exclude /HDD1/Documents/Franc/MAC/Games --parent 14112a11771222f68f010050fe9738ea48e2f7b8eba25f40ba3dc84a7f2fe421" failed: exit code -1: backup failed
processing command output: command output was not JSON: invalid character 'L' looking for beginning of value
Output:
Load(<index/623faece78>, 0, 0) returned error, retrying after 448.819661ms: permission denied

The result is that I cannot use backrest for the same repository. Any idea? Thanks.

This looks like a filesystem permission issue -- is backrest connecting as the same SSH user that created the initial backup set?

No, actually they are different users. But why I can see all snapshots without issue with restic CLI. Any resolution in Backrest, as it is my main solution for backuping? Thanks

Actually, I have created the first backup with Backrest via ssh. I did the 3 first snapshots with backrest via ssh. After that, I did a backup with restic cli using the same repository but a different user and tag. The result I cannot access the repository using backrest, but it seems there is no problem with restic. Any advice?

Accessing a restic repository from two different users can break the file systems permissions on the repository, you will want to chmod the files in the repository to all be owned by the user backrest is using over SSH.

you’ll also want to ensure that all use in the future is from the same user account.

Thank you so much, all is well noted. I was not aware about that. I will use the same user from now on. Please may you suggest how to do chmod? I tried to have a look at it by myself but it seems there are many different options for chmod.

I think you're looking for

chown -R user:group directory

In most cases the user and the group are the same e.g. you can do myself:myself

:)

TOP!!!! Thanks so much!!!