A robust backup solution for web development projects that supports multiple source directories, incremental backups, compression, integrity verification, and cloud storage integration.
- Multi-Directory Backup: Back up projects from multiple source directories
- Flexible Backup Types: Full, incremental, or differential backups
- Compression: Optimized compression with multi-threading support (via pigz)
- Verification: Integrity verification of backup archives
- Exclusion Rules: Automatically excludes node_modules and other large dependencies
- Cloud Integration: Upload backups to AWS S3, DigitalOcean Spaces, Dropbox, or Google Drive
- Reporting: Detailed HTML reports and email notifications
- Dashboard: Visual dashboard for backup statistics and forecasting
- Restore: Simple project restoration with preview capability
- Security: Built-in security features and encryption support
- Bash shell (version 4.0 or later)
- tar, gzip (required)
- pigz (optional, for multi-threaded compression)
- gnuplot (optional, for visualization)
- AWS CLI (optional, for cloud storage)
-
Clone the repository:
git clone https://github.com/yourusername/backup-webdev.git
-
Make the scripts executable:
cd backup-webdev chmod +x *.sh
-
Set up shell alias for easy access:
./setup-alias.sh
-
Verify installation and configuration:
./check-config.sh
Run the tool in interactive mode:
./webdev-backup.sh
Run a silent backup with default settings:
./backup.sh --silent
Run an incremental backup with verification:
./backup.sh --incremental --verify
Back up a specific directory:
./backup.sh --source ~/projects
Back up multiple source directories:
./backup.sh --sources ~/webdev,~/inform6 --verify
Create differential backups (changes since last full backup):
./backup.sh --differential
Upload backup to cloud storage:
./backup.sh --cloud do --silent
Restore the latest backup:
./restore.sh --latest
Restore a specific project from backup:
./restore.sh --project myproject --dest ~/restored
Run all tests to verify system:
./run-all-tests.sh
Run specific tests:
./test-backup.sh --quick
The configuration is stored in config.sh
. You can modify default settings:
- Source directories (
DEFAULT_SOURCE_DIRS
) - Backup destination (
DEFAULT_BACKUP_DIR
) - Compression level
- Email notification settings
- Cloud storage preferences
backup.sh
- Main backup scriptwebdev-backup.sh
- Interactive launcher interfacerestore.sh
- Backup restoration scriptconfig.sh
- Configuration settingsutils.sh
- Utility functionsui.sh
- User interface functionsfs.sh
- Filesystem operationsreporting.sh
- Reporting functionscheck-config.sh
- Configuration verificationsecurity-audit.sh
- Security audit scriptencryption.sh
- Optional encryption functionsrun-all-tests.sh
- Comprehensive test suitedirs-status.sh
- Source directory status report
You can easily add new source directories:
- Through the menu system: Select "9) Manage Source Directories" and "1) Add new source directory"
- Directly edit
config.sh
and add to theDEFAULT_SOURCE_DIRS
array - Use the
--sources
command-line option with comma-separated paths
For secure operations:
- Run
secure-permissions.sh
to set proper file permissions - Run
secure-secrets.sh
to set up secure credential storage - Run
security-audit.sh
periodically to check for issues
The project includes a comprehensive test suite:
./run-all-tests.sh # Run all tests
./run-tests.sh --unit # Run only unit tests
This project is licensed under MIT License - see LICENSE file for details.
WebDev Backup Tool - Created by Your Name