7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.
TypeScript
Add database backups with safe restore (#999)
Tashfeena9b87740b242
diff --git a/client/src/components/keys/backups-section.tsx b/client/src/components/keys/backups-section.tsxnew file mode 100644index 00000000..408d5d59--- /dev/null+++ b/client/src/components/keys/backups-section.tsx@@ -0,0 +1,367 @@+import { useEffect, useState } from 'react'+import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'+import { apiFetch, getToken } from '@/lib/api'+import { toast } from '@/lib/toast'+import { Button } from '@/components/ui/button'+import { Input } from '@/components/ui/input'+import { Label } from '@/components/ui/label'+import { Switch } from '@/components/ui/switch'+import { Badge } from '@/components/ui/badge'+import { ConfirmButton } from '@/components/confirm-button'+import { Archive, ChevronDown, Download, Trash2 } from 'lucide-react'+import { useI18n } from '@/i18n'++interface BackupMeta {+ id: number+ filename: string+ filesize: number+ isFull: boolean+ source: 'manual' | 'scheduled' | 'pre-restore'+ createdAt: string+ tables: string[]+}++interface BackupSchedule {+ enabled: boolean+ time: string+ intervalDays: number+ backupPath: string+}++function formatBytes(bytes: number): string {+ if (bytes < 1024) return `${bytes} B`+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`+ return `${(bytes / 1024 / 1024).toFixed(1)} MB`+}++// The dump is a file download, not JSON, so it goes through fetch directly+// rather than apiFetch — with the same bearer token the rest of /api uses.+async function downloadBackupFile(id: number, filename: string): Promise<void> {+ const token = getToken()+ const base = import.meta.env.BASE_URL.replace(/\/$/, '')+ const res = await fetch(`${base}/api/backups/${id}/download`, {+ headers: token ? { Authorization: `Bearer ${token}` } : {},+ })+ if (!res.ok) {+ const body = await res.json().catch(() => null)+ toast.error(body?.error?.message ?? `HTTP ${res.status}`)+ return+ }+ const url = URL.createObjectURL(await res.blob())+ const a = document.createElement('a')+ a.href = url+ a.download = filename+ document.body.appendChild(a)+ a.click()+ a.remove()+ URL.revokeObjectURL(url)+}++/**+ * Database dumps, as a collapsed section beside the outbound-proxy settings.+ *+ * Collapsed by default and mounted lazily: backups are a once-in-a-while+ * operation, and the Keys page belongs to the unified key. Expanding is what+ * loads the list, the table names and the schedule.+ */+export function BackupsSection() {+ const { t } = useI18n()+ const [expanded, setExpanded] = useState(false)++ return (+ <section className="rounded-3xl border bg-card p-5">+ <button+ type="button"+ onClick={() => setExpanded(value => !value)}+ aria-expanded={expanded}+ className="flex w-full items-start justify-between gap-4 text-left"+ >+ <div>+ <h2 className="text-sm font-medium flex items-center gap-2">+ <Archive className="size-3.5 text-muted-foreground" />+ {t('backups.title')}+ </h2>+ <p className="text-xs text-muted-foreground mt-0.5">{t('backups.description')}</p>+ </div>+ <ChevronDown className={`mt-1 size-4 shrink-0 text-muted-foreground transition-transform ${expanded ? '' : '-rotate-90'}`} />+ </button>++ {expanded && <BackupsPanel />}+ </section>+ )+}++function BackupsPanel() {+ const { t } = useI18n()+ const queryClient = useQueryClient()+ const [page, setPage] = useState(1)+ const [selected, setSelected] = useState<Set<string>>(new Set())+ const pageSize = 10++ const { data: tables = [] } = useQuery<string[]>({+ queryKey: ['backup-tables'],+ queryFn: () => apiFetch<{ tables: string[] }>('/api/backups/tables').then(r => r.tables),+ })++ const { data: list } = useQuery<{ items: BackupMeta[]; total: number }>({+ queryKey: ['backups', page],+ queryFn: () => apiFetch(`/api/backups?page=${page}&pageSize=${pageSize}`),+ })++ const { data: schedule } = useQuery<{ schedule: BackupSchedule }>({+ queryKey: ['backup-schedule'],+ queryFn: () => apiFetch('/api/backups/schedule'),+ })++ const invalidate = () => {+ queryClient.invalidateQueries({ queryKey: ['backups'] })+ queryClient.invalidateQueries({ queryKey: ['backup-schedule'] })+ }++ const create = useMutation({+ meta: { silenceToast: true },+ mutationFn: (chosen: string[]) =>+ apiFetch<{ backup: BackupMeta }>('/api/backups', {+ method: 'POST',+ body: JSON.stringify(chosen.length > 0 ? { tables: chosen } : {}),+ }),+ onSuccess: result => {+ toast.success(t('backups.created', { filename: result.backup.filename }))+ setSelected(new Set())+ setPage(1)+ invalidate()+ },+ onError: error => toast.error(error instanceof Error ? error.message : String(error)),+ })++ const restore = useMutation({+ meta: { silenceToast: true },+ mutationFn: (id: number) =>+ apiFetch<{ snapshot: BackupMeta }>(`/api/backups/${id}/restore`, { method: 'POST' }),+ onSuccess: result => {+ toast.success(t('backups.restored', { filename: result.snapshot.filename }))+ invalidate()+ // Restore replaces the routing tables wholesale; every cached list is stale.+ queryClient.invalidateQueries()+ },+ onError: error => toast.error(error instanceof Error ? error.message : String(error)),+ })++ const remove = useMutation({+ mutationFn: (id: number) => apiFetch(`/api/backups/${id}`, { method: 'DELETE' }),+ onSuccess: invalidate,+ })++ const total = list?.total ?? 0+ const totalPages = Math.max(1, Math.ceil(total / pageSize))++ return (+ <div className="mt-5 space-y-6 border-t pt-5">+ {/* What a dump does and does not carry: the one thing an operator must+ know before mailing the file to themselves. */}+ <p className="rounded-2xl bg-muted/50 px-3 py-2 text-xs text-muted-foreground">+ {t('backups.excludedNote')}+ </p>++ <div className="space-y-3">+ <div className="flex flex-wrap items-center gap-2">+ <p className="text-xs text-muted-foreground flex-1 min-w-40">{t('backups.selectHint')}</p>+ <Button variant="ghost" size="xs" onClick={() => setSelected(new Set(tables))} disabled={tables.length === 0}>+ {t('backups.selectAll')}+ </Button>+ <Button variant="ghost" size="xs" onClick={() => setSelected(new Set())} disabled={selected.size === 0}>+ {t('backups.deselectAll')}+ </Button>+ </div>++ <div className="flex flex-wrap gap-1.5">+ {tables.map(table => {+ const isOn = selected.has(table)+ return (+ <button+ key={table}+ type="button"+ aria-pressed={isOn}+ onClick={() => {+ const next = new Set(selected)+ if (isOn) next.delete(table)+ else next.add(table)+ setSelected(next)+ }}+ className={`inline-flex h-6 items-center rounded-4xl border px-2 font-mono text-[11px] transition-colors ${+ isOn ? 'border-ring bg-muted' : 'border-border hover:bg-muted/50'+ }`}+ >+ {table}+ </button>+ )+ })}+ </div>++ <div className="flex flex-wrap items-center gap-2">+ <Button size="sm" onClick={() => create.mutate([])} disabled={create.isPending}>+ {t('backups.fullBackup')}+ </Button>+ <Button+ variant="outline"+ size="sm"+ onClick={() => create.mutate([...selected])}+ disabled={create.isPending || selected.size === 0}+ >+ {t('backups.backupSelected', { count: selected.size })}+ </Button>+ </div>+ </div>++ <div className="space-y-2">+ <h3 className="text-xs font-medium">{t('backups.list')}</h3>+ {list && list.items.length > 0 ? (+ <>+ <ul className="divide-y rounded-2xl border">+ {list.items.map(item => (+ <li key={item.id} className="flex flex-wrap items-center gap-3 px-3 py-2">+ <div className="min-w-0 flex-1">+ <div className="truncate font-mono text-xs">{item.filename}</div>+ <div className="mt-0.5 text-[11px] text-muted-foreground">+ {new Date(item.createdAt).toLocaleString()} · {formatBytes(item.filesize)} ·{' '}+ {item.isFull ? t('backups.full') : t('backups.tablesCount', { count: item.tables.length })}+ </div>+ </div>+ <Badge variant={item.source === 'manual' ? 'outline' : 'secondary'}>+ {item.source === 'scheduled'+ ? t('backups.scheduled')+ : item.source === 'pre-restore'+ ? t('backups.preRestore')+ : t('backups.manual')}+ </Badge>+ <div className="inline-flex items-center gap-1">+ <Button+ variant="ghost"+ size="icon-sm"+ title={t('backups.download')}+ aria-label={t('backups.download')}+ onClick={() => void downloadBackupFile(item.id, item.filename)}+ >+ <Download />+ </Button>+ <ConfirmButton+ size="xs"+ onConfirm={() => restore.mutate(item.id)}+ disabled={restore.isPending}+ confirmLabel={t('backups.confirmRestore')}+ >+ {t('backups.restore')}+ </ConfirmButton>+ <ConfirmButton+ size="icon-sm"+ armedSize="xs"+ onConfirm={() => remove.mutate(item.id)}+ title={t('backups.delete')}+ aria-label={t('backups.delete')}+ >+ <Trash2 />+ </ConfirmButton>+ </div>+ </li>+ ))}+ </ul>+ {totalPages > 1 && (+ <div className="flex items-center justify-between gap-3">+ <Button variant="ghost" size="xs" disabled={page <= 1} onClick={() => setPage(p => p - 1)}>+ {t('backups.prevPage')}+ </Button>+ <span className="text-[11px] text-muted-foreground">{page} / {totalPages}</span>+ <Button variant="ghost" size="xs" disabled={page >= totalPages} onClick={() => setPage(p => p + 1)}>+ {t('backups.nextPage')}+ </Button>+ </div>+ )}+ </>+ ) : (+ <p className="rounded-2xl border border-dashed px-3 py-6 text-center text-xs text-muted-foreground">+ {t('backups.empty')}+ </p>+ )}+ </div>++ <AutoBackupForm schedule={schedule?.schedule ?? null} onSaved={invalidate} />+ </div>+ )+}++function AutoBackupForm({ schedule, onSaved }: { schedule: BackupSchedule | null; onSaved: () => void }) {+ const { t } = useI18n()+ const [enabled, setEnabled] = useState(false)+ const [time, setTime] = useState('03:00')+ const [intervalDays, setIntervalDays] = useState('1')+ const [backupPath, setBackupPath] = useState('')+ const [savedFlash, setSavedFlash] = useState(false)++ useEffect(() => {+ if (!schedule) return+ setEnabled(schedule.enabled)+ setTime(schedule.time)+ setIntervalDays(String(schedule.intervalDays))+ setBackupPath(schedule.backupPath ?? '')+ }, [schedule])++ const save = useMutation({+ meta: { silenceToast: true },+ mutationFn: (body: Record<string, unknown>) =>+ apiFetch('/api/backups/schedule', { method: 'PUT', body: JSON.stringify(body) }),+ onSuccess: () => {+ setSavedFlash(true)+ setTimeout(() => setSavedFlash(false), 2000)+ onSaved()+ },+ onError: error => toast.error(error instanceof Error ? error.message : String(error)),+ })++ return (+ <div className="space-y-3">+ <div className="flex items-center justify-between gap-4">+ <div>+ <h3 className="text-xs font-medium">{t('backups.autoTitle')}</h3>+ <p className="text-[11px] text-muted-foreground mt-0.5">{t('backups.autoHint')}</p>+ </div>+ <Switch size="sm" checked={enabled} onCheckedChange={setEnabled} aria-label={t('backups.autoTitle')} />+ </div>++ <div className="grid gap-3 sm:grid-cols-3">+ <div className="space-y-1.5">+ <Label className="text-xs">{t('backups.time')}</Label>+ <Input type="time" value={time} onChange={e => setTime(e.target.value)} />+ </div>+ <div className="space-y-1.5">+ <Label className="text-xs">{t('backups.intervalDays')}</Label>+ <Input type="number" min={1} max={365} value={intervalDays} onChange={e => setIntervalDays(e.target.value)} />+ </div>+ <div className="space-y-1.5">+ <Label className="text-xs">{t('backups.path')}</Label>+ <Input+ value={backupPath}+ onChange={e => setBackupPath(e.target.value)}+ placeholder={t('backups.pathPlaceholder')}+ className="font-mono text-xs"+ />+ </div>+ </div>+ <p className="text-[11px] text-muted-foreground">{t('backups.pathHint')}</p>++ <Button+ size="sm"+ disabled={save.isPending}+ onClick={() =>+ save.mutate({+ enabled,+ time: time || '03:00',+ intervalDays: Math.max(1, Number.parseInt(intervalDays, 10) || 1),+ backupPath: backupPath.trim(),+ })+ }+ >+ {savedFlash ? t('backups.saved') : t('backups.save')}+ </Button>+ </div>+ )+}diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.jsonindex ae9b577d..05093a0e 100644--- a/client/src/i18n/locales/am.json+++ b/client/src/i18n/locales/am.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ጤናማ","rateLimited": "መጠን-የተገደበ",diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.jsonindex f58805bc..b17ab0c2 100644--- a/client/src/i18n/locales/ar.json+++ b/client/src/i18n/locales/ar.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "صحي","rateLimited": "معدل محدود",diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.jsonindex 7f622e03..c029d925 100644--- a/client/src/i18n/locales/az.json+++ b/client/src/i18n/locales/az.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sağlam","rateLimited": "sürət məhdudiyyəti",diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.jsonindex d50e56cf..fa277bbc 100644--- a/client/src/i18n/locales/bg.json+++ b/client/src/i18n/locales/bg.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "здравословно","rateLimited": "Ограничен тариф",diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.jsonindex 71aaf937..db05f9f2 100644--- a/client/src/i18n/locales/bn.json+++ b/client/src/i18n/locales/bn.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "সুস্থ","rateLimited": "হার-সীমিত",diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.jsonindex f341892a..6980bc51 100644--- a/client/src/i18n/locales/cs.json+++ b/client/src/i18n/locales/cs.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "zdravé","rateLimited": "Omezené rychlosti",diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.jsonindex fa44d5b0..41599fbf 100644--- a/client/src/i18n/locales/da.json+++ b/client/src/i18n/locales/da.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sundt","rateLimited": "Takstbegrænset",diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.jsonindex 2465c3d2..34f723f7 100644--- a/client/src/i18n/locales/de.json+++ b/client/src/i18n/locales/de.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "gesund","rateLimited": "satzbegrenzt",diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.jsonindex 7272e1ad..c68a8ab5 100644--- a/client/src/i18n/locales/el.json+++ b/client/src/i18n/locales/el.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "υγιής","rateLimited": "περιορισμένος συντελεστής",diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.jsonindex 5937ada4..400dc7ed 100644--- a/client/src/i18n/locales/en.json+++ b/client/src/i18n/locales/en.json@@ -562,6 +562,40 @@"bulkResult": "Updated {done}; failed {failed}.","bulkDeleteResult": "Deleted {done}; failed {failed}."},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "healthy","rateLimited": "rate-limited",diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.jsonindex dadb9d42..85de1f8e 100644--- a/client/src/i18n/locales/es.json+++ b/client/src/i18n/locales/es.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "correcto","rateLimited": "limitado",diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.jsonindex e2b8aaeb..1f3fcebd 100644--- a/client/src/i18n/locales/fa.json+++ b/client/src/i18n/locales/fa.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "سالم","rateLimited": "با نرخ محدود",diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.jsonindex 781d2000..7a00fdf8 100644--- a/client/src/i18n/locales/fi.json+++ b/client/src/i18n/locales/fi.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "terve","rateLimited": "rajoitettu maksu",diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.jsonindex 7ebca278..3f03051d 100644--- a/client/src/i18n/locales/fr.json+++ b/client/src/i18n/locales/fr.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sain","rateLimited": "limité",diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.jsonindex 992f4002..0447e2f6 100644--- a/client/src/i18n/locales/gu.json+++ b/client/src/i18n/locales/gu.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "સ્વસ્થ","rateLimited": "દર-મર્યાદિત",diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.jsonindex 4011fb41..f325f037 100644--- a/client/src/i18n/locales/ha.json+++ b/client/src/i18n/locales/ha.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "lafiya","rateLimited": "iyaka-iyakantacce",diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.jsonindex 99035a94..0c2f7593 100644--- a/client/src/i18n/locales/he.json+++ b/client/src/i18n/locales/he.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "בריא","rateLimited": "הגבלת קצב",diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.jsonindex 76aa1d7d..43956bec 100644--- a/client/src/i18n/locales/hi.json+++ b/client/src/i18n/locales/hi.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "स्वस्थ","rateLimited": "दर-सीमित",diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.jsonindex 658b0b0e..bbebf25b 100644--- a/client/src/i18n/locales/hr.json+++ b/client/src/i18n/locales/hr.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Zdravo","rateLimited": "Ograničenje brzine",diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.jsonindex 80bbcff6..a06f128f 100644--- a/client/src/i18n/locales/hu.json+++ b/client/src/i18n/locales/hu.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "egészséges","rateLimited": "Korlátozott díj",diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.jsonindex 5448d7ca..0307a816 100644--- a/client/src/i18n/locales/id.json+++ b/client/src/i18n/locales/id.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sehat","rateLimited": "terbatas tarif",diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.jsonindex 1bb0c975..c9345b21 100644--- a/client/src/i18n/locales/ig.json+++ b/client/src/i18n/locales/ig.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ahụike","rateLimited": "oke-oke",diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.jsonindex d07f5454..408d60ce 100644--- a/client/src/i18n/locales/it.json+++ b/client/src/i18n/locales/it.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "funzionante","rateLimited": "limitato",diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.jsonindex eef468ea..d4d7161c 100644--- a/client/src/i18n/locales/ja.json+++ b/client/src/i18n/locales/ja.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "健康な","rateLimited": "レート制限のある",diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.jsonindex 52079d02..ba4df9cf 100644--- a/client/src/i18n/locales/ka.json+++ b/client/src/i18n/locales/ka.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ჯანსაღი","rateLimited": "განაკვეთი შეზღუდულია",diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.jsonindex 031fea60..fc955c22 100644--- a/client/src/i18n/locales/km.json+++ b/client/src/i18n/locales/km.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "មានសុខភាពល្អ","rateLimited": "កំណត់អត្រា",diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.jsonindex 87e46749..bc1954c0 100644--- a/client/src/i18n/locales/kn.json+++ b/client/src/i18n/locales/kn.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ಆರೋಗ್ಯಕರ","rateLimited": "ದರ-ಸೀಮಿತ",diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.jsonindex 6e2cd951..f6c8453c 100644--- a/client/src/i18n/locales/ko.json+++ b/client/src/i18n/locales/ko.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "건강한","rateLimited": "속도 제한",diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.jsonindex f076200a..7f35ba70 100644--- a/client/src/i18n/locales/lt.json+++ b/client/src/i18n/locales/lt.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Sveika","rateLimited": "Riboto tarifo",diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.jsonindex 0da781d2..ac2d6b56 100644--- a/client/src/i18n/locales/ml.json+++ b/client/src/i18n/locales/ml.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ആരോഗ്യമുള്ള","rateLimited": "നിരക്ക്-പരിമിതമായ",diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.jsonindex 40cdae24..d0c45b0f 100644--- a/client/src/i18n/locales/mr.json+++ b/client/src/i18n/locales/mr.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "निरोगी","rateLimited": "दर-मर्यादित",diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.jsonindex 6711754c..5f410955 100644--- a/client/src/i18n/locales/ms.json+++ b/client/src/i18n/locales/ms.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sihat","rateLimited": "terhad kadar",diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.jsonindex 7310feda..58cc0201 100644--- a/client/src/i18n/locales/my.json+++ b/client/src/i18n/locales/my.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ကျန်းမာသော","rateLimited": "နှုန်းကန့်သတ်ထားသော",diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.jsonindex fdfad9c6..f90a5438 100644--- a/client/src/i18n/locales/ne.json+++ b/client/src/i18n/locales/ne.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "स्वस्थ छ","rateLimited": "दर-सिमित",diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.jsonindex d01733e3..6755b0b8 100644--- a/client/src/i18n/locales/nl.json+++ b/client/src/i18n/locales/nl.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Gezond","rateLimited": "Tariefbeperkt",diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.jsonindex 39b2403e..82b7b5a6 100644--- a/client/src/i18n/locales/no.json+++ b/client/src/i18n/locales/no.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Sunt","rateLimited": "Prisbegrenset",diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.jsonindex 44eb636b..15da0766 100644--- a/client/src/i18n/locales/or.json+++ b/client/src/i18n/locales/or.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ସୁସ୍ଥ","rateLimited": "ହାର-ସୀମିତ",diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.jsonindex 8704b905..9e9d90c2 100644--- a/client/src/i18n/locales/pa.json+++ b/client/src/i18n/locales/pa.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ਸਿਹਤਮੰਦ","rateLimited": "ਦਰ-ਸੀਮਤ",diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.jsonindex 879a1f8e..78905272 100644--- a/client/src/i18n/locales/pl.json+++ b/client/src/i18n/locales/pl.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "zdrowy","rateLimited": "ograniczona stawka",diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.jsonindex 762b9ba3..01d1fe89 100644--- a/client/src/i18n/locales/pt-BR.json+++ b/client/src/i18n/locales/pt-BR.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "saudável","rateLimited": "limitado",diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.jsonindex 01fd6b08..85f250c9 100644--- a/client/src/i18n/locales/pt-PT.json+++ b/client/src/i18n/locales/pt-PT.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Saudável","rateLimited": "Taxa limitada",diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.jsonindex 78ebc696..e2327a9a 100644--- a/client/src/i18n/locales/ro.json+++ b/client/src/i18n/locales/ro.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Sănătos","rateLimited": "cu rată limitată",diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.jsonindex e5ac650b..ff1e8e67 100644--- a/client/src/i18n/locales/ru.json+++ b/client/src/i18n/locales/ru.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "здоровый","rateLimited": "ограниченный по скорости",diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.jsonindex d7462f7b..062d3047 100644--- a/client/src/i18n/locales/si.json+++ b/client/src/i18n/locales/si.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "සෞඛ්ය සම්පන්න","rateLimited": "අනුපාත සීමා සහිත",diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.jsonindex a2ef91b2..c38c2483 100644--- a/client/src/i18n/locales/sk.json+++ b/client/src/i18n/locales/sk.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "zdravé","rateLimited": "Obmedzené rýchlosti",diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.jsonindex 546931f8..ae1b4329 100644--- a/client/src/i18n/locales/sr.json+++ b/client/src/i18n/locales/sr.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "здраво","rateLimited": "ограничено на стопу",diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.jsonindex 5da32c1d..4b3e5162 100644--- a/client/src/i18n/locales/sv.json+++ b/client/src/i18n/locales/sv.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "Hälsosamt","rateLimited": "Prisbegränsad",diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.jsonindex d0f36d63..f8e197df 100644--- a/client/src/i18n/locales/sw.json+++ b/client/src/i18n/locales/sw.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "afya","rateLimited": "kiwango-mdogo",diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.jsonindex 31a99cd1..84a3196a 100644--- a/client/src/i18n/locales/ta.json+++ b/client/src/i18n/locales/ta.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ஆரோக்கியமான","rateLimited": "விகிதம் வரையறுக்கப்பட்ட",diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.jsonindex e422186e..63369e7d 100644--- a/client/src/i18n/locales/te.json+++ b/client/src/i18n/locales/te.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ఆరోగ్యకరమైన","rateLimited": "రేటు-పరిమితం",diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.jsonindex d3cfed5a..985ac3b5 100644--- a/client/src/i18n/locales/th.json+++ b/client/src/i18n/locales/th.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "มีสุขภาพดี","rateLimited": "จำกัดอัตรา",diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.jsonindex e560278d..3d919044 100644--- a/client/src/i18n/locales/tl.json+++ b/client/src/i18n/locales/tl.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "malusog","rateLimited": "limitado sa rate",diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.jsonindex fb68e3e7..ab7dec11 100644--- a/client/src/i18n/locales/tr.json+++ b/client/src/i18n/locales/tr.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sağlıklı","rateLimited": "hız sınırlı",diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.jsonindex f86dc197..c9cdf851 100644--- a/client/src/i18n/locales/uk.json+++ b/client/src/i18n/locales/uk.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "здоровий","rateLimited": "обмежений по швидкості",diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.jsonindex d478fa20..890b2f6f 100644--- a/client/src/i18n/locales/ur.json+++ b/client/src/i18n/locales/ur.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "صحت مند","rateLimited": "شرح محدود",diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.jsonindex 04cb2be7..db2d9558 100644--- a/client/src/i18n/locales/uz.json+++ b/client/src/i18n/locales/uz.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "sog'lom","rateLimited": "stavka bilan cheklangan",diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.jsonindex 1c26d231..4b15efb1 100644--- a/client/src/i18n/locales/vi.json+++ b/client/src/i18n/locales/vi.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "khỏe mạnh","rateLimited": "giới hạn tỷ lệ",diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.jsonindex 2b278cd2..287d59e5 100644--- a/client/src/i18n/locales/yo.json+++ b/client/src/i18n/locales/yo.json@@ -562,6 +562,40 @@"proxyTestOk": "Proxy works — {ms}ms round trip","proxyTestFail": "Proxy failed: {reason}"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "ni ilera","rateLimited": "oṣuwọn-lopin",diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.jsonindex 37133da8..e280d901 100644--- a/client/src/i18n/locales/zh-CN.json+++ b/client/src/i18n/locales/zh-CN.json@@ -562,6 +562,40 @@"bulkResult": "已更新 {done} 个;失败 {failed} 个。","bulkDeleteResult": "已删除 {done} 个;失败 {failed} 个。"},+ "backups": {+ "title": "备份",+ "description": "将路由数据导出为数据库目录下的 .sql 文件,并可随时恢复。",+ "excludedNote": "备份包含服务商、模型、路由设置与请求历史。账号、会话和 URL 令牌永远不会被导出,因此备份文件中没有密码哈希或登录令牌,恢复备份也不会让你退出登录。服务商密钥仍以本服务器的 ENCRYPTION_KEY 加密保存:只有持有该密钥的服务器才能恢复这个备份。",+ "selectHint": "备份全部数据,或只选择需要的数据表。",+ "selectAll": "全选",+ "deselectAll": "清空",+ "fullBackup": "完整备份",+ "backupSelected": "备份所选({count})",+ "created": "备份已写入 {filename}",+ "list": "磁盘上的备份",+ "empty": "暂无备份",+ "full": "全部数据表",+ "tablesCount": "{count} 个数据表",+ "manual": "手动",+ "scheduled": "定时",+ "preRestore": "恢复前快照",+ "download": "下载",+ "restore": "恢复",+ "confirmRestore": "确认覆盖?",+ "restored": "已恢复。原有数据已保存为 {filename}。",+ "delete": "删除备份",+ "prevPage": "上一页",+ "nextPage": "下一页",+ "autoTitle": "自动备份",+ "autoHint": "服务器按此周期自动生成完整备份。",+ "time": "时间(HH:mm)",+ "intervalDays": "间隔天数",+ "path": "目录",+ "pathPlaceholder": "backups",+ "pathHint": "相对于数据库所在目录。备份不能写到该目录之外。",+ "save": "保存计划",+ "saved": "已保存"+ },"status": {"healthy": "健康","rateLimited": "被限流",diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.jsonindex 34932f96..5e47c00f 100644--- a/client/src/i18n/locales/zh-TW.json+++ b/client/src/i18n/locales/zh-TW.json@@ -562,6 +562,40 @@"bulkResult": "已更新 {done} 個;失敗 {failed} 個。","bulkDeleteResult": "已刪除 {done} 個;失敗 {failed} 個。"},+ "backups": {+ "title": "Backups",+ "description": "Save the routing data to a .sql file beside the database, and restore it later.",+ "excludedNote": "A backup carries your providers, models, routing settings and request history. Accounts, sessions and URL tokens are never included, so a dump holds no password hashes or login tokens and restoring one cannot log you out. Provider keys stay encrypted with this server's ENCRYPTION_KEY: a backup can only be restored on a server that still holds that key.",+ "selectHint": "Back up everything, or pick the tables you need.",+ "selectAll": "Select all",+ "deselectAll": "Clear",+ "fullBackup": "Full backup",+ "backupSelected": "Back up selected ({count})",+ "created": "Backup written to {filename}",+ "list": "Backups on disk",+ "empty": "No backups yet",+ "full": "All tables",+ "tablesCount": "{count} tables",+ "manual": "Manual",+ "scheduled": "Scheduled",+ "preRestore": "Pre-restore",+ "download": "Download",+ "restore": "Restore",+ "confirmRestore": "Replace data?",+ "restored": "Restored. The previous data was saved as {filename}.",+ "delete": "Delete backup",+ "prevPage": "Previous",+ "nextPage": "Next",+ "autoTitle": "Automatic backups",+ "autoHint": "The server writes a full backup on this cadence.",+ "time": "Time (HH:mm)",+ "intervalDays": "Every N days",+ "path": "Folder",+ "pathPlaceholder": "backups",+ "pathHint": "Relative to the database directory. Backups cannot be written outside it.",+ "save": "Save schedule",+ "saved": "Saved"+ },"status": {"healthy": "健康","rateLimited": "受速率限制",diff --git a/client/src/pages/KeysPage.tsx b/client/src/pages/KeysPage.tsxindex a8c88659..df049165 100644--- a/client/src/pages/KeysPage.tsx+++ b/client/src/pages/KeysPage.tsx@@ -12,6 +12,7 @@ import { QuotaSignalsSection } from '@/components/keys/quota-signals-section'import { UnifiedKeySection } from '@/components/keys/unified-key-section'import { ClientProfilesSection } from '@/components/keys/client-profiles-section'import { ProxySettingsSection } from '@/components/keys/proxy-settings-section'+import { BackupsSection } from '@/components/keys/backups-section'import { AnthropicSection } from '@/components/keys/anthropic-section'import { ProviderList } from '@/components/keys/provider-list'import { ProviderChecklistSection } from '@/components/keys/provider-checklist-section'@@ -104,6 +105,7 @@ export default function KeysPage() {<UnifiedKeySection /><ClientProfilesSection /><ProxySettingsSection />+ <BackupsSection /></>)}diff --git a/server/src/__tests__/db/migrate/roundtrip.test.ts b/server/src/__tests__/db/migrate/roundtrip.test.tsindex e2acf9e1..37c32a2a 100644--- a/server/src/__tests__/db/migrate/roundtrip.test.ts+++ b/server/src/__tests__/db/migrate/roundtrip.test.ts@@ -29,6 +29,7 @@ const API_KEY_PROXY_FILENAME = '20260810_000001_api_key_proxy.ts';const PLAYGROUND_CONVERSATIONS_FILENAME = '20260820_000001_playground_conversations.ts';const CUSTOM_MODEL_TOMBSTONES_FILENAME = '20260819_000001_custom_model_tombstones.ts';const SERVER_LOGS_FILENAME = '20260823_000001_server_logs.ts';+const BACKUPS_TABLE_FILENAME = '20260823_000002_backups_table.ts';interface SchemaRow {type: string;@@ -104,6 +105,7 @@ describe('migration round trip', () => {CUSTOM_MODEL_TOMBSTONES_FILENAME,PLAYGROUND_CONVERSATIONS_FILENAME,SERVER_LOGS_FILENAME,+ BACKUPS_TABLE_FILENAME,]);} finally {db.close();diff --git a/server/src/__tests__/routes/backups.test.ts b/server/src/__tests__/routes/backups.test.tsnew file mode 100644index 00000000..6daab027--- /dev/null+++ b/server/src/__tests__/routes/backups.test.ts@@ -0,0 +1,238 @@+import { describe, it, expect, beforeAll, afterAll } from 'vitest';+import fs from 'node:fs';+import os from 'node:os';+import path from 'node:path';+import type { Express } from 'express';+import { createApp } from '../../app.js';+import { initDb, getDb } from '../../db/index.js';+import { mintDashboardToken, isGatedApiPath } from '../helpers/auth.js';+import { createBackup } from '../../services/backups.js';++let dashToken = '';+let dataDir = '';++async function request(app: Express, method: string, path: string, body?: unknown) {+ const server = app.listen(0);+ const addr = server.address() as { port: number };+ const url = `http://127.0.0.1:${addr.port}${path}`;+ const res = await fetch(url, {+ method,+ headers: {+ ...(body !== undefined ? { 'Content-Type': 'application/json' } : {}),+ ...(isGatedApiPath(path) ? { Authorization: `Bearer ${dashToken}` } : {}),+ },+ body: body !== undefined ? JSON.stringify(body) : undefined,+ });+ const data = await res.json().catch(() => null);+ server.close();+ return { status: res.status, body: data };+}++function dumpPath(id: number): string {+ const row = getDb().prepare('SELECT filepath FROM backups WHERE id = ?').get(id) as { filepath: string };+ return row.filepath;+}++function modelCount(): number {+ return (getDb().prepare('SELECT COUNT(*) AS n FROM models').get() as { n: number }).n;+}++/** Everything above the first blank line: format, schema, key fingerprint and+ * the table list restore validates before it touches a row. */+function headerOf(sql: string): string {+ return sql.slice(0, sql.indexOf('\n\n') + 2);+}++describe('Backups API', () => {+ let app: Express;++ beforeAll(() => {+ process.env.ENCRYPTION_KEY = '0'.repeat(64);+ // Backups anchor to the database's directory, so point the default DB path+ // at a scratch directory rather than writing dumps into the repo.+ dataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'freeapi-backups-'));+ process.env.FREEAPI_DB_PATH = path.join(dataDir, 'freeapi.db');+ initDb(':memory:');+ app = createApp();+ dashToken = mintDashboardToken();+ });++ afterAll(() => {+ delete process.env.FREEAPI_DB_PATH;+ fs.rmSync(dataDir, { recursive: true, force: true });+ });++ it('lists tables, creates a full backup, restores it, and deletes it', async () => {+ const tables = await request(app, 'GET', '/api/backups/tables');+ expect(tables.status).toBe(200);+ expect(Array.isArray(tables.body.tables)).toBe(true);+ expect(tables.body.tables).toContain('models');++ const created = await request(app, 'POST', '/api/backups', {});+ expect(created.status).toBe(201);+ expect(created.body.backup.id).toBeGreaterThan(0);+ expect(created.body.backup.isFull).toBe(true);++ const listed = await request(app, 'GET', '/api/backups?page=1&pageSize=20');+ expect(listed.status).toBe(200);+ expect(listed.body.items[0].filename).toBe(created.body.backup.filename);++ const restored = await request(app, 'POST', `/api/backups/${created.body.backup.id}/restore`);+ expect(restored.status).toBe(200);+ expect(restored.body.success).toBe(true);+ // Restore always leaves an undo behind.+ expect(restored.body.snapshot.source).toBe('pre-restore');++ const deleted = await request(app, 'DELETE', `/api/backups/${created.body.backup.id}`);+ expect(deleted.status).toBe(200);++ const after = await request(app, 'GET', '/api/backups?page=1&pageSize=20');+ expect(after.body.items.some((item: { id: number }) => item.id === created.body.backup.id)).toBe(false);+ });++ it('round-trips the schedule setting', async () => {+ const put = await request(app, 'PUT', '/api/backups/schedule', {+ enabled: true,+ time: '04:15',+ intervalDays: 2,+ backupPath: '',+ });+ expect(put.status).toBe(200);+ expect(put.body.schedule).toMatchObject({ enabled: true, time: '04:15', intervalDays: 2, backupPath: '' });++ const get = await request(app, 'GET', '/api/backups/schedule');+ expect(get.status).toBe(200);+ expect(get.body.schedule).toMatchObject({ enabled: true, time: '04:15', intervalDays: 2 });+ });++ it('creates a partial backup with the requested tables', async () => {+ const created = await request(app, 'POST', '/api/backups', { tables: ['models'] });+ expect(created.status).toBe(201);+ expect(created.body.backup.isFull).toBe(false);+ expect(created.body.backup.tables).toEqual(['models']);+ });++ it('prefixes scheduled backups with auto-', () => {+ const manual = createBackup(getDb(), { tables: [], source: 'manual', backupPath: '' });+ expect(manual.filename).toMatch(/^backup-.*\.sql$/);++ const scheduled = createBackup(getDb(), { tables: [], source: 'scheduled', backupPath: '' });+ expect(scheduled.filename).toMatch(/^auto-backup-.*\.sql$/);+ });++ it('never dumps the accounts, sessions or URL-token tables', async () => {+ const tables = await request(app, 'GET', '/api/backups/tables');+ for (const excluded of ['users', 'sessions', 'url_tokens']) {+ expect(tables.body.tables).not.toContain(excluded);+ }++ // The dashboard session used by this test is a live row in both tables.+ expect((getDb().prepare('SELECT COUNT(*) AS n FROM users').get() as { n: number }).n).toBeGreaterThan(0);+ expect((getDb().prepare('SELECT COUNT(*) AS n FROM sessions').get() as { n: number }).n).toBeGreaterThan(0);++ const created = await request(app, 'POST', '/api/backups', {});+ const sql = fs.readFileSync(dumpPath(created.body.backup.id), 'utf8');+ expect(sql).not.toMatch(/INSERT INTO "users"/);+ expect(sql).not.toMatch(/INSERT INTO "sessions"/);+ expect(sql).not.toMatch(/INSERT INTO "url_tokens"/);+ expect(sql).not.toMatch(/password_hash/);+ // Operator settings are still in there: that is what a backup is for.+ expect(sql).toMatch(/INSERT INTO "settings"/);++ // Asking for them explicitly does not smuggle them in either.+ const explicit = await request(app, 'POST', '/api/backups', { tables: ['users', 'models'] });+ expect(explicit.body.backup.tables).toEqual(['models']);+ });++ it('records the schema version and encryption-key fingerprint in the dump header', async () => {+ const created = await request(app, 'POST', '/api/backups', {});+ const sql = fs.readFileSync(dumpPath(created.body.backup.id), 'utf8');+ expect(sql).toMatch(/^-- format: 1$/m);+ expect(sql).toMatch(/^-- schema: \d+ migrations, latest \d{8}_\d{6}_[a-z0-9_]+\.ts$/m);+ expect(sql).toMatch(/^-- key-fingerprint: sha256:[0-9a-f]{16}$/m);+ });++ it('rolls a failed restore back and leaves the data intact', async () => {+ const created = await request(app, 'POST', '/api/backups', {});+ const file = dumpPath(created.body.backup.id);+ const before = modelCount();+ expect(before).toBeGreaterThan(0);++ // A dump that empties models and then hits an unknown column. Without a+ // transaction around the whole file the delete would stand.+ fs.writeFileSync(+ file,+ `${headerOf(fs.readFileSync(file, 'utf8'))}DELETE FROM "models";\nINSERT INTO "models" ("no_such_column") VALUES (1);\n`,+ 'utf8',+ );++ const restored = await request(app, 'POST', `/api/backups/${created.body.backup.id}/restore`);+ expect(restored.status).toBe(400);+ expect(restored.body.error.message).toMatch(/rolled back/i);+ expect(modelCount()).toBe(before);+ });++ it('refuses a dump written under a different encryption key', async () => {+ const created = await request(app, 'POST', '/api/backups', {});+ const file = dumpPath(created.body.backup.id);+ const sql = fs.readFileSync(file, 'utf8');+ fs.writeFileSync(file, sql.replace(/^-- key-fingerprint: .*$/m, '-- key-fingerprint: sha256:ffffffffffffffff'), 'utf8');++ const restored = await request(app, 'POST', `/api/backups/${created.body.backup.id}/restore`);+ expect(restored.status).toBe(409);+ expect(restored.body.error.message).toMatch(/ENCRYPTION_KEY/);+ expect(modelCount()).toBeGreaterThan(0);+ });++ it('refuses a dump taken at a different schema version', async () => {+ const created = await request(app, 'POST', '/api/backups', {});+ const file = dumpPath(created.body.backup.id);+ const sql = fs.readFileSync(file, 'utf8');+ fs.writeFileSync(file, sql.replace(/^-- schema: .*$/m, '-- schema: 3 migrations, latest 20240101_000001_ancient.ts'), 'utf8');++ const restored = await request(app, 'POST', `/api/backups/${created.body.backup.id}/restore`);+ expect(restored.status).toBe(409);+ expect(restored.body.error.message).toMatch(/schema version/);+ });++ it('refuses a hand-edited dump that writes to the accounts table', async () => {+ const created = await request(app, 'POST', '/api/backups', {});+ const file = dumpPath(created.body.backup.id);+ const sql = fs.readFileSync(file, 'utf8');+ fs.writeFileSync(file, `${sql}DELETE FROM "users";\n`, 'utf8');++ const restored = await request(app, 'POST', `/api/backups/${created.body.backup.id}/restore`);+ expect(restored.status).toBe(400);+ expect((getDb().prepare('SELECT COUNT(*) AS n FROM users').get() as { n: number }).n).toBeGreaterThan(0);+ });++ it('rejects a backup path outside the database directory', async () => {+ for (const backupPath of ['../escape', '/tmp/freeapi-escape', '../../etc']) {+ const put = await request(app, 'PUT', '/api/backups/schedule', {+ enabled: false,+ time: '03:00',+ intervalDays: 1,+ backupPath,+ });+ expect(put.status).toBe(400);+ expect(put.body.error.message).toMatch(/database directory/);+ }+ expect(fs.existsSync(path.resolve(dataDir, '../escape'))).toBe(false);++ // A directory under the data directory is accepted.+ const ok = await request(app, 'PUT', '/api/backups/schedule', {+ enabled: false,+ time: '03:00',+ intervalDays: 1,+ backupPath: 'nightly',+ });+ expect(ok.status).toBe(200);+ expect(fs.existsSync(path.join(dataDir, 'nightly'))).toBe(true);+ });++ it('takes only an integer id on the download route', async () => {+ const bad = await request(app, 'GET', '/api/backups/12abc/download');+ expect(bad.status).toBe(400);+ expect(bad.body.error.message).toBe('Invalid backup ID');+ });+});diff --git a/server/src/app.ts b/server/src/app.tsindex b9dad2ef..54b91c5f 100644--- a/server/src/app.ts+++ b/server/src/app.ts@@ -20,6 +20,7 @@ import { analyticsRouter } from './routes/analytics.js';import { healthRouter } from './routes/health.js';import { settingsRouter } from './routes/settings.js';import { premiumRouter } from './routes/premium.js';+import { backupsRouter } from './routes/backups.js';import { cacheRouter } from './routes/cache.js';import { compressionRouter } from './routes/compression.js';import { authRouter } from './routes/auth.js';@@ -246,6 +247,10 @@ export function createApp(config?: Config) {app.use('/api/health', requireAuth, healthRouter);app.use('/api/settings', requireAuth, settingsRouter);app.use('/api/premium', requireAuth, premiumRouter);+ // Database dumps and restores. Dashboard-session gated: the dump files carry+ // encrypted provider keys and every routing setting, so the unified /v1 key+ // must not open this surface.+ app.use('/api/backups', requireAuth, backupsRouter);app.use('/api/cache', requireAuth, cacheRouter);app.use('/api/compression', requireAuth, compressionRouter);app.use('/api/update', requireAuth, updateRouter);diff --git a/server/src/db/migrate/defaults.ts b/server/src/db/migrate/defaults.tsindex 6958df1f..5c493fa0 100644--- a/server/src/db/migrate/defaults.ts+++ b/server/src/db/migrate/defaults.ts@@ -24,6 +24,7 @@ import * as apiKeyProxy from '../migrations/20260810_000001_api_key_proxy.js';import * as playgroundConversations from '../migrations/20260820_000001_playground_conversations.js';import * as customModelTombstones from '../migrations/20260819_000001_custom_model_tombstones.js';import * as serverLogs from '../migrations/20260823_000001_server_logs.js';+import * as backupsTable from '../migrations/20260823_000002_backups_table.js';export interface MigrationModule {up(db: Db): void;@@ -60,6 +61,7 @@ export const API_KEY_PROXY_FILENAME = '20260810_000001_api_key_proxy.ts';export const PLAYGROUND_CONVERSATIONS_FILENAME = '20260820_000001_playground_conversations.ts';export const CUSTOM_MODEL_TOMBSTONES_FILENAME = '20260819_000001_custom_model_tombstones.ts';export const SERVER_LOGS_FILENAME = '20260823_000001_server_logs.ts';+export const BACKUPS_TABLE_FILENAME = '20260823_000002_backups_table.ts';export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [{ filename: LEGACY_BASELINE_FILENAME, module: legacyBaseline },@@ -87,4 +89,5 @@ export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [{ filename: CUSTOM_MODEL_TOMBSTONES_FILENAME, module: customModelTombstones },{ filename: PLAYGROUND_CONVERSATIONS_FILENAME, module: playgroundConversations },{ filename: SERVER_LOGS_FILENAME, module: serverLogs },+ { filename: BACKUPS_TABLE_FILENAME, module: backupsTable },];diff --git a/server/src/db/migrations/20260823_000002_backups_table.ts b/server/src/db/migrations/20260823_000002_backups_table.tsnew file mode 100644index 00000000..cca699f2--- /dev/null+++ b/server/src/db/migrations/20260823_000002_backups_table.ts@@ -0,0 +1,24 @@+import type { Db } from '../types.js';++/** Metadata index for the data-backup feature. Backup payloads live on disk+ * next to the database; this table is the paginated index. `filepath` records+ * the absolute location so download and restore survive a later change to the+ * configured backup directory. */+export function up(db: Db): void {+ db.exec(`+ CREATE TABLE IF NOT EXISTS backups (+ id INTEGER PRIMARY KEY AUTOINCREMENT,+ filename TEXT NOT NULL,+ filepath TEXT,+ filesize INTEGER NOT NULL,+ is_full INTEGER NOT NULL DEFAULT 1,+ source TEXT NOT NULL DEFAULT 'manual',+ created_at TEXT NOT NULL,+ tables_json TEXT NOT NULL DEFAULT '[]'+ )+ `);+}++export function down(db: Db): void {+ db.exec('DROP TABLE IF EXISTS backups');+}diff --git a/server/src/index.ts b/server/src/index.tsindex 91fe37d7..64dc2fe5 100644--- a/server/src/index.ts+++ b/server/src/index.ts@@ -12,6 +12,7 @@ import { NodeScheduler } from './lib/scheduler.js';import { loadConfig } from './lib/config.js';import { applyDeclarativeConfigFromEnv } from './services/declarative-config.js';import { restoreDbBackupIfNeeded, startDbBackupPump } from './lib/db-backup.js';+import { startBackupScheduler } from './services/backups.js';import { userCount } from './services/auth.js';import { generateSetupCode } from './lib/setup-code.js';import { warnOnEnvDrift } from './lib/env-drift.js';@@ -76,6 +77,7 @@ async function main() {startCatalogSync(scheduler);startCooldownProbe(scheduler);startDbBackupPump(getDb(), scheduler, config.dbPath ?? undefined);+ startBackupScheduler(scheduler);startCustomModelSync(getDb(), scheduler);// Post-sleep recovery: while the host was suspended (laptop lid, VMdiff --git a/server/src/lib/crypto.ts b/server/src/lib/crypto.tsindex db4c6738..0b579cb0 100644--- a/server/src/lib/crypto.ts+++ b/server/src/lib/crypto.ts@@ -159,6 +159,22 @@ function getEncryptionKey(): Buffer {return cachedKey;}+/**+ * A short, non-reversible identifier for the key currently in use.+ *+ * Database dumps record it in their header so a restore can tell, before it+ * touches a row, whether the api_keys ciphertext in the file was written under+ * this key. sha256 truncated to 64 bits: enough to catch a different key,+ * nowhere near enough to help recover the key itself, and safe to show in an+ * error message or write to a file an operator emails around.+ *+ * Returns null before initEncryptionKey() has run.+ */+export function encryptionKeyFingerprint(): string | null {+ if (!cachedKey) return null;+ return `sha256:${crypto.createHash('sha256').update(cachedKey).digest('hex').slice(0, 16)}`;+}+export function isEncryptionKeyInitialized(): boolean {return cachedKey !== null;}diff --git a/server/src/routes/backups.ts b/server/src/routes/backups.tsnew file mode 100644index 00000000..fec3a4f4--- /dev/null+++ b/server/src/routes/backups.ts@@ -0,0 +1,138 @@+import { Router } from 'express';+import type { Request, Response } from 'express';+import { z } from 'zod';+import { getDb } from '../db/index.js';+import {+ assertBackupPathAllowed,+ createBackup,+ deleteBackup,+ getBackupFile,+ listBackups,+ listTables,+ readBackupSchedule,+ restoreBackup,+ writeBackupSchedule,+ type BackupSchedule,+} from '../services/backups.js';++export const backupsRouter = Router();++const createSchema = z.object({+ tables: z.array(z.string().trim().min(1).max(200)).max(500).optional(),+}).strict();++const scheduleSchema = z.object({+ enabled: z.boolean(),+ time: z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, 'time must be HH:mm'),+ intervalDays: z.number().int().min(1).max(365),+ backupPath: z.string().max(2000),+}).strict();++function parseSchedule(body: unknown): { schedule?: BackupSchedule; error?: string } {+ const parsed = scheduleSchema.safeParse(body);+ if (!parsed.success) {+ return { error: parsed.error.errors.map((e) => e.message).join(', ') };+ }+ return { schedule: { ...parsed.data, backupPath: parsed.data.backupPath.trim() } };+}++/** Route params are strings; only a bare run of digits is a backup id. A+ * permissive parseInt would accept "12/../../etc" and quietly read 12. */+function parseId(raw: unknown): number | null {+ const value = String(raw ?? '');+ if (!/^\d+$/.test(value)) return null;+ const id = Number.parseInt(value, 10);+ return Number.isSafeInteger(id) ? id : null;+}++function fail(res: Response, err: unknown, fallbackStatus: number, fallbackMessage: string): void {+ const status = (err as { status?: number }).status ?? fallbackStatus;+ res.status(status).json({ error: { message: err instanceof Error ? err.message : fallbackMessage } });+}++backupsRouter.get('/tables', (_req: Request, res: Response) => {+ res.json({ tables: listTables(getDb()) });+});++backupsRouter.get('/schedule', (_req: Request, res: Response) => {+ res.json({ schedule: readBackupSchedule() });+});++backupsRouter.put('/schedule', (req: Request, res: Response) => {+ const { schedule, error } = parseSchedule(req.body);+ if (error || !schedule) {+ res.status(400).json({ error: { message: error ?? 'Invalid schedule' } });+ return;+ }+ try {+ // Reject a directory the writer would refuse later, while the operator is+ // still looking at the field they typed it into.+ assertBackupPathAllowed(getDb(), schedule.backupPath);+ } catch (err) {+ fail(res, err, 400, 'Invalid backup path');+ return;+ }+ res.json({ schedule: writeBackupSchedule(schedule) });+});++backupsRouter.get('/', (req: Request, res: Response) => {+ const page = Number.parseInt(String(req.query.page ?? '1'), 10) || 1;+ const pageSize = Number.parseInt(String(req.query.pageSize ?? '20'), 10) || 20;+ res.json(listBackups(getDb(), { page, pageSize }));+});++backupsRouter.post('/', (req: Request, res: Response) => {+ const parsed = createSchema.safeParse(req.body ?? {});+ if (!parsed.success) {+ res.status(400).json({ error: { message: parsed.error.errors.map((e) => e.message).join(', ') } });+ return;+ }+ try {+ const backup = createBackup(getDb(), { tables: parsed.data.tables ?? [], source: 'manual' });+ res.status(201).json({ backup });+ } catch (err) {+ fail(res, err, 500, 'Backup failed');+ }+});++backupsRouter.get('/:id/download', (req: Request, res: Response) => {+ const id = parseId(req.params.id);+ if (id === null) {+ res.status(400).json({ error: { message: 'Invalid backup ID' } });+ return;+ }+ try {+ const file = getBackupFile(getDb(), id);+ res.download(file.path, file.filename);+ } catch (err) {+ fail(res, err, 404, 'Download failed');+ }+});++backupsRouter.post('/:id/restore', (req: Request, res: Response) => {+ const id = parseId(req.params.id);+ if (id === null) {+ res.status(400).json({ error: { message: 'Invalid backup ID' } });+ return;+ }+ try {+ const { backup, snapshot } = restoreBackup(getDb(), id);+ res.json({ success: true, backup, snapshot });+ } catch (err) {+ fail(res, err, 400, 'Restore failed');+ }+});++backupsRouter.delete('/:id', (req: Request, res: Response) => {+ const id = parseId(req.params.id);+ if (id === null) {+ res.status(400).json({ error: { message: 'Invalid backup ID' } });+ return;+ }+ try {+ deleteBackup(getDb(), id);+ res.json({ success: true });+ } catch (err) {+ fail(res, err, 400, 'Delete failed');+ }+});diff --git a/server/src/services/backups.ts b/server/src/services/backups.tsnew file mode 100644index 00000000..8cfc4ddd--- /dev/null+++ b/server/src/services/backups.ts@@ -0,0 +1,545 @@+import crypto from 'node:crypto';+import fs from 'fs';+import path from 'path';+import { getDb, getDefaultDbPath, getSetting, setSetting } from '../db/index.js';+import type { Db } from '../db/types.js';+import { encryptionKeyFingerprint } from '../lib/crypto.js';+import { restrictDirToOwner, restrictToOwner } from '../lib/file-permissions.js';+import type { Scheduler } from '../lib/scheduler.js';++const SCHEDULE_SETTING = 'backup_schedule';+const LAST_RUN_SETTING = 'backup_last_run_day';++/** Bumped whenever the on-disk dump layout changes in a way an older restore+ * path would misread. Restore refuses anything it does not know. */+const DUMP_FORMAT = 1;++export type BackupSource = 'manual' | 'scheduled' | 'pre-restore';++export interface BackupSchedule {+ enabled: boolean;+ /** Local wall-clock time, HH:mm. */+ time: string;+ /** Minimum days between automatic backups. */+ intervalDays: number;+ /** Optional sub-directory of the database directory; '' means <db-dir>/backups. */+ backupPath: string;+}++export interface BackupMeta {+ id: number;+ filename: string;+ filesize: number;+ isFull: boolean;+ source: BackupSource;+ createdAt: string;+ tables: string[];+}++const DEFAULT_SCHEDULE: BackupSchedule = {+ enabled: false,+ time: '03:00',+ intervalDays: 1,+ backupPath: '',+};++function httpError(message: string, status: number): Error {+ return Object.assign(new Error(message), { status });+}++/* ------------------------------------------------------------------ */+/* Table selection */+/* ------------------------------------------------------------------ */++// Credentials and live login state. A dump is a file an operator downloads,+// mails to themselves and drops in cloud storage; it must not carry the+// password hashes and session tokens that authenticate the dashboard, and+// restoring one must not resurrect deleted accounts or revoked sessions (or+// log the current operator out mid-restore). `settings` is deliberately NOT+// here: routing strategy, the unified key and the proxy config are exactly+// what an operator expects a backup to bring back.+const EXCLUDED_TABLES = new Set(['users', 'sessions', 'url_tokens']);++/** `backups` is the on-disk backup index itself; dumping and restoring it+ * would wipe the metadata that tracks the files. `migrations` is the schema+ * ledger, which restore checks rather than overwrites. */+function isInternalTable(name: string): boolean {+ return name === 'migrations' || name === 'backups' || name.startsWith('sqlite_');+}++export function isExcludedTable(name: string): boolean {+ return EXCLUDED_TABLES.has(name);+}++function isBackupableTable(name: string): boolean {+ return !isInternalTable(name) && !isExcludedTable(name);+}++/** Every table a dump may contain, in a stable order. */+export function listTables(db: Db = getDb()): string[] {+ const rows = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name").all() as { name: string }[];+ return rows.map((row) => row.name).filter(isBackupableTable);+}++/* ------------------------------------------------------------------ */+/* Backup directory (confined to the database directory) */+/* ------------------------------------------------------------------ */++/** The directory that holds the database file. Dumps live beside the data they+ * came from — never relative to process.cwd(), which depends on how the server+ * happened to be launched and can sit anywhere on the disk. */+function dataDir(db: Db): string {+ const name = db.name;+ if (name && name !== ':memory:' && db.memory !== true) {+ return path.resolve(path.dirname(path.resolve(name)));+ }+ return path.resolve(path.dirname(path.resolve(getDefaultDbPath())));+}++function isInside(root: string, target: string): boolean {+ if (target === root) return true;+ return target.startsWith(root.endsWith(path.sep) ? root : root + path.sep);+}++/** Resolve (and create) the directory a dump is written to. `override` is+ * interpreted relative to the database directory and may not escape it:+ * an operator-supplied path is otherwise an arbitrary-write primitive, and+ * `..`, an absolute path or a symlink out of the tree would all take it+ * there. Both the lexical path and — once the directory exists — its real+ * path are checked, so a symlink planted inside the data directory does not+ * widen the hole. */+export function resolveBackupDir(db: Db, override?: string): string {+ const root = dataDir(db);+ const trimmed = override?.trim() ?? '';+ const dir = trimmed ? path.resolve(root, trimmed) : path.join(root, 'backups');+ if (!isInside(root, dir)) {+ throw httpError(`backupPath must stay inside the database directory (${root})`, 400);+ }++ fs.mkdirSync(dir, { recursive: true });+ restrictDirToOwner(dir);++ try {+ const realRoot = fs.realpathSync(root);+ const realDir = fs.realpathSync(dir);+ if (!isInside(realRoot, realDir)) {+ throw httpError(`backupPath resolves outside the database directory (${realRoot})`, 400);+ }+ } catch (err) {+ if ((err as { status?: number }).status === 400) throw err;+ // realpath is best-effort hardening; the lexical check above already ran.+ }++ return dir;+}++/** Validation hook for the schedule route: reject a path the writer would+ * refuse later, at the moment the operator types it. */+export function assertBackupPathAllowed(db: Db, backupPath: string): void {+ if (!backupPath.trim()) return;+ resolveBackupDir(db, backupPath);+}++/* ------------------------------------------------------------------ */+/* Schedule */+/* ------------------------------------------------------------------ */++export function readBackupSchedule(): BackupSchedule {+ const raw = getSetting(SCHEDULE_SETTING);+ if (!raw) return { ...DEFAULT_SCHEDULE };+ try {+ const parsed = JSON.parse(raw) as Partial<BackupSchedule>;+ return {+ enabled: parsed.enabled === true,+ time: typeof parsed.time === 'string' && /^\d{2}:\d{2}$/.test(parsed.time) ? parsed.time : DEFAULT_SCHEDULE.time,+ intervalDays: typeof parsed.intervalDays === 'number' && parsed.intervalDays >= 1 ? Math.floor(parsed.intervalDays) : DEFAULT_SCHEDULE.intervalDays,+ backupPath: typeof parsed.backupPath === 'string' ? parsed.backupPath : DEFAULT_SCHEDULE.backupPath,+ };+ } catch {+ return { ...DEFAULT_SCHEDULE };+ }+}++export function writeBackupSchedule(schedule: BackupSchedule): BackupSchedule {+ setSetting(SCHEDULE_SETTING, JSON.stringify(schedule));+ return schedule;+}++/* ------------------------------------------------------------------ */+/* Dump header */+/* ------------------------------------------------------------------ */++/** Identity of the schema a dump was taken against: the number of applied+ * migrations plus the latest filename. Restoring a dump into a database at a+ * different schema silently drops columns added since, or fails halfway; the+ * header lets restore refuse instead. */+export function schemaVersion(db: Db): string {+ const rows = db.prepare('SELECT filename FROM migrations ORDER BY filename').all() as { filename: string }[];+ const latest = rows.length > 0 ? rows[rows.length - 1].filename : '(none)';+ return `${rows.length} migrations, latest ${latest}`;+}++function currentKeyFingerprint(): string {+ return encryptionKeyFingerprint() ?? 'none';+}++interface DumpHeader {+ format: number;+ schema: string;+ keyFingerprint: string;+ tables: string[];+}++function renderHeader(db: Db, tables: string[], createdAt: string): string {+ return [+ '-- freellmapi database backup',+ `-- format: ${DUMP_FORMAT}`,+ `-- created: ${createdAt}`,+ `-- schema: ${schemaVersion(db)}`,+ `-- key-fingerprint: ${currentKeyFingerprint()}`,+ `-- tables: ${tables.join(', ')}`,+ '-- excluded by policy: ' + [...EXCLUDED_TABLES].join(', '),+ '',+ ].join('\n');+}++function readHeaderField(sql: string, field: string): string | null {+ const match = new RegExp(`^--\\s*${field}:\\s*(.*)$`, 'm').exec(sql);+ return match ? match[1].trim() : null;+}++function parseHeader(sql: string): DumpHeader {+ const format = Number.parseInt(readHeaderField(sql, 'format') ?? '', 10);+ const schema = readHeaderField(sql, 'schema');+ const keyFingerprint = readHeaderField(sql, 'key-fingerprint');+ const tablesLine = readHeaderField(sql, 'tables');+ if (!Number.isInteger(format) || schema === null || keyFingerprint === null) {+ throw httpError('This file is not a freellmapi backup (its header is missing or damaged).', 400);+ }+ return {+ format,+ schema,+ keyFingerprint,+ tables: (tablesLine ?? '').split(',').map((t) => t.trim()).filter((t) => t.length > 0),+ };+}++/* ------------------------------------------------------------------ */+/* SQLite dump */+/* ------------------------------------------------------------------ */++function sqliteEscape(value: unknown): string {+ if (value === null || value === undefined) return 'NULL';+ if (typeof value === 'number') return Number.isFinite(value) ? String(value) : 'NULL';+ if (typeof value === 'bigint') return value.toString();+ if (value instanceof Uint8Array) return `X'${Buffer.from(value).toString('hex')}'`;+ const s = String(value);+ return `'${s.replace(/'/g, "''")}'`;+}++function sqliteCreateTable(db: Db, table: string): string | null {+ const row = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) as { sql: string } | undefined;+ if (!row?.sql) return null;+ return `${row.sql.replace(/^CREATE TABLE/i, 'CREATE TABLE IF NOT EXISTS')};`;+}++function sqliteDumpTable(db: Db, table: string): string {+ const columns = (db.prepare(`PRAGMA table_info("${table}")`).all() as { name: string }[]).map((c) => c.name);+ const rows = db.prepare(`SELECT * FROM "${table}"`).all() as Record<string, unknown>[];+ const lines: string[] = [`DELETE FROM "${table}";`];+ if (rows.length > 0) {+ const columnList = columns.map((c) => `"${c}"`).join(', ');+ const valueRows = rows.map((row) => `(${columns.map((c) => sqliteEscape(row[c])).join(', ')})`);+ lines.push(`INSERT INTO "${table}" (${columnList}) VALUES\n ${valueRows.join(',\n ')};`);+ }+ return lines.join('\n');+}++// No BEGIN/COMMIT in the body: restore runs the whole file inside one+// db.transaction() so a failure halfway through rolls the database back to+// where it started, and a nested BEGIN would abort that.+function sqliteDump(db: Db, tables: string[], createdAt: string): string {+ const lines = [renderHeader(db, tables, createdAt)];+ for (const table of tables) {+ const create = sqliteCreateTable(db, table);+ if (create) lines.push(create);+ lines.push(sqliteDumpTable(db, table));+ }+ return `${lines.join('\n')}\n`;+}++/* ------------------------------------------------------------------ */+/* Backup creation */+/* ------------------------------------------------------------------ */++export function createBackup(+ db: Db,+ opts: { tables?: string[]; source?: BackupSource; backupPath?: string } = {},+): BackupMeta {+ const available = listTables(db);+ const requested = (opts.tables ?? []).filter((t) => available.includes(t));+ const isFull = requested.length === 0;+ const tables = isFull ? available : requested;++ if (tables.length === 0) {+ throw httpError('No tables to backup', 400);+ }++ const source: BackupSource = opts.source ?? 'manual';+ const now = new Date();+ const createdAt = now.toISOString();+ const stamp = now.toISOString().replace(/[-:]/g, '').replace(/\..+/, '').replace('T', '-');+ const prefix = source === 'scheduled' ? 'auto-backup' : source === 'pre-restore' ? 'pre-restore' : 'backup';+ const filename = `${prefix}-${stamp}-${crypto.randomBytes(3).toString('hex')}.sql`;++ const dir = resolveBackupDir(db, opts.backupPath ?? readBackupSchedule().backupPath);+ const filepath = path.join(dir, filename);++ fs.writeFileSync(filepath, sqliteDump(db, tables, createdAt), { encoding: 'utf8', mode: 0o600 });+ restrictToOwner(filepath);++ const filesize = fs.statSync(filepath).size;+ const result = db.prepare(+ 'INSERT INTO backups (filename, filepath, filesize, is_full, source, created_at, tables_json) VALUES (?, ?, ?, ?, ?, ?, ?)',+ ).run(filename, filepath, filesize, isFull ? 1 : 0, source, createdAt, JSON.stringify(tables));++ return { id: Number(result.lastInsertRowid), filename, filesize, isFull, source, createdAt, tables };+}++/* ------------------------------------------------------------------ */+/* Backup listing / download / delete / restore */+/* ------------------------------------------------------------------ */++interface BackupRow {+ id: number;+ filename: string;+ filepath: string | null;+ filesize: number;+ is_full: number;+ source: string;+ created_at: string;+ tables_json: string;+}++const SELECT_COLUMNS = 'id, filename, filepath, filesize, is_full, source, created_at, tables_json';++function toMeta(row: BackupRow): BackupMeta {+ let tables: string[] = [];+ try {+ const parsed = JSON.parse(row.tables_json) as unknown;+ if (Array.isArray(parsed)) tables = parsed.map(String);+ } catch {+ tables = [];+ }+ const source: BackupSource =+ row.source === 'scheduled' ? 'scheduled' : row.source === 'pre-restore' ? 'pre-restore' : 'manual';+ return {+ id: row.id,+ filename: row.filename,+ filesize: row.filesize,+ isFull: row.is_full === 1,+ source,+ createdAt: row.created_at,+ tables,+ };+}++export function listBackups(db: Db, opts: { page?: number; pageSize?: number } = {}): { items: BackupMeta[]; total: number } {+ const page = Math.max(1, opts.page ?? 1);+ const pageSize = Math.min(200, Math.max(1, opts.pageSize ?? 20));+ const total = (db.prepare('SELECT COUNT(*) AS n FROM backups').get() as { n: number }).n;+ const rows = db.prepare(`SELECT ${SELECT_COLUMNS} FROM backups ORDER BY id DESC LIMIT ? OFFSET ?`).all(pageSize, (page - 1) * pageSize) as BackupRow[];+ return { items: rows.map(toMeta), total };+}++function readBackupRecord(db: Db, id: number): BackupRow {+ const row = db.prepare(`SELECT ${SELECT_COLUMNS} FROM backups WHERE id = ?`).get(id) as BackupRow | undefined;+ if (!row) throw httpError('Backup not found', 404);+ return row;+}++/** The recorded path, re-checked against the data directory on every read: a+ * row written before the directory moved (or edited by hand) must not become+ * a way to read or delete a file elsewhere on the disk. */+function backupFilePath(db: Db, row: BackupRow): string {+ const root = dataDir(db);+ const candidate = row.filepath+ ? path.resolve(row.filepath)+ : path.join(resolveBackupDir(db, readBackupSchedule().backupPath), row.filename);+ if (!isInside(root, candidate)) {+ throw httpError('Backup file lies outside the database directory', 400);+ }+ return candidate;+}++export function getBackupFile(db: Db, id: number): { path: string; filename: string } {+ const row = readBackupRecord(db, id);+ const filePath = backupFilePath(db, row);+ if (!fs.existsSync(filePath)) {+ throw httpError('Backup file is missing', 404);+ }+ return { path: filePath, filename: row.filename };+}++export function deleteBackup(db: Db, id: number): void {+ const row = readBackupRecord(db, id);+ const filePath = backupFilePath(db, row);+ try {+ if (fs.existsSync(filePath)) fs.unlinkSync(filePath);+ } catch {+ // Metadata removal below still succeeds; a missing file is not fatal.+ }+ db.prepare('DELETE FROM backups WHERE id = ?').run(id);+}++/** Statements naming a table the dump policy excludes. A dump this server+ * wrote never contains them, so hitting this means the file was edited or+ * produced elsewhere — and restoring it would overwrite the operator's own+ * accounts and sessions. */+const EXCLUDED_STATEMENT_RE = new RegExp(+ `\\b(?:INSERT\\s+INTO|DELETE\\s+FROM|UPDATE|DROP\\s+TABLE)\\s+"?(?:${[...EXCLUDED_TABLES].join('|')})"?\\b`,+ 'i',+);++export interface RestoreResult {+ backup: BackupMeta;+ /** Dump of the pre-restore state, written before anything was changed. */+ snapshot: BackupMeta;+}++export function restoreBackup(db: Db, id: number): RestoreResult {+ const row = readBackupRecord(db, id);+ const filePath = backupFilePath(db, row);+ if (!fs.existsSync(filePath)) {+ throw httpError('Backup file is missing', 404);+ }++ const sql = fs.readFileSync(filePath, 'utf8');+ const header = parseHeader(sql);++ if (header.format !== DUMP_FORMAT) {+ throw httpError(`This backup uses dump format ${header.format}; this server reads format ${DUMP_FORMAT}.`, 409);+ }++ // A dump only carries rows, not the schema evolution around them. Restoring+ // one taken at a different migration state would drop columns added since,+ // or insert into columns that no longer exist.+ const current = schemaVersion(db);+ if (header.schema !== current) {+ throw httpError(+ `This backup was taken at a different schema version (backup: ${header.schema}; database: ${current}). ` ++ 'Restore it into a server running the matching version.',+ 409,+ );+ }++ // api_keys rows hold AES-GCM ciphertext keyed by ENCRYPTION_KEY. Restoring a+ // dump written under a different key would load provider keys nothing on this+ // server can decrypt — every request would then fail at send time, with the+ // real cause several layers away.+ const fingerprint = currentKeyFingerprint();+ if (header.keyFingerprint !== fingerprint) {+ throw httpError(+ `This backup was written under a different ENCRYPTION_KEY (backup: ${header.keyFingerprint}; server: ${fingerprint}). ` ++ 'The stored provider keys could not be decrypted. Restore it on the server that holds the original key.',+ 409,+ );+ }++ const offending = header.tables.find(isExcludedTable);+ if (offending || EXCLUDED_STATEMENT_RE.test(sql)) {+ throw httpError(+ `This backup writes to ${offending ?? 'an account or session table'}, which backups never include. Refusing to restore it.`,+ 400,+ );+ }++ // Written before a single row changes, so a restore that turns out to be the+ // wrong file is one restore away from being undone.+ const snapshot = createBackup(db, { source: 'pre-restore' });++ // SQLite ignores `PRAGMA foreign_keys` inside a transaction, so it has to be+ // flipped out here. The dump deletes and reloads whole tables, which+ // transiently breaks references between them.+ const foreignKeysWereOn = readForeignKeysPragma(db);+ try {+ db.pragma('foreign_keys = OFF');+ // One transaction for the whole file: better-sqlite3 rolls it back if any+ // statement throws, so a bad dump leaves the database exactly as it was.+ db.transaction(() => {+ db.exec(sql);+ })();+ } catch (err) {+ const reason = err instanceof Error ? err.message : String(err);+ throw httpError(+ `Restore failed and was rolled back; the database is unchanged (${reason}). ` ++ `A snapshot of the current data was saved as ${snapshot.filename}.`,+ 400,+ );+ } finally {+ if (foreignKeysWereOn) {+ try {+ db.pragma('foreign_keys = ON');+ } catch {+ // The restore itself already succeeded or rolled back; the pragma is+ // re-applied on the next connection either way.+ }+ }+ }++ return { backup: toMeta(row), snapshot };+}++function readForeignKeysPragma(db: Db): boolean {+ try {+ const result = db.pragma('foreign_keys') as unknown;+ if (Array.isArray(result) && result[0] && typeof result[0] === 'object') {+ return (result[0] as Record<string, unknown>).foreign_keys === 1;+ }+ if (typeof result === 'object' && result !== null) {+ return (result as Record<string, unknown>).foreign_keys === 1;+ }+ } catch {+ // Drivers without pragma introspection: assume it was on, which is the+ // stricter of the two states to put back.+ }+ return true;+}++/* ------------------------------------------------------------------ */+/* Auto-backup scheduler */+/* ------------------------------------------------------------------ */++export function startBackupScheduler(scheduler: Scheduler): () => void {+ let lastRunDay: string | null = getSetting(LAST_RUN_SETTING) ?? null;++ const tick = (): void => {+ const schedule = readBackupSchedule();+ if (!schedule.enabled) return;++ const now = new Date();+ const hhmm = `${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;+ if (hhmm < schedule.time) return;++ const today = now.toISOString().slice(0, 10);+ if (lastRunDay === today) return;++ const intervalDays = Math.max(1, schedule.intervalDays);+ if (lastRunDay) {+ const daysSince = Math.floor((Date.parse(today) - Date.parse(lastRunDay)) / 86_400_000);+ if (daysSince < intervalDays) return;+ }++ lastRunDay = today;+ setSetting(LAST_RUN_SETTING, today);+ try {+ createBackup(getDb(), { tables: [], source: 'scheduled', backupPath: schedule.backupPath });+ } catch (err) {+ console.error('[backups] scheduled backup failed:', err);+ }+ };++ const stop = scheduler.every(60_000, tick);+ tick();+ return stop;+}