diff --git a/studio/components/interfaces/Database/Backups/BackupsList.tsx b/studio/components/interfaces/Database/Backups/BackupsList.tsx index b444a8e913d..59e94d83ed1 100644 --- a/studio/components/interfaces/Database/Backups/BackupsList.tsx +++ b/studio/components/interfaces/Database/Backups/BackupsList.tsx @@ -23,6 +23,8 @@ const BackupsList: FC = ({}) => { 'queue_job.restore.prepare' ) + const isPitrEnabled = backups?.configuration?.walg_enabled + if (backups.isLoading) return if (backups.error) return @@ -43,7 +45,11 @@ const BackupsList: FC = ({}) => { return (
{!sortedBackups?.length && tierKey !== 'FREE' ? ( - + !isPitrEnabled ? ( + + ) : ( + <> + ) ) : ( <> {!canTriggerScheduledBackups && ( diff --git a/studio/pages/project/[ref]/database/backups/scheduled.tsx b/studio/pages/project/[ref]/database/backups/scheduled.tsx index 71694a0c630..86506719679 100644 --- a/studio/pages/project/[ref]/database/backups/scheduled.tsx +++ b/studio/pages/project/[ref]/database/backups/scheduled.tsx @@ -1,6 +1,6 @@ import { useRouter } from 'next/router' import { observer } from 'mobx-react-lite' -import { Tabs } from 'ui' +import { IconAlertCircle, IconHelpCircle, IconInfo, IconMessageCircle, Tabs } from 'ui' import { PermissionAction } from '@supabase/shared-types/out/constants' import { NextPageWithLayout } from 'types' @@ -9,12 +9,15 @@ import { DatabaseLayout } from 'components/layouts' import { BackupsList } from 'components/interfaces/Database' import NoPermission from 'components/ui/NoPermission' import { FormsContainer } from 'components/ui/Forms' +import InformationBox from 'components/ui/InformationBox' const DatabaseScheduledBackups: NextPageWithLayout = () => { - const { ui } = useStore() + const { ui, backups } = useStore() const router = useRouter() const ref = ui.selectedProject?.ref + const isPitrEnabled = backups?.configuration?.walg_enabled + const canReadScheduledBackups = checkPermissions(PermissionAction.READ, 'back_ups') return ( @@ -35,10 +38,35 @@ const DatabaseScheduledBackups: NextPageWithLayout = () => {
-

- Projects are backed up daily around midnight of your project's region and can be - restored at any time. -

+ {!isPitrEnabled && ( +

+ Projects are backed up daily around midnight of your project's region and can be + restored at any time. +

+ )} + + {isPitrEnabled && ( + } + title="Point-In-Time-Recovery (PITR) enabled" + description={ +
+ Your project uses PITR and full daily backups are no longer taken. They're not + needed, as PITR supports a superset of functionality, in terms of the granular + recovery that can be performed.{' '} + + Learn more + +
+ } + /> + )} + {canReadScheduledBackups ? ( ) : (