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
- Open WebDAV sync settings and re-test/re-enter the server URL, username, and password (stored password may be stale).
- Verify network reachability of the WebDAV server at the time the scheduled backup runs.
- Check the server's storage quota and delete old remote backups if full.
- 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
- Re-test WebDAV credentials whenever the server password changes.
- Monitor server storage quota; prune old remote backups.
- Schedule backups during windows of reliable connectivity; add retry with backoff.
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
- [AntigravityRuntime] failed to resolve preferred target:
- [AntigravityRuntime] failed to detect ${target} ${scanMode}
- Claude OAuth start 响应缺少关键字段
- invalid_backup_json
- backup_accounts_missing
AI-assisted analysis of jlcodes99/cockpit-tools@1ed8b77992 (2026-09-05).
Data as JSON: /api/errors/1627368482c135fa.
Report an issue: GitHub.