"use client" import { FormError } from "@/components/forms/error" import { Button } from "@/components/ui/button" import { Card } from "@/components/ui/card" import { Download, Loader2 } from "lucide-react" import Link from "next/link" import { useActionState } from "react" import { restoreBackupAction } from "./actions" export default function BackupSettingsPage() { const [restoreState, restoreBackup, restorePending] = useActionState(restoreBackupAction, null) return (

Download backup

Inside the archive you will find all the uploaded files, as well as JSON files for transactions, categories, projects, fields, currencies, and settings. You can view, edit or migrate your data to another service.

Restore from a backup

⚠️ This action is irreversible. Restoring from a backup will delete all existing data from your current database and remove all uploaded files. Be careful and make a backup first!

{restoreState?.error && {restoreState.error}}
{restoreState?.success && (

Backup restored successfully

You can now continue using the app. Import stats:

)}
) }