SafeCopy is an automated backup tool that allows you to easily configure and schedule backups from source folders to destination drives.
- Web-based user interface for easy configuration
- Automated scheduled backups
- Support for multiple backup mappings
- Detailed backup logs and history
- On-demand backup execution
- Configurable backup intervals
- System tray integration
- File versioning with configurable retention
- Backup compression options (none, zip, tar)
-
Clone this repository:
git clone https://github.com/yourusername/safecopy.git cd safecopy
-
Create a virtual environment and activate it:
python -m venv .venv .venv\Scripts\activate # On Windows source .venv/bin/activate # On macOS/Linux
-
Install the required dependencies:
pip install flask flask-caching pystray pillow
Run the application with default settings:
python main.py
--interval
: Set the backup interval in minutes (default: 10)--port
: Set the web UI port (default: 5000)
Example:
python main.py --interval 30 --port 8080
Once the application is running, open your web browser and navigate to:
http://localhost:5000
- In the web interface, enter the source folder path in the "Source Folder" field.
- Select the destination drive from the dropdown menu.
- Configure backup settings (compression, max versions).
- Click "Add Mapping" to save the configuration.
- Scheduled Backups: The application automatically runs backups at the configured interval.
- Manual Backups: Click the "Run Backup Now" button in the web interface or use the system tray menu to start a backup immediately.
The "Recent Actions" section in the web interface displays the history of backup operations, including success and failure messages.
The application configuration is stored in config.json
in the following format:
{
"mappings": [
{
"source": "C:/path/to/source",
"destination": "D:/",
"maxVersions": 3,
"compression": "zip"
}
],
"last_actions": [
"Backup from C:/path/to/source to D:/backup_20230429_123456 completed in 5.23 seconds. Size: 125.45 MB"
],
"backup_settings": {
"maxVersions": 3,
"compression": "zip"
}
}
The application logs are stored in safecopy.log
and include detailed information about backup operations, errors, and system events.
This project is licensed under the MIT License - see the LICENSE file for details.
- ✅ Local folder-to-folder backup (manual or scheduled)
- ✅ Local web UI (Flask) for configuration
- ✅ Save settings to JSON
- ✅ Basic logging
- ✅ Auto-start in background
- ✅ Backup history viewer
- ✅ System tray icon
- ✅ File versioning (keep last 3 versions)
- ✅ Improved error handling and recovery
- ✅ Backup compression options
- 🔄 Password protection for web UI
- 🔄 Advanced backup scheduling (daily, weekly, monthly)
- 🔄 Email notifications for backup status
- 🔄 Backup verification and integrity checks
- 🔄 Unit tests for core modules
- 🔄 Performance optimizations for large backups
- 🔄 Backup encryption options
- 🔄 Detailed backup statistics and reporting
- 🔄 PyInstaller packaging for standalone executable
- 🔄 Windows installer with Inno Setup
- 🔄 Windows service mode
- 🔄 Comprehensive documentation