jlcodes99/cockpit-tools · warning

[WebDAV] Auto backup upload failed

Error message

[WebDAV] Auto backup upload failed

What it means

runAutoBackupCycle in src/services/scheduledBackupService.ts:402 creates the local auto-backup file, then optionally uploads it to WebDAV when sync is enabled (webdavSettings.enabled with non-empty username and has_password). Any rejection from uploadAutoBackupToWebdav is caught and logged as console.warn '[WebDAV] Auto backup upload failed'; the local backup still completes and is returned. Only the remote copy is missing.

Source

Thrown at src/services/scheduledBackupService.ts:402

  if (!settings.enabled || !hasSelection(selection) || !isAutoBackupDue(settings)) {
    return null;
  }

  const result = await createManagedBackup({
    trigger: 'auto',
    selection,
    retentionDays: settings.retention_days,
    markAsLastRun: true,
  });

  try {
    const webdavSettings = await getWebdavSyncSettings();
    if (webdavSettings.enabled && webdavSettings.username.trim() && webdavSettings.has_password) {
      await uploadAutoBackupToWebdav(result.file_name);
    }
  } catch (error) {
    console.warn('[WebDAV] Auto backup upload failed', error);
  }

  return result;
}

View on GitHub (pinned to 1ed8b77992)

Solutions

  1. Open WebDAV sync settings and re-test/re-enter the server URL, username, and password (stored password may be stale).
  2. Verify network reachability of the WebDAV server at the time the scheduled backup runs.
  3. Check the server's storage quota and delete old remote backups if full.
  4. Manually run an upload to reproduce the error immediately; inspect the logged error object for the HTTP status.

Example fix

// before
} catch (error) {
  console.warn('[WebDAV] Auto backup upload failed', error);
}
// after
} catch (error) {
  console.warn('[WebDAV] Auto backup upload failed', error);
  await notifyUserBackupUploadFailed(error); // surface to user instead of silent warn
}
Defensive patterns

Strategy: retry

Validate before calling

// Before the cycle uploads, validate WebDAV settings:
const s = await getWebdavSyncSettings();
const ready = s.enabled && s.username.trim() && s.has_password && /^https?:\/\//.test(s.serverUrl ?? '');
if (!ready) console.warn('WebDAV not configured; upload will be skipped or fail');

Type guard

function isWebdavReady(s: { enabled: boolean; username: string; has_password: boolean; serverUrl?: string }): boolean {
  return s.enabled && s.username.trim().length > 0 && s.has_password && /^https?:\/\//.test(s.serverUrl ?? '');
}

Try / catch

try {
  await uploadAutoBackupToWebdav(result.file_name);
} catch (error) {
  console.warn('[WebDAV] Auto backup upload failed', error);
  scheduleWebdavRetry(result.file_name, /* attempts */ 3);
}

Prevention

When it happens

Trigger: Auto backup cycle runs with WebDAV sync enabled and uploadAutoBackupToWebdav rejects — wrong server URL/credentials, network unreachable, insufficient WebDAV quota, 4xx/5xx from the server, or SSL/proxy issues.

Common situations: WebDAV password changed on the server but not in settings; server temporarily down or rate-limiting during scheduled backup; expired account/subscription; corporate proxy blocking the WebDAV host; misconfigured HTTPS certificate.

Related errors


AI-assisted analysis of jlcodes99/cockpit-tools@1ed8b77992 (2026-09-05). Data as JSON: /api/errors/1627368482c135fa. Report an issue: GitHub.