wt
4639779116
feat: add exclude pattern support for directory backups
- Added --exclude flag to allow excluding files/directories from backups
- Implemented pattern-based exclusion logic for directory backups -
Modified size calculation to account for excluded items - Updated
progress tracking to reflect excluded content - Added helper function
for path exclusion checks - Ensured consistent exclusion handling across
size calculation and backup
Key changes: 1. Added excludePatterns variable and flag binding 2.
Updated getPathSize to skip excluded paths 3. Implemented
shouldExcludePath with multiple matching strategies: - Full path
matching - Prefix matching for directories - Glob pattern matching -
Base name matching 4. Integrated exclusion checks in backupDirectory 5.
Propagated excludePatterns through initialModel 6. Maintained progress
accuracy by adjusting total size calculation
The new functionality allows users to specify exclusion patterns:
backup-tool create -s /data -t backup.tar.gz -e "*.tmp" -e "cache/"
2025-08-12 14:07:05 +07:00
..
2025-08-12 14:07:05 +07:00
2025-08-03 10:46:14 +07:00
2025-08-02 12:51:53 +07:00
2025-08-03 10:46:14 +07:00
2025-08-03 10:46:14 +07:00