A robust, multi-threaded Windows automated backup tool. It leverages robocopy to mirror directories (to NAS or local drives) and sends beautifully formatted logs and summaries directly to a Discord channel via Webhooks.
| ✅ Automated Discord Report | 🛠️ Behind the Scenes (Execution Logs) |
|---|---|
![]() |
![]() |
- ⚡ Robocopy Mirroring: Fast, multi-threaded copying that only transfers changed files. Perfect for massive directories.
- 💬 Discord Integration (Optional): Automatically parses
robocopy's tricky UTF-16 log files to extract total files scanned, copied, skipped, and failed, delivering a clean summary to your server. - 🔌 Pre-flight NAS Checks: Automatically wakes up/pings network drives (e.g.,
\\NAS\share) before executing to ensure Windows has mounted them, preventing false failure alerts. - 👻 Windowless Execution Support: Safely handles encoding outputs for silent background processing (e.g., running via
pythonw.exein Task Scheduler without flashing console windows).
- Windows OS (Relies natively on
robocopy.exe). - Python 3.8+
1. Clone the repo:
git clone git@github.com:NickWinston123/Robo-Sync-Manager.git
cd Robo-Sync-Manager2. Install requirements:
pip install -r requirements.txt3. Configure Backup Tasks:
Copy config.json.example to config.json. Define your source paths, destination paths, and thread counts.
(Note: Remember to double-escape backslashes in JSON).
You can run tasks in standard mirror mode or rolling snapshot mode:
{
"tasks": [
{
"name": "Main Documents (Mirror)",
"source": "C:\\Users\\Username\\Documents",
"destination": "\\\\NAS\\share\\Backups\\Documents",
"threads": 8,
"mode": "direct"
},
{
"name": "Project Files (7-Day History)",
"source": "C:\\Work\\Projects",
"destination": "\\\\NAS\\share\\Backups\\Projects_History",
"threads": 8,
"mode": "history",
"days": 7
}
]
}Task Parameters:
mode: Use"direct"(Default) to exactly mirror and overwrite the destination folder. Use"history"to automatically create a newYYYY-MM-DDfolder inside the destination every day.days: (Only used if mode is "history"). The number of daily backups to keep before the script automatically deletes the oldest ones.
4. Configure Discord Webhook (Optional):
If you want Discord notifications, copy .env.example to .env and add your webhook URL:
DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE"To run the script interactively and watch the console output:
python SyncManager.pyThis script is designed to run silently in the background on a schedule. To set it up:
- Open Task Scheduler -> Create Task...
- General: Check "Run whether user is logged on or not" (Highly recommended if backing up to a NAS).
- Triggers: Set your schedule (e.g., Daily at 2:00 AM).
- Actions:
- Action:
Start a program - Program/script:
pythonw(Usingpythonwinstead ofpythonprevents a black console window from popping up). - Add arguments:
SyncManager.py - Start in:
C:\Path\To\Your\Robo-Sync-Manager
- Action:
- Reads Configuration: Scans
config.jsonfor all sync configurations. - Pre-flight Checks: Pings destination root paths to ensure Windows has initialized the network shares.
- Execution: Spawns
robocopysubprocesses sequentially, generating discrete log files inside the/logs/directory. - Data Extraction: Uses Regex to drill into the raw log files to retrieve exact statistical data.
- Notification: Bundles the statistics and delivers a single, color-coded embed notification to Discord detailing the success or failure of the run.
MIT

