🛡️ Backup Buddy - AI-Safe File Protection
Protect Your Code During AI-Assisted Development
A professional VS Code extension designed to safeguard your intellectual property while working with AI assistants like GitHub Copilot, ChatGPT, and Claude. Create instant backups with folder structure preservation and automatic cleanup.
🎯 Why Backup Buddy?
In the era of AI-assisted coding, protecting your original work is crucial:
- 🤖 AI Safety: Secure your code before AI modifications
- 💡 IP Protection: Preserve original implementations
- 🔄 Version Control: Track changes during AI collaboration
- ⚡ Instant Backup: One-click protection for critical files
- 🗂️ Smart Organization: Maintain folder structure in backups
✨ Key Features
🎛️ Professional Interface
- 📍 Editor Toolbar Button: Prominent save icon (💾) in top-right corner
- 📊 Status Bar Integration: Always-visible backup status indicator
- ⌨️ Command Palette: Quick access via
Ctrl+Shift+P
- 🎨 Professional Icons: High-contrast, easily identifiable buttons
🔧 Advanced Functionality
- 📁 Folder Structure Preservation: Maintains original directory hierarchy
- 🧹 Automatic Cleanup: Configurable old file removal (30-day default)
- ⏰ Timestamp Naming:
filename_YYYYMMDD_HHMMSS.ext
format
- 💾 Unsaved Changes Support: Backup even modified files
- 🔄 Auto-Backup on Save: Optional automatic protection
🚀 Installation
Quick Install (Recommended)
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X
)
- Search "Backup Buddy"
- Click Install
Alternative Methods
📖 Usage Guide
🎯 Icon Visibility & Location
- Location: Top-right corner of active editor
- Visibility: Only when file is focused and open
- Icon: Professional save/disk symbol
- Color: Adapts to VS Code theme (light/dark)
- Size: Standard toolbar icon (16x16px)
Status Bar Indicator
- Location: Bottom status bar (right side)
- Always Visible: Persistent across all files
- Shows: Backup count and last backup time
- Click Action: Quick backup of current file
🔄 AI Development Workflow
graph LR
A[Write Code] --> B[💾 Backup]
B --> C[AI Assistant]
C --> D[Review Changes]
D --> E[Keep/Restore]
- Before AI Interaction: Click 💾 to backup current state
- During AI Coding: Let Copilot/ChatGPT suggest changes
- After AI Changes: Compare with backup if needed
- Decision Point: Keep AI changes or restore from backup
⚡ Quick Actions
Action |
Method |
Shortcut |
Backup Current File |
Toolbar Button |
Click 💾 |
Backup via Command |
Command Palette |
Ctrl+Shift+P → "Back Up" |
Auto-Backup Setup |
Settings |
Search "Backup Buddy" |
Cleanup Old Files |
Command Palette |
"Clean Up Old Backup Files" |
⚙️ Configuration
🎛️ Settings Overview
Access via: File
→ Preferences
→ Settings
→ Search "Backup Buddy"
{
"fileBackup.backupDirectory": "",
"fileBackup.autoBackupOnSave": false,
"fileBackup.preserveFolderStructure": true,
"fileBackup.cleanupDays": 30,
"fileBackup.autoCleanup": false
}
📁 Directory Structure
Default Location: .vscode/backups/
project/
├── .vscode/
│ └── backups/
│ ├── src/
│ │ ├── app.js_20231201_143022.js
│ │ └── utils.js_20231201_143045.js
│ └── README.md_20231201_143100.md
└── src/
├── app.js
└── utils.js
Custom Directory Example:
C:/MyBackups/
├── ProjectA/
│ └── src/
│ └── component.tsx_20231201_143022.tsx
└── ProjectB/
└── api/
└── routes.js_20231201_143045.js
🤖 AI Integration Scenarios
GitHub Copilot Workflow
- 💾 Backup before accepting suggestions
- Review Copilot's code changes
- Compare with original implementation
- Keep improvements, restore if needed
ChatGPT/Claude Integration
- 💾 Backup current working file
- Copy code to AI assistant
- Apply suggested modifications
- Test and validate changes
- Restore from backup if issues arise
Refactoring Protection
- 💾 Backup entire module before AI refactoring
- Let AI suggest improvements
- Apply changes incrementally
- Maintain backup trail for rollback
🎯 Best Practices
Recommended Workflow
- Pre-AI Backup: Always backup before major AI interactions
- Incremental Changes: Make small, testable modifications
- Regular Cleanup: Enable auto-cleanup to manage disk space
- Version Tracking: Use meaningful backup naming conventions
Team Collaboration
- Shared Backup Directory: Configure team-wide backup location
- Backup Before Merge: Protect code before integrating AI suggestions
- Code Review Safety: Backup original implementations for comparison
- ⚡ Lightning Fast: < 100ms backup operations
- 💾 Memory Efficient: Minimal RAM usage during backup
- 🎯 Smart Targeting: Only processes requested files
- 🧹 Auto-Cleanup: Prevents disk space bloat
Security & Privacy
- 🔒 100% Local: No cloud uploads or external connections
- 🛡️ File Integrity: Preserves original file permissions
- 🔐 Private: Your code never leaves your machine
- 📁 Organized: Maintains secure folder structure
🆘 Troubleshooting
Common Issues & Solutions
Issue |
Solution |
💾 Icon not visible |
Ensure file is open and focused, restart VS Code |
📁 Backup location error |
Check write permissions, verify custom directory path |
⚡ Performance slow |
Enable auto-cleanup, reduce cleanup days setting |
🔄 Restore not working |
Verify backup file exists, check timestamp format |
🚫 Permission denied |
Run VS Code as administrator (Windows) or check folder permissions |
Getting Help
📝 Release Notes
See CHANGELOG.md for detailed version history.
Latest: v1.0.4
- 🐛 Fixed timestamp parsing issues for reliable backup restoration
- 🔧 Improved error handling and diagnostic messages
- ✅ Enhanced VS Code extension category compliance
- 🚀 Performance optimizations and code quality improvements
📄 License
MIT License - see LICENSE file for details.
🌟 Star this project on GitHub if it helps protect your code!
🐛 Found an issue? Report it here