Backups Manager is a cross-platform (Windows, macOS, Ubuntu) TypeScript utility designed to automate reliable file backups using full and differential strategies. It intelligently compares file states using size and modification timestamps, enabling efficient synchronization across multiple destinations. The tool provides real-time progress feedback, structured logging, and detailed reporting to a desktop-generated report file.
Built in April 2026, it emphasizes automation, scalability, and robust data protection for developers managing complex backup workflows.
- π¦ Multi-Mode Backups (Full and Differential)
- π Intelligent Synchronization with size/timestamp comparison
- π« Advanced Exclusions with glob patterns
- ποΈ Multi-Session Processing for batch backups
- π Real-Time Monitoring with spinners and progress
- π Automated Reporting with desktop report files
- π― Type Safety with strict TypeScript
- π§ͺ Comprehensive Unit Testing with Vitest
- π Zod Validation for configuration integrity
- ποΈ Clean Code Architecture with separation of concerns
- π₯οΈ Cross-Platform Compatibility (Windows, macOS, Linux)
- β¨οΈ Interactive CLI with Inquirer
- π€ Automation Ready with CLI flags
- π Watch Mode for rapid development
- π Visual Testing with Vitest UI
- Multi-Mode Backups: Support for both Full (complete copy) and Differential (changes only) backup strategies.
- Intelligent Synchronization: Uses size and modification time comparison via
dir-comparefor efficient diffing. - Advanced Exclusions: Flexible filtering using exact names and glob patterns (e.g.,
node_modules,*.log,.git). - Multi-Session Processing: Batch process multiple source-to-target backup tasks in a single run.
- Real-Time Monitoring: Live console progress with spinners, percentage indicators, and time elapsed tracking.
- Automated Reporting: Generates comprehensive
BACKUP_REPORT.txton the Desktop with session summaries and error details.
- Type Safety: Built with strict TypeScript for robust development and maintenance.
- Unit Testing: Comprehensive test suite using Vitest for all core modules (diff, full, utils, validators).
- Zod Validation: Robust settings and session validation to ensure configuration integrity.
- Clean Code Architecture: Domain-driven organization with clear separation of concerns.
- Cross-Platform Compatibility: Tested and verified on Windows, macOS, and Linux environments.
- Interactive CLI: User-friendly menu system built with Inquirer for manual operations.
- Automation Ready: CLI flags (
--auto,--operation) for easy integration with Task Scheduler or Cron jobs. - Watch Mode: Live development environment with
tsx watchfor rapid iteration. - Visual Testing: Support for Vitest UI to visually inspect test results and coverage.
- Pre-configured Environment: Comprehensive
.vscodesettings and Prettier/ESLint configurations included.
- Node.js: Version 18 or higher.
- npm or pnpm: For dependency management.
- Clone the repository:
git clone https://github.com/orassayag/backups-manager.git
cd backups-manager- Install dependencies:
npm install-
Configure your sessions: Edit
src/sessions/sessions.jsonto define your backup sources and targets. -
Adjust settings: Edit
src/settings/settings.tsto configure exclusions and automation.
To run the tool interactively and select your backup mode:
npm startThis will display the main menu where you can choose between Full Backup, Differential Backup, or Clearing the Cache.
For scheduled tasks or batch scripts, use the automatic mode:
# Run with default settings from settings.ts
npm run sync
# Force a specific operation via CLI
npm start -- --auto --operation=full
npm start -- --auto --operation=diffnpm run dev # Watch mode for development
npm test # Run all tests
npm run test:ui # Open Vitest UI
npm run lint # Check for linting issues- Initial Baseline: Always perform a Full Backup for the first run to establish a complete baseline.
- Exclusion Management: Regularly review
excludePatternsinsettings.tsto skip unnecessary folders likenode_modulesor.cache. - Report Monitoring: Check the
BACKUP_REPORT.txton your Desktop after automated runs to verify success. - Cache Maintenance: Use the "Clear Cache" option if you encounter unexpected synchronization behavior.
- Path Lengths: On Windows, keep target paths relatively short or enable "Long Paths" in the OS settings.
- Separation of Concerns: Business logic (backup engines) is decoupled from the UI (menu/progress) and reporting.
- Immutability: Configuration and settings are treated as immutable during the execution flow.
- Defensive Programming: Extensive validation of user input and environment state before execution.
- Stateless Execution: Each backup session is independent, ensuring failures in one don't corrupt others.
- Observability: Every action is logged and tracked for both real-time display and post-run analysis.
src/
βββ diff-backup/ # Differential backup engine (changes only)
βββ full-backup/ # Full backup engine (complete copy)
βββ menu/ # Interactive CLI menu (Inquirer)
βββ progress/ # Progress bars and spinners (Ora)
βββ reporter/ # Report generation logic (Desktop output)
βββ sessions/ # Backup task configurations (JSON)
βββ settings/ # Global application settings
βββ types/ # Centralized TypeScript definitions
βββ utils/ # File system and path helpers
βββ validators/ # Configuration and path validation
- Strategy Pattern: Different backup engines (Full vs. Diff) implemented as interchangeable strategies.
- Singleton Pattern: Settings and configurations managed as application-wide singletons.
- Observer Pattern: Progress tracking system observing the backup engines for real-time updates.
- Command Pattern: CLI arguments mapped to specific internal operations.
npm start # Start interactive menu
npm run sync # Run automatic differential backup
npm run build # Compile TypeScript to JavaScriptnpm run dev # Watch mode for development
npm test # Run all tests using Vitest
npm run test:watch # Run tests in watch mode
npm run test:ui # Open Vitest UI for visual testing
npm run lint # Check for linting issues
npm run format # Format code with PrettierWe welcome contributions! See CONTRIBUTING.md for detailed guidelines on:
- Reporting issues
- Submitting pull requests
- Code style standards
- Testing requirements
- Documentation expectations
For questions, issues, or contributions:
- GitHub Issues: https://github.com/orassayag/backups-manager/issues
- Author: Or Assayag [email protected]
- LinkedIn: orassayag
This application has an MIT license - see the LICENSE file for details.
- Or Assayag - Initial work - orassayag
- Or Assayag [email protected]
- GitHub: https://github.com/orassayag
- StackOverflow: https://stackoverflow.com/users/4442606/or-assayag?tab=profile
- LinkedIn: https://linkedin.com/in/orassayag
- Built for educational and research purposes
- Respects robots.txt and implements rate limiting
- Uses user-agent rotation to avoid detection
- Implements polite crawling practices