WP-30/31/32: backup targets, strategies and execution
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / ui (push) Has been cancelled

SMB (smbclient) and FTP/FTPS (curl with netrc) targets with encrypted
credentials and connection test; strategies with cron schedule, retention,
optional openssl AES-256 encryption; sources: PVC hostpath tar, pg_dumpall
in the Postgres pod, namespace manifests, host directory. Backup job
collects, encrypts, uploads, verifies size, records sha256 and applies
retention on the target; scheduler starts due strategies. Backups page
with target/strategy forms, run now and history. Restore guide in docs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Dennis Nemec
2026-09-02 23:15:38 +02:00
parent 39af18b336
commit 6134a47ff2
31 changed files with 2718 additions and 87 deletions

View File

@ -9,26 +9,26 @@ test('admin creates a target and a strategy, runs it and sees the backup', async
await page.getByRole('button', { name: 'New target' }).click()
const name = `NAS ${Date.now()}`
await page.getByLabel('Name').fill(name)
await page.getByLabel('Host').fill('nas.local')
await page.getByLabel('Name', { exact: true }).fill(name)
await page.getByLabel('Host', { exact: true }).fill('nas.local')
await page.getByLabel('Share').fill('backups')
await page.getByLabel('Directory').fill('softvisor')
await page.getByLabel('Username').fill('backup')
await page.getByLabel('Password').fill('smb-secret')
await page.getByLabel('Username', { exact: true }).fill('backup')
await page.getByLabel('Password', { exact: true }).fill('smb-secret')
await page.getByRole('button', { name: 'Save target' }).click()
const targetRow = page.getByRole('row', { name: new RegExp(name) })
await expect(targetRow).toBeVisible()
await targetRow.getByRole('button', { name: 'Test' }).click()
await expect(page.getByRole('status')).toContainText('Connection ok')
await expect(page.getByText(/Connection ok/)).toBeVisible()
await page.getByRole('button', { name: 'New strategy' }).click()
await page.getByLabel('Strategy name').fill('Gitea database')
await page.getByLabel('Source type').selectOption('postgres_dump')
await page.getByLabel('Namespace').fill('gitea')
await page.getByLabel('Pod').fill('gitea-postgresql-0')
await page.getByLabel('Schedule').fill('0 0 2 * * *')
await page.getByLabel('Target').selectOption({ label: name })
await page.getByLabel('Keep last').fill('3')
await page.getByLabel('Strategy name', { exact: true }).fill('Gitea database')
await page.getByLabel('Source type', { exact: true }).selectOption('postgres_dump')
await page.getByLabel('Namespace', { exact: true }).fill('gitea')
await page.getByLabel('Pod', { exact: true }).fill('gitea-postgresql-0')
await page.getByLabel('Schedule', { exact: true }).fill('0 0 2 * * *')
await page.getByLabel('Target', { exact: true }).selectOption({ label: name })
await page.getByLabel('Keep last', { exact: true }).fill('3')
await page.getByRole('button', { name: 'Save strategy' }).click()
const row = page.getByRole('row', { name: /Gitea database/ })
await expect(row).toBeVisible()