package components import ( "context" "time" ) // BackupFile represents a database backup file type BackupFile struct { Name string Size string Created time.Time FullPath string } // AdminDatabaseTools renders the database tools page with backup and restore functionality templ AdminDatabaseTools(ctx context.Context, backups []BackupFile) { @LayoutWithContext("Database Tools", ctx) {

Database Tools

Optimize Database

Vacuum the database to reclaim space and optimize performance.

Clear Job History

Remove old job history records to free up database space.

Export Configuration

Export system configurations and jobs for backup or migration.

Database Backups

Refresh
if len(backups) == 0 { } else { for _, backup := range backups { } }
Backup Name Size Created Actions
No backups found. Create your first backup to get started.
{ backup.Name } { backup.Size } { backup.Created.Format("2006-01-02 15:04:05") }

Restore from Backup File

Important Safety Information

  • Always create a backup before making significant changes
  • Restoring a backup will overwrite all current data
  • Database optimization may take time for large databases
  • Clear job history operations cannot be undone
} }