Setting Up An Automated Local Backup for the Homelab
Tech Log Entry — Setting Up An Automated Local Backup for the Homelab
(or, Setting Up FreeFileSync and Windows Task Scheduler)
Category: Backup / File Management / Windows 11 / Homelab
Initial Goal
- Establish an automated, scheduled backup of selected folders from desktop Robusta (Windows 11) to an external hard drive ("Coffee Canister", 14.5 TB, USB 3.0).
- Backup to run on a nightly schedule without manual intervention.
- Use only free, open-source software (per general preference for FOSS).
- No cloud dependency — fully local, air-gapped backup.
- First phase of a broader backup strategy covering all three homelab machines (2 laptops and 1 desktop in LAN).
Hardware Used
- Desktop Robusta: Lenovo Legion T5, Windows 11 Home, i7 11th gen, 16 GB RAM, RTX 3060
- External HDD "Coffee Canister": WD Elements, 14.5 TB capacity, ~1 TB used, connected via USB 3.0, assigned drive letter F:
- TP-Link TL-SG105 5-port gigabit unmanaged switch (homelab LAN)
- CAT8 ethernet cables (5-pack, 6 ft, 40 Gbps, 2000 MHz, TIA-EIA 568B)
Software Used
- FreeFileSync (free, open-source) — folder sync and batch job creation
- Windows Task Scheduler (built into Windows 11) — automated nightly trigger
- LLM used for setup and troubleshooting: Claude Sonnet 4.6 [Pro plan]
Setup Steps
- Downloaded and installed FreeFileSync on Robusta
- Noted install path: D:\technical\freefilesync\ (non-default; installed to D: due to space constraints on C:) [This caused a plotwist later.]
- Opened FreeFileSync; set left panel (source) to C:\Users\[username]\Downloads
- Set right panel (destination) to F:\backup-downloads on Coffee Canister
- Ran Compare to verify correct files were detected
- Ran Synchronize; confirmed Completed Successfully
- Verified backup folder on F: drive in File Explorer; spot-checked files for correctness
- Saved configuration as Batch Job: BatchRun.ffs_batch
- Settings: run minimized, auto-close, ignore errors
- Saved to: C:\Users\[username]\OneDrive\Documents\BatchRun.ffs_batch
- Opened Windows Task Scheduler; created new Basic Task: FFS-Backup-Downloads
- Trigger: Daily, starting 04/12/2026, at 2:33 AM, recur every 1 day
- Action: Start a Program
- Conditions: enabled "Wake the computer to run this task"
- Setting: enabled "Run task as soon as possible after a scheduled start is missed"
- Run mode: "Run only when user is logged on"
Investigation and Bugs Fixed During Setup
-
BatchRun.ffs_batch saved with empty folder pairs — the batch file was saved before folder paths were confirmed in the FreeFileSync main window. The XML showed
<Left/>and<Right/>with no content. Fix: re-opened FreeFileSync, re-entered both folder paths, re-ran Compare, then saved batch job again. Verified XML in Notepad before proceeding. -
Task Scheduler error 0x80070002 (system cannot find the file specified) — persisted through multiple troubleshooting attempts. Root cause was not the batch file path, which was correct. Actual cause: FreeFileSync was installed to D:\technical\freefilesync, not the assumed default of C:\Program Files\FreeFileSync. The Program/Script field in the Task Scheduler action therefore pointed to a nonexistent path. [This is the previously mentioned plot twist.]
-
Fragment text left in Add Arguments field — during one editing session, the tail end of the executable path (
Files\FreeFileSync\FreeFileSync.exe) was accidentally left in the Arguments field. This compounded the path error. Fix: cleared and retyped both fields from scratch. -
Diagnosis via command prompt — the decisive diagnostic step was running the full command directly in a command prompt window (cmd.exe, not PowerShell). This returned a plain-language error ("The system cannot find the path specified") and confirmed the problem was with the executable path, not the batch file.
-
FreeFileSync located on D: drive — confirmed by running
dir "C:\Program Files\FreeFileSync\FreeFileSync.exe"in command prompt, which returned "file not found." Manual inspection of D: found the correct path: D:\technical\freefilesync\FreeFileSync.exe. -
Final Task Scheduler result: 0x0 — after correcting the Program/Script path to the D: drive location, the manual Run of the task completed successfully. Coffee Canister was audibly active during the run; files showed updated timestamps.
Final Configuration
- Task name: FFS-Backup-Downloads
- Program/Script:
"D:\technical\freefilesync\FreeFileSync.exe" - Add Arguments:
"C:\Users\[username]\OneDrive\Documents\BatchRun.ffs_batch" - Start In: (blank)
- Batch file folder pair: C:\Users\[username]\Downloads → F:\backup-downloads
- Sync mode: Two-way (Update); deletions sent to Recycle Bin
- Schedule: nightly at 2:33 AM; wakes machine from sleep; runs missed tasks on next boot
Daily Use
- No action required — backup runs automatically at 2:33 AM
- Coffee Canister must be connected via USB for the task to complete
- To verify last run: open Task Scheduler → Task Scheduler Library → FFS-Backup-Downloads → check Last Run Time and Last Run Result (0x0 = success)
- To verify files: open F:\backup-downloads in File Explorer and check Date Modified timestamps
- Google Calendar entries to check periodically that the backup system is working correctly
Watch Out For (Future)
- Coffee Canister must be plugged in and powered on at backup time; if unplugged, task will fail silently and retry on next scheduled run (or at next boot, per the missed-task setting)
- If Coffee Canister is assigned a different drive letter after being unplugged and reconnected, the batch file path will break — fix by permanently assigning drive letter F: via Disk Management (right-click volume → Change Drive Letter and Paths) [It shouldn't happen, but in case it does, this is the solution to implement.]
- FreeFileSync is installed on D:, not C: — if reinstalling or updating, install to the same D:\technical\freefilesync\ path, or update the Task Scheduler action to match the new path
- The batch file (BatchRun.ffs_batch) lives in OneDrive\Documents — if OneDrive marks it as "online only," Task Scheduler will fail to find it; ensure the file is set to "always keep on this device" in OneDrive settings
- To add additional folder pairs to the backup (e.g., Documents, Desktop), open FreeFileSync, add the new pairs to the existing configuration, and overwrite BatchRun.ffs_batch; or create separate batch files and separate Task Scheduler tasks for each
Lessons Learned
- When installing a program to a non-default path, write down the full install path immediately. Even a sticky note near the machine is sufficient. This single undocumented decision (D: instead of C:) was the root cause of the entire troubleshooting session.
- Before saving a FreeFileSync batch job, always confirm that folder paths are visible and populated in both panels. A batch file saved from an empty configuration is silently broken and will not error until it is actually run.
- When Task Scheduler fails, the most efficient diagnostic is to reproduce the exact command in a plain cmd.exe window. The error message from the command prompt is more readable than the Task Scheduler result code and points directly at the broken component.
- Check both fields in a Task Scheduler action — Program/Script and Add Arguments — independently. A path error in either one produces the same 0x80070002 result code, which does not indicate which field is wrong.
Next Steps / To-Do
- Confirm nightly automated run succeeded (check Task Scheduler Last Run Time the morning after setup)
- Expand backup scope: add Documents, Desktop, and project folders as additional folder pairs in the batch job
- Set up automated LAN backups from Liberica (Linux Mint) and Typica (Linux Mint) to Coffee Canister via rsync over SSH
- Assign Coffee Canister a permanent drive letter (F:) in Disk Management to prevent drive-letter drift [UPDATE: done.]
- Ensure BatchRun.ffs_batch is set to "always keep on this device" in OneDrive to prevent online-only sync issues
Comments
Post a Comment