- {backup.databaseType === "postgres" && (
-
- )}
- {backup.databaseType === "mysql" && (
-
- )}
- {backup.databaseType === "mariadb" && (
-
- )}
- {backup.databaseType === "mongo" && (
-
- )}
-
+ {postgres?.backups.map((backup) => {
+ const orderedDeployments = backup.deployments.sort(
+ (a, b) =>
+ new Date(b.createdAt).getTime() -
+ new Date(a.createdAt).getTime(),
+ );
+
+ const serverId =
+ "serverId" in postgres ? postgres.serverId : undefined;
+
+ return (
+
+
+
+
{backup.backupType === "compose" && (
-
-
- {backup.serviceName}
-
-
- {backup.databaseType}
-
+
+ {backup.databaseType === "postgres" && (
+
+ )}
+ {backup.databaseType === "mysql" && (
+
+ )}
+ {backup.databaseType === "mariadb" && (
+
+ )}
+ {backup.databaseType === "mongo" && (
+
+ )}
)}
-
-
-
- {backup.enabled ? "Active" : "Inactive"}
+
+ {backup.backupType === "compose" && (
+
+
+ {backup.serviceName}
+
+
+ {backup.databaseType}
+
+
+ )}
+
+
+
+ {backup.enabled ? "Active" : "Inactive"}
+
+
+
+
+
+
+
+
+ Destination
+
+ {backup.destination.name}
+
+
+
+
+
+ Database
+
+
+ {backup.database}
+
+
+
+
+
+ Schedule
+
+
+ {backup.schedule}
+
+
+
+
+
+ Prefix Storage
+
+
+ {backup.prefix}
+
+
+
+
+
+ Keep Latest
+
+
+ {backup.keepLatestCount || "All"}
+
-
-
-
- Destination
-
-
- {backup.destination.name}
-
-
+
+
+
+
+
+
+
+
+
+
+ Run Manual Backup
+
+
+
-
-
- Database
-
-
- {backup.database}
-
-
-
-
-
- Schedule
-
-
- {backup.schedule}
-
-
-
-
-
- Prefix Storage
-
-
- {backup.prefix}
-
-
-
-
-
- Keep Latest
-
-
- {backup.keepLatestCount || "All"}
-
-
+
+
{
+ await deleteBackup({
+ backupId: backup.backupId,
+ })
+ .then(() => {
+ refetch();
+ toast.success(
+ "Backup deleted successfully",
+ );
+ })
+ .catch(() => {
+ toast.error("Error deleting backup");
+ });
+ }}
+ >
+
+
-
-
-
-
-
-
-
-
-
-
- Run Manual Backup
-
-
-
-
-
{
- await deleteBackup({
- backupId: backup.backupId,
- })
- .then(() => {
- refetch();
- toast.success("Backup deleted successfully");
- })
- .catch(() => {
- toast.error("Error deleting backup");
- });
- }}
- >
-
-
-
-
- ))}
+ );
+ })}
)}
diff --git a/packages/server/src/utils/backups/compose.ts b/packages/server/src/utils/backups/compose.ts
index 6131f2a4..76fd43a6 100644
--- a/packages/server/src/utils/backups/compose.ts
+++ b/packages/server/src/utils/backups/compose.ts
@@ -33,6 +33,7 @@ export const runComposeBackup = async (
title: "Compose Backup",
description: "Compose Backup",
});
+
try {
const rcloneFlags = getS3Credentials(destination);
const rcloneDestination = `:s3:${destination.bucket}/${bucketDestination}`;
@@ -77,7 +78,8 @@ export const runComposeBackup = async (
compose.serverId,
`
set -e;
- Running command.
+ echo "Running command." >> ${deployment.logPath};
+ export RCLONE_LOG_LEVEL=DEBUG;
${backupCommand} | ${rcloneCommand} >> ${deployment.logPath} 2>> ${deployment.logPath} || {
echo "❌ Command failed" >> ${deployment.logPath};
exit 1;