fix: off-site copies survive slow object stores and say why they fail
- limits sized for WAN S3 (probe/list 120s, init 90s, retries 3, stuck-request 60s) - a finished copy (tagged snapshot present) is accepted instead of copied again; the verification listing is retried before the copy is called failed - a missing off-site repository is no longer a listing error - restic's stderr tail is kept and the hub logs the failure reason Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,12 +145,13 @@ impl HubState {
|
||||
for id in jobs {
|
||||
let offsite = offsite.clone();
|
||||
let prepared = state.vault.read().await.prepare_offsite_copy(id);
|
||||
let success = match prepared {
|
||||
Ok(copy) => offsite.copy_capture(copy).await.is_ok(),
|
||||
Err(_) => false,
|
||||
let result = match prepared {
|
||||
Ok(copy) => offsite.copy_capture(copy).await,
|
||||
Err(error) => Err(error),
|
||||
};
|
||||
if !success {
|
||||
tracing::warn!(%id, "off-site capture copy failed");
|
||||
let success = result.is_ok();
|
||||
if let Err(error) = &result {
|
||||
tracing::warn!(%id, error = %format!("{error:#}"), "off-site capture copy failed");
|
||||
}
|
||||
if state.db.set_offsite_result(id, success).is_err() {
|
||||
tracing::warn!(%id, "could not save off-site copy status");
|
||||
|
||||
Reference in New Issue
Block a user