A cross-platform desktop application built with Tauri (Rust + React) for automated database backups and restoration.
- Automated Backups: Schedule backups using cron expressions
- PostgreSQL Support: Full backup and restore capabilities for PostgreSQL databases
- Secure Credentials: Passwords stored in OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service)
- Compressed Archives: Backups stored as .tar.gz files to save space
- Easy Restoration: Browse backups and restore with a few clicks
- Project Management: Organize multiple database backup projects
- Workspace Organization: All backups stored in a configurable workspace directory
- Node.js (v16 or higher)
- Rust (latest stable)
- PostgreSQL Client Tools:
pg_dump,pg_restore, andpsqlmust be installed and available in PATH
macOS:
brew install postgresqlLinux (Ubuntu/Debian):
sudo apt-get install postgresql-clientWindows: Download and install PostgreSQL from postgresql.org
- Clone the repository:
cd autobackup-app- Install dependencies:
npm install- Build the application:
npm run tauri buildThe built application will be in src-tauri/target/release/bundle/
Run in development mode:
npm run tauri dev- Configure your workspace directory where backups will be stored
- Click "Continue" to proceed
- Click "+ New Project"
- Fill in the project details:
- Project Name: Unique identifier for this backup project
- Database Type: PostgreSQL (more types coming soon)
- Host: Database server hostname or IP
- Port: Database port (default: 5432)
- Database Name: Name of the database to backup
- Username: Database user
- Password: Database password (stored securely in OS keychain)
- Schedule: Optional cron expression (e.g.,
0 2 * * *for daily at 2 AM)
- Click "Test Connection" to verify credentials
- Click "Create Project"
- From the Projects list, click "Backup Now" for any project
- Wait for the backup to complete
- Backup file will be saved as
{project-name}_{timestamp}.tar.gz
- Click "View Backups" for a project
- See all available backups with filename, size, and creation date
- In the Backups view, click "Restore" for any backup
- Choose restore mode:
- Replace: Drop existing database and restore (requires confirmation)
- New Database: Create a new database with specified name
- Configure target database connection (can be different from source)
- Click "Restore"
Backups with a schedule will run automatically in the background according to the cron expression.
Common Cron Expressions:
0 2 * * *- Daily at 2:00 AM0 */6 * * *- Every 6 hours0 0 * * 0- Weekly on Sunday at midnight0 3 * * 1-5- Weekdays at 3:00 AM
autobackup-app/
├── src/ # React frontend
│ ├── components/ # UI components
│ ├── api.ts # Tauri API bindings
│ └── App.tsx # Main application
├── src-tauri/ # Rust backend
│ └── src/
│ ├── modules/ # Core modules
│ │ ├── config.rs # Configuration management
│ │ ├── project.rs # Project data structures
│ │ ├── backup.rs # Backup operations
│ │ ├── restore.rs # Restore operations
│ │ ├── credentials.rs # Keychain integration
│ │ └── scheduler.rs # Cron scheduling
│ └── lib.rs # Tauri commands
└── .sisyphus/
└── plans/
└── autobackup-prd.md # Product Requirements Document
- Configuration:
~/.autobackup/config.json - Project Metadata:
{workspace}/.autobackup/projects.json - Backups:
{workspace}/{project-name}/backups/ - Credentials: OS keychain (secure storage)
Ensure PostgreSQL client tools are installed and in your PATH:
which pg_dump # macOS/Linux
where pg_dump # Windows- Verify database is running and accessible
- Check firewall settings
- Confirm credentials are correct
- Test connection using
psqlcommand line
- Ensure sufficient disk space
- Check database user has necessary permissions
- Review error message for specific issue
- Verify target database exists (or use "New Database" mode)
- Ensure user has CREATE DATABASE permission for new database mode
- Check backup file is not corrupted
- MySQL/MariaDB support
- MongoDB support
- SQLite support
- Backup retention policies
- Remote storage (S3, FTP)
- Backup encryption
- Email notifications
- Backup verification/testing
MIT