mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-08 15:35:23 +02:00
feat: add runVolumeBackup functionality and update volume backup paths
- Implemented the runVolumeBackup function to facilitate manual execution of volume backups, enhancing user control over backup processes. - Updated various components to utilize the new VOLUME_BACKUPS_PATH for improved organization and clarity in backup file management. - Enhanced error handling in the runManually mutation to ensure robust execution and logging of backup operations.
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
updateVolumeBackup,
|
||||
removeVolumeBackup,
|
||||
createVolumeBackup,
|
||||
runVolumeBackup,
|
||||
} from "@dokploy/server";
|
||||
import {
|
||||
createVolumeBackupSchema,
|
||||
@@ -79,7 +80,12 @@ export const volumeBackupsRouter = createTRPCRouter({
|
||||
|
||||
runManually: protectedProcedure
|
||||
.input(z.object({ volumeBackupId: z.string().min(1) }))
|
||||
.mutation(async () => {
|
||||
// return await runVolumeBackupManually(input.volumeBackupId);
|
||||
.mutation(async ({ input }) => {
|
||||
try {
|
||||
return await runVolumeBackup(input.volumeBackupId);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user