mirror of
https://github.com/nicotsx/zerobyte.git
synced 2025-12-10 12:10:51 +01:00
refactor(backups): tag snapshots by backup id and run forget by grouping first by tags
This commit is contained in:
@@ -143,9 +143,9 @@ export const createBackupScheduleDto = describeRoute({
|
||||
* Update a backup schedule
|
||||
*/
|
||||
export const updateBackupScheduleBody = type({
|
||||
repositoryId: "string?",
|
||||
repositoryId: "string",
|
||||
enabled: "boolean?",
|
||||
cronExpression: "string?",
|
||||
cronExpression: "string",
|
||||
retentionPolicy: retentionPolicySchema.optional(),
|
||||
excludePatterns: "string[]?",
|
||||
includePatterns: "string[]?",
|
||||
@@ -174,42 +174,6 @@ export const updateBackupScheduleDto = describeRoute({
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Upsert a backup schedule (create or update)
|
||||
*/
|
||||
export const upsertBackupScheduleBody = type({
|
||||
volumeId: "number",
|
||||
repositoryId: "string",
|
||||
enabled: "boolean",
|
||||
cronExpression: "string",
|
||||
retentionPolicy: retentionPolicySchema.optional(),
|
||||
excludePatterns: "string[]?",
|
||||
includePatterns: "string[]?",
|
||||
tags: "string[]?",
|
||||
});
|
||||
|
||||
export type UpsertBackupScheduleBody = typeof upsertBackupScheduleBody.infer;
|
||||
|
||||
export const upsertBackupScheduleResponse = backupScheduleSchema.omit("volume", "repository");
|
||||
|
||||
export type UpsertBackupScheduleDto = typeof upsertBackupScheduleResponse.infer;
|
||||
|
||||
export const upsertBackupScheduleDto = describeRoute({
|
||||
description: "Create or update a backup schedule for a volume",
|
||||
operationId: "upsertBackupSchedule",
|
||||
tags: ["Backups"],
|
||||
responses: {
|
||||
200: {
|
||||
description: "Backup schedule upserted successfully",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: resolver(upsertBackupScheduleResponse),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Delete a backup schedule
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user