feat(backup): add MinIO snapshot backups via CLI and scheduler
This commit is contained in:
@@ -672,6 +672,22 @@ const sessionsSchema = z.object({
|
||||
ttl: z.string().default('30d'),
|
||||
}).default({});
|
||||
|
||||
const backupSchema = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
interval: z.string().default('24h'),
|
||||
local_dir: z.string().default('~/.local/share/flynn/backups'),
|
||||
include_vectors: z.boolean().default(true),
|
||||
minio: z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
endpoint: z.string().optional(),
|
||||
access_key: z.string().optional(),
|
||||
secret_key: z.string().optional(),
|
||||
bucket: z.string().optional(),
|
||||
prefix: z.string().default('flynn'),
|
||||
secure: z.boolean().default(true),
|
||||
}).default({}),
|
||||
}).default({});
|
||||
|
||||
const historyIndexSchema = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
max_keywords: z.number().min(1).max(20).default(8),
|
||||
@@ -736,6 +752,7 @@ export const configSchema = z.object({
|
||||
routing_policy: routingPolicySchema,
|
||||
history_index: historyIndexSchema,
|
||||
sessions: sessionsSchema,
|
||||
backup: backupSchema,
|
||||
pairing: pairingSchema,
|
||||
});
|
||||
|
||||
@@ -777,6 +794,7 @@ export type RoutingPolicyConfig = z.infer<typeof routingPolicySchema>;
|
||||
export type HistoryIndexConfig = z.infer<typeof historyIndexSchema>;
|
||||
export type ServerConfig = z.infer<typeof serverSchema>;
|
||||
export type SessionsConfig = z.infer<typeof sessionsSchema>;
|
||||
export type BackupConfig = z.infer<typeof backupSchema>;
|
||||
export type ThinkingConfig = z.infer<typeof thinkingSchema>;
|
||||
export type HeartbeatConfig = z.infer<typeof heartbeatSchema>;
|
||||
export type HeartbeatCheck = z.infer<typeof heartbeatCheckSchema>;
|
||||
|
||||
Reference in New Issue
Block a user