- Remove StartTime initialization from globals.New() - Add setupGlobals function in app.go to set StartTime during fx OnStart - Simplify globals package to be just a key/value store - Remove fx dependencies from globals test
3.4 KiB
3.4 KiB
Implementation TODO
Chunking and Hashing
- Implement Rabin fingerprint chunker
- Create streaming chunk processor
Implement SHA256 hashing for chunks(done in scanner)Add configurable chunk size parameters(done in scanner)- Write tests for chunking consistency
Compression and Encryption
- Implement zstd compression wrapper
- Integrate age encryption library
- Create Encryptor type for public key encryption
- Create Decryptor type for private key decryption
- Implement streaming encrypt/decrypt pipelines
- Write tests for compression and encryption
Blob Packing
- Implement BlobWriter with size limits
- Add chunk accumulation and flushing
- Create blob hash calculation
- Implement proper error handling and rollback
- Write tests for blob packing scenarios
S3 Operations
- Integrate MinIO client library
- Implement S3Client wrapper type
- Add multipart upload support for large blobs
- Implement retry logic with exponential backoff
- Add connection pooling and timeout handling
- Write tests using MinIO container
Backup Command - Basic
Implement directory walking with exclusion patterns(done with afero)- Add file change detection using index
Integrate chunking pipeline for changed files(done in scanner)- Implement blob upload coordination
- Add progress reporting to stderr
- Write integration tests for backup
Snapshot Metadata
- Implement snapshot metadata extraction from index
- Create SQLite snapshot database builder
- Add metadata compression and encryption
- Implement metadata chunking for large snapshots
- Add hash calculation and verification
- Implement metadata upload to S3
- Write tests for metadata operations
Restore Command
- Implement snapshot listing and selection
- Add metadata download and reconstruction
- Implement hash verification for metadata
- Create file restoration logic with chunk retrieval
- Add blob caching for efficiency
- Implement proper file permissions and mtime restoration
- Write integration tests for restore
Prune Command
- Implement latest snapshot detection
- Add referenced blob extraction from metadata
- Create S3 blob listing and comparison
- Implement safe deletion of unreferenced blobs
- Add dry-run mode for safety
- Write tests for prune scenarios
Verify Command
- Implement metadata integrity checking
- Add blob existence verification
- Implement quick mode (S3 hash checking)
- Implement deep mode (download and verify chunks)
- Add detailed error reporting
- Write tests for verification
Fetch Command
- Implement single-file metadata query
- Add minimal blob downloading for file
- Create streaming file reconstruction
- Add support for output redirection
- Write tests for fetch command
Daemon Mode
- Implement inotify watcher for Linux
- Add dirty path tracking in index
- Create periodic full scan scheduler
- Implement backup interval enforcement
- Add proper signal handling and shutdown
- Write tests for daemon behavior
Cron Mode
- Implement silent operation mode
- Add proper exit codes for cron
- Implement lock file to prevent concurrent runs
- Add error summary reporting
- Write tests for cron mode
Finalization
- Add comprehensive logging throughout
- Implement proper error wrapping and context
- Add performance metrics collection
- Create end-to-end integration tests
- Write documentation and examples
- Set up CI/CD pipeline