Skip to content

feat: 💾 New tmpo backup [create | delete | list | restore] for easy saving and restoration of your entire database#117

Merged
DylanDevelops merged 8 commits intomainfrom
ravel/tmpo-backup
Apr 30, 2026
Merged

feat: 💾 New tmpo backup [create | delete | list | restore] for easy saving and restoration of your entire database#117
DylanDevelops merged 8 commits intomainfrom
ravel/tmpo-backup

Conversation

@DylanDevelops
Copy link
Copy Markdown
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #115

Description

This pull request introduces a comprehensive backup and restore feature to the application, allowing users to create, list, restore, and delete database backups via new CLI commands. It adds robust backup management logic, integrates backup commands into the CLI, and provides thorough test coverage for the new functionality.

Backup/Restore Feature Implementation:

  • Introduced a new internal/storage/backup.go module with functions for creating, listing, restoring, and versioning backups, including a BackupInfo struct and schema version tracking. [1] [2]
  • Added new CLI commands under cmd/backups/ for create, list, restore, and delete operations, each with user-friendly prompts and error handling. [1] [2] [3] [4] [5]
  • Integrated the backup command group into the root CLI so users can access backup functionality directly. [1] [2]

Testing and Reliability:

  • Added internal/storage/backup_test.go with extensive tests for backup directory logic, schema versioning, backup creation, restoration, and file filtering to ensure reliability and correctness.

Supporting Changes:

  • Refactored the database initialization logic to factor out the tmpo directory calculation into a reusable getTmpoDir function, supporting both normal and dev environments.
  • Added a new backup emoji constant to the UI for consistent messaging in backup-related outputs.

These changes provide end-to-end support for safe database backup and restoration, improving user confidence and data safety.

@DylanDevelops DylanDevelops changed the title add: 💾 New tmpo backup [create | delete | list | restore] for easy saving and restoration of your entire database feat: 💾 New tmpo backup [create | delete | list | restore] for easy saving and restoration of your entire database Apr 30, 2026
@DylanDevelops DylanDevelops merged commit 71369e9 into main Apr 30, 2026
5 checks passed
@DylanDevelops DylanDevelops deleted the ravel/tmpo-backup branch April 30, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backup/Restore System

1 participant