PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FIX (backups): Fix downloading file from S3
Rostislav Dugin6ccf52bf6b9d
diff --git a/backend/internal/features/backups/backups/service.go b/backend/internal/features/backups/backups/service.goindex f00ff221..cbb0aa17 100644--- a/backend/internal/features/backups/backups/service.go+++ b/backend/internal/features/backups/backups/service.go@@ -332,7 +332,12 @@ func (s *BackupService) GetBackupFile(return nil, errors.New("user does not have access to this backup")}- return backup.Storage.GetFile(backup.ID)+ storage, err := s.storageService.GetStorageByID(backup.StorageID)+ if err != nil {+ return nil, err+ }++ return storage.GetFile(backup.ID)}func (s *BackupService) deleteBackup(backup *Backup) error {diff --git a/frontend/src/features/backups/ui/BackupsComponent.tsx b/frontend/src/features/backups/ui/BackupsComponent.tsxindex 88385b1b..5ae8e017 100644--- a/frontend/src/features/backups/ui/BackupsComponent.tsx+++ b/frontend/src/features/backups/ui/BackupsComponent.tsx@@ -282,7 +282,7 @@ export const BackupsComponent = ({ database }: Props) => {return (<div className="flex gap-2 text-lg">{record.status === BackupStatus.COMPLETED && (- <div>+ <div className="flex gap-2">{deletingBackupId === record.id ? (<SyncOutlined spin />) : (@@ -298,7 +298,7 @@ export const BackupsComponent = ({ database }: Props) => {/></Tooltip>- <Tooltip className="ml-3" title="Restore from backup">+ <Tooltip title="Restore from backup"><CloudUploadOutlinedclassName="cursor-pointer"onClick={() => {@@ -310,12 +310,9 @@ export const BackupsComponent = ({ database }: Props) => {/></Tooltip>- <Tooltip- className="ml-3"- title="Download backup file. It can be restored manually via pg_restore (from custom format)"- >+ <Tooltip title="Download backup file. It can be restored manually via pg_restore (from custom format)">{downloadingBackupId === record.id ? (- <SyncOutlined spin />+ <SyncOutlined spin style={{ color: '#0d6efd' }} />) : (<DownloadOutlinedclassName="cursor-pointer"