fix: refine volume backup logic and enhance user feedback

- Updated HandleVolumeBackups to conditionally enable mount retrieval based on volumeBackupType, improving accuracy in fetching mounts.
- Enhanced backupVolume function to provide user feedback upon starting the compose container, ensuring better clarity during operations.
This commit is contained in:
Mauricio Siu
2025-07-02 00:09:07 -06:00
parent b272f01a18
commit 7726c8db21
2 changed files with 4 additions and 2 deletions
@@ -134,7 +134,7 @@ export const HandleVolumeBackups = ({
const { data: mounts } = api.mounts.allNamedByApplicationId.useQuery( const { data: mounts } = api.mounts.allNamedByApplicationId.useQuery(
{ applicationId: id || "" }, { applicationId: id || "" },
{ enabled: !!id }, { enabled: !!id && volumeBackupType === "application" },
); );
const { const {
@@ -113,7 +113,9 @@ const backupVolume = async (
docker stop $ID`; docker stop $ID`;
startCommand = ` startCommand = `
echo "Starting compose container" echo "Starting compose container"
docker start $ID`; docker start $ID
echo "Compose container started"
`;
} }
return ` return `
${stopCommand} ${stopCommand}