Skip to content

SynrgStudio/python-robocopy-backup-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Robocopy Backup

A modern GUI application for automating file backups using Windows Robocopy.

Python Robocopy Backup

Features

  • Automated Backups: Schedule automatic backups at custom intervals
  • Quick Interval Selection: Preset buttons for 1-hour, 2-hour, and 5-hour backup intervals
  • Windows Startup Integration: Option to start the application automatically with Windows
  • Real-time Monitoring: Track backup progress with detailed logs
  • System Tray Integration: Run in the background with minimal interference
  • Modern UI: Clean and intuitive interface built with Tkinter
  • Error Handling: Robust error detection and reporting
  • Minimal Logging: Only errors are saved to log files to save space

Requirements

  • Windows operating system (Robocopy is a Windows utility)
  • Python 3.6+
  • Required Python packages:
    • Pillow (PIL)
    • pystray

Installation

From Source

  1. Clone the repository:
git clone https://github.com/SynrgStudio/python-robocopy-backup-tool.git
cd pythonbackupapp
  1. Install required packages:
pip install pillow pystray
  1. Run the application:
python backup.py

Executable Version

A standalone executable version is available in the releases section. No Python installation required.

Usage

  1. Configure Source Folder: Select the folder you want to back up
  2. Configure Destination Folder: Select where files should be backed up to
  3. Set Check Interval: Specify how often (in seconds) the app should check for changes or use the preset buttons (1h, 2h, 5h)
  4. Windows Startup Option: Check the "Start with Windows" option to have the application start automatically with Windows with the daemon running
  5. Start Daemon: Click "Start Daemon" to begin the automated backup process
  6. Manual Backup: Click "Run Backup Now" to perform an immediate backup

How It Works

The application uses Windows' built-in Robocopy (Robust File Copy) utility with the following options:

  • /MIR: Mirrors the directory structure (creates an exact copy)
  • /MT:8: Uses 8 threads for faster copying
  • /FFT: Uses FAT file timing (less precise, more compatible)
  • /R:3: Retries 3 times on failed copies
  • /W:2: Waits 2 seconds between retries

Building from Source

To create a standalone executable:

pip install pyinstaller
pyinstaller --onefile --windowed --icon=ico.ico --add-data "ico.ico;." --add-data "ico.png;." --name "Python_Robocopy_Backup" backup.py

The executable will be created in the dist folder.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Uses Robocopy, a powerful built-in Windows utility
  • Built with Python and Tkinter for cross-version compatibility

About

A simple tool/daemon for constant backup of a folder with robocopy

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages