stash icon indicating copy to clipboard operation
stash copied to clipboard

Parallel backup failing randomly

Open hossainemruz opened this issue 6 years ago • 3 comments
trafficstars

Ref:

  • https://github.com/stashed/stash/blob/18e1ab7e0e8dc19180c6361d7e579feaa9672b73/pkg/restic/restic_test.go#L272

  • https://github.com/stashed/stash/blob/18e1ab7e0e8dc19180c6361d7e579feaa9672b73/pkg/restic/restic_test.go#L357

hossainemruz avatar Oct 28 '19 04:10 hossainemruz

Not sure if this is relevant, but parallel restic back-ups to the same restic repo (e.g. on B2) always cause me drama. In theory it is supposed to work, but in practice they are very unreliable and block or fail all the time. I now use a separate restic repo for each scheduled backup task, so only one task is running against each repo at any given time. This would way more reliably.

whereisaaron avatar Oct 28 '19 04:10 whereisaaron

@whereisaaron Parallel backup on a single repo should work for different hostname. However, if you try to backup two different workloads with same hostname into same repo then it will not work. Stash uses default hostname host-0 for Deployments. I think this is causing your problem.

This issue is not related to your one. This issue is happening when we are trying to backup different hosts in parallel into a single repo using go-routine.

hossainemruz avatar Oct 28 '19 09:10 hossainemruz

Thanks @hossainemruz I didn't know the restic's parallel back-up behavior is different for the same vs different hostname! Not sure way back-ups from the same host should be treated differently or not supported? But thank you for the tip. Sorry it is not relevant.

whereisaaron avatar Oct 28 '19 17:10 whereisaaron