In today’s digital world, keeping our files synchronized across different locations is crucial for data backup, version control, and maintaining workflow continuity. Whether you’re a developer working across multiple environments, a content creator managing assets, or simply someone who wants to keep important documents backed up, ExtFileReplicator offers an elegant solution to your file synchronization needs.
What is ExtFileReplicator?
ExtFileReplicator is a lightweight yet powerful folder synchronization tool that brings version control-like capabilities to your file management workflow. Developed by Ajay Kumar Chaturvedi (Ajaykr2109), this Python-based tool provides real-time monitoring and one-way synchronization between source and destination folders.
Key Features That Set It Apart
π One-way Folder Synchronization: Safely replicate files from source to destination directories without the risk of accidental overwrites in your source folder.
ποΈ Real-time File Monitoring: Automatic detection and synchronization of file changes as they happen using file system events, ensuring your backup is always up-to-date.
β‘ Fast Change Detection: Uses sophisticated file hashing algorithms like MD5 or SHA-256 to quickly identify changes, making the sync process efficient even with large file collections.
π Universal File Support: Handles all file types including binary files, text documents, and hidden files without discrimination.
β±οΈ Metadata Preservation: Maintains file timestamps and other metadata during synchronization, preserving the original file characteristics.
π« Flexible Exclusion System: Configure which files and folders to exclude from synchronization using powerful glob patterns.
π₯οΈ Cross-platform Compatibility: Works seamlessly across Windows, macOS, and Linux systems.
Installation Guide
ExtFileReplicator offers multiple installation methods to suit different user preferences and system configurations. Before installation, ensure you have Python 3.6+ and Git installed on your system.
Method 1: Virtual Environment (Recommended)
The virtual environment approach is the safest method, especially for systems with strict package management policies or when dealing with externally-managed-environment errors:
# Create a virtual environment
python3 -m venv frep-env
# Activate the virtual environment
# On Linux/macOS:
source frep-env/bin/activate
# On Windows:
frep-env\Scripts\activate
# Install the package
pip install git+https://github.com/Ajaykr2109/ExtFileReplicator
Method 2: Using pipx (System-wide Installation)
For users who want system-wide access without virtual environment management, pipx is the recommended solution:
# Install pipx if not already available
sudo apt install pipx
pipx ensurepath
# Install ExtFileReplicator
pipx install git+https://github.com/Ajaykr2109/ExtFileReplicator
Method 3: Development Installation
Perfect for developers who want to contribute or modify the code following open source development practices:
# Clone the repository
git clone https://github.com/Ajaykr2109/ExtFileReplicator.git
cd ExtFileReplicator
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Linux/macOS
# or
venv\Scripts\activate # On Windows
# Install in development mode
pip install -e .
System Requirements
- Python 3.6 or higher: The tool is built with modern Python features
- Git: Required for installation from the repository
- pip package manager: Standard Python package installer
Important Note: If you encounter the “externally-managed-environment” error, avoid using the --break-system-packages
flag as recommended by PEP 668. Instead, use one of the recommended installation methods above, preferably the virtual environment approach.
Complete Command Reference
ExtFileReplicator provides a comprehensive command-line interface with intuitive commands for managing your synchronization tasks. All commands follow POSIX conventions for consistency.
Basic Replication Management
Adding New Replications:
# Add a simple replication pair
frep add ~/Documents ~/Backups/Documents
# Add replication with exclusion patterns
frep add ~/Projects ~/Backups/Projects --exclude *.tmp *.log node_modules/
Running Synchronization:
# Perform one-time synchronization
frep sync
# Start continuous monitoring using [file system watchers](https://en.wikipedia.org/wiki/Inotify)
frep watch
Advanced Monitoring Options
Customized Watching:
# Monitor with custom interval (30 minutes)
frep watch --interval 30
# Run monitoring in background ([daemon mode](https://en.wikipedia.org/wiki/Daemon_(computing)))
frep watch --interval 5 --daemon
Management Commands
Viewing and Managing Replications:
# List all configured replications
frep list
# Remove a specific replication
frep remove ~/Documents
# Check status of all replications
frep status
# Check specific replication status
frep status ~/Documents
Configuration Management
System Configuration:
# Display current configuration
frep config show
# Set synchronization interval
frep config set sync_interval 60
# Configure logging level
frep config set log_level DEBUG
# Set maximum log file size
frep config set max_log_size 10
Logging and Monitoring
Log Management:
# View complete logs
frep logs
# View last 50 log entries
frep logs --tail 50
# Clear all log entries
frep logs --clear
Global Command Flags
These flags enhance command functionality following GNU command-line conventions:
--verbose
: Show detailed output for debugging--quiet
: Show only error messages--dry-run
: Simulate operations without making changes (dry run concept)--force
: Skip confirmation prompts
Practical Usage Examples
Basic Home Directory Backup
# Set up document backup with common exclusions
frep add ~/Documents ~/Backups/Documents --exclude *.tmp cache/ .DS_Store
# Run initial synchronization
frep sync
# Start continuous monitoring
frep watch --daemon
Developer Workflow Setup
# Backup source code projects (excluding common [build artifacts](https://en.wikipedia.org/wiki/Artifact_(software_development)))
frep add ~/Development ~/Backups/Development --exclude node_modules/ .git/ *.log build/
# Configure for frequent updates
frep config set sync_interval 15
# Enable detailed logging for development
frep config set log_level DEBUG
# Start background monitoring
frep watch --interval 10 --daemon
Media Files Synchronization
# Setup media backup with size considerations
frep add ~/Pictures ~/External/Pictures
frep add ~/Videos ~/External/Videos --exclude *.tmp
# Configure larger log files for media operations
frep config set max_log_size 50
# Monitor with longer intervals due to large files
frep watch --interval 60
File and Folder Exclusion Patterns
ExtFileReplicator supports powerful glob patterns for excluding unwanted files and directories, following Unix shell wildcards conventions:
Common Exclusion Patterns
*.tmp
– Temporary files*.log
– Log filescache/
– Cache directories.git/
– Git repositoriesnode_modules/
– Node.js dependencies.DS_Store
– macOS system filesThumbs.db
– Windows thumbnail cache
Multiple Pattern Example
frep add ~/Workspace ~/Backup/Workspace --exclude *.tmp *.bak cache/ .git/ node_modules/ *.log
Configuration and Logging
Configuration Files
ExtFileReplicator stores its configuration in replicator_config.json
in your working directory following JSON format standards. This file contains all replication pairs and system settings.
Log File Locations
The application maintains detailed logs in platform-specific locations following XDG Base Directory Specification (Linux) and platform conventions:
- Windows:
%LOCALAPPDATA%\FolderReplicator\Logs\
(Windows environment variables) - macOS:
~/Library/Logs/FolderReplicator/
(macOS file system layout) - Linux:
~/.local/share/FolderReplicator/logs/
(Linux filesystem hierarchy)
Log Levels
Configure logging verbosity based on your needs following Python logging levels:
DEBUG
: Comprehensive debugging informationINFO
: General operational messagesWARNING
: Warning conditionsERROR
: Error conditions only
Error Handling and Exit Codes
ExtFileReplicator provides clear exit codes for script integration and automation:
0
: Successful operation1
: General error occurred2
: Invalid command arguments3
: File access error4
: Configuration error
Why Choose ExtFileReplicator?
Advantages Over Traditional Solutions
- Simplicity: Clean command-line interface without complex GUI overhead
- Reliability: One-way synchronization eliminates accidental data loss
- Performance: Efficient hashing algorithms for fast change detection using incremental backup principles
- Flexibility: Powerful exclusion patterns for precise control
- Cross-platform: Single tool works across all major operating systems
- Real-time: Continuous monitoring ensures up-to-date backups using file system events
Perfect Use Cases
- Developers: Source code backup and synchronization
- Content Creators: Media file backup and organization
- Students: Document synchronization across devices
- Professionals: Important file backup automation
- System Administrators: Automated backup scripts and disaster recovery
Getting Started Today
ExtFileReplicator makes file synchronization accessible and reliable. Whether you need a simple backup solution or a sophisticated file replication system, this tool adapts to your requirements following Unix philosophy principles.
Quick Start Checklist
- β Install Python 3.6+
- β Choose your installation method (virtual environment recommended)
- β Install ExtFileReplicator
- β Add your first replication pair
- β Run initial sync
- β Start monitoring mode
- β Configure logging and intervals as needed
Community and Support
ExtFileReplicator is open-source software released under the MIT License. The project welcomes contributions, bug reports, and feature requests through its GitHub repository.
Repository: github.com/Ajaykr2109/ExtFileReplicator
Additional Resources
- File Synchronization Best Practices
- Understanding File Systems
- Backup Strategy Guide
- Command Line Interface Design
- Python Virtual Environments Guide
ExtFileReplicator represents a perfect balance between simplicity and power, offering professional-grade file synchronization capabilities in an accessible package. Give it a try today and experience the peace of mind that comes with automated, reliable file backup and synchronization.
Ready to get started? Follow the installation guide above and have your first synchronization running in minutes!
You need to login in order to like this post: click here
Leave a Reply
You must be logged in to post a comment.