A robust Linux-based backup solution written in Bash that provides automated incremental and full backup capabilities with Git integration for version control and change tracking.
- Incremental Backups: Creates space-efficient backups by only backing up modified files
- Full Backups: Complete system backups with hash-based deduplication
- Hash-based Change Detection: Uses SHA256 checksums to identify modified files
- Git Integration: Automatically commits backup files to Git for version control
- Automated Cleanup: Removes previous backup files to save storage space
- Flexible Restoration: Restore from full backups with incremental updates
- Timestamp Naming: All backups are timestamped for easy identification
- Creates incremental backups using GNU tar's snapshot feature
- Only backs up files that have changed since the last backup
- Maintains a snapshot file for tracking incremental changes
- Automatically commits backup archives to Git
- Performs complete system backups
- Uses hash database to avoid backing up unchanged files
- Creates compressed tar.gz archives
- Integrates with Git for backup versioning
- Restores data from backup archives
- Automatically finds and restores the latest full backup
- Applies incremental backups in chronological order
- Provides restoration status feedback
- Hash Generation: The system generates SHA256 hashes for all files in the source directory
- Change Detection: Compares current file hashes with stored hash database
- Selective Backup: Only backs up files that are new or have been modified
- Archive Creation: Creates compressed tar.gz archives with timestamp naming
- Git Integration: Automatically adds and commits backup files to Git repository
- Cleanup: Removes previous backup files to maintain storage efficiency
The scripts are currently configured with the following default paths:
- Source Directory:
/home/krishna - Backup Directory:
/home/krishna/Automated_Backup_System/backups - Restore Directory:
/home/krishna/restore
These paths can be easily modified in the script headers to match your system configuration.
# Run incremental backup
./incrementalbackup.sh
# Run full backup
./fullbackup.sh# Restore from backups
./restoringbackup.sh- Linux operating system
- Bash shell
- GNU tar with incremental backup support
- Git (for version control integration)
- SHA256sum utility (usually included in coreutils)
Automated_Backup_System/
├── incrementalbackup.sh
├── fullbackup.sh
├── restoringbackup.sh
└── backups/
├── backup_hashes.txt
├── snapshot.snar
├── full_backup_YYYYMMDD_HHMMSS.tar.gz
└── incremental_backup_YYYYMMDD_HHMMSS.tar.gz
- Space Efficient: Hash-based deduplication prevents backing up unchanged files
- Version Control: Git integration provides backup history and tracking
- Automated: Requires minimal manual intervention once configured
- Reliable: Comprehensive error handling and status reporting
- Flexible: Easy to modify paths and configuration for different environments
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is open source and available under the MIT License.