Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Chore/add backup warning (#26704)

Terry Sutton4ea0698cf3ce
diff --git a/apps/studio/components/interfaces/Database/Backups/BackupsList.tsx b/apps/studio/components/interfaces/Database/Backups/BackupsList.tsx
index cdf5084a0f8..e099ca8e7d3 100644
--- a/apps/studio/components/interfaces/Database/Backups/BackupsList.tsx
+++ b/apps/studio/components/interfaces/Database/Backups/BackupsList.tsx
@@ -4,7 +4,7 @@ import dayjs from 'dayjs'
import { useRouter } from 'next/router'
import { useState } from 'react'
import toast from 'react-hot-toast'
-import { IconAlertCircle, IconClock, Modal } from 'ui'
+import { IconAlertCircle, IconClock, AlertDescription_Shadcn_, Alert_Shadcn_ } from 'ui'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
@@ -18,6 +18,7 @@ import { useCheckPermissions, useSelectedOrganization } from 'hooks'
import { PROJECT_STATUS } from 'lib/constants'
import BackupItem from './BackupItem'
import BackupsEmpty from './BackupsEmpty'
+import BackupsStorageAlert from './BackupsStorageAlert'
const BackupsList = () => {
const router = useRouter()
@@ -88,6 +89,7 @@ const BackupsList = () => {
title="You need additional permissions to trigger a scheduled backup"
/>
)}
+ <BackupsStorageAlert />
<Panel>
{sortedBackups?.map((x, i: number) => {
return (
diff --git a/apps/studio/components/interfaces/Database/Backups/BackupsStorageAlert.tsx b/apps/studio/components/interfaces/Database/Backups/BackupsStorageAlert.tsx
new file mode 100644
index 00000000000..a6e677ab516
--- /dev/null
+++ b/apps/studio/components/interfaces/Database/Backups/BackupsStorageAlert.tsx
@@ -0,0 +1,17 @@
+import { AlertDescription_Shadcn_, Alert_Shadcn_ } from 'ui'
+import { WarningIcon } from 'ui-patterns/Icons/StatusIcons'
+
+const BackupsStorageAlert = () => {
+ return (
+ <Alert_Shadcn_ variant="default">
+ <WarningIcon />
+ <AlertDescription_Shadcn_>
+ Database backups do not include objects stored via the Storage API, as the database only
+ includes metadata about these objects. Restoring an old backup does not restore objects that
+ have been deleted since then.
+ </AlertDescription_Shadcn_>
+ </Alert_Shadcn_>
+ )
+}
+
+export default BackupsStorageAlert
diff --git a/apps/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx b/apps/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
index befe3e3f0ed..a396ea0786d 100644
--- a/apps/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
+++ b/apps/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
@@ -38,6 +38,7 @@ import {
import PITRStatus from './PITRStatus'
import TimeInput from './TimeInput'
import { TimezoneSelection } from './TimezoneSelection'
+import BackupsStorageAlert from '../BackupsStorageAlert'
const PITRSelection = () => {
const router = useRouter()
@@ -138,6 +139,7 @@ const PITRSelection = () => {
title="Restore your database from a backup"
description="Database changes are watched and recorded, so that you can restore your database to any point in time"
/>
+ <BackupsStorageAlert />
{hasNoBackupsAvailable ? (
<BackupsEmpty />
) : (