Traditional manual backups, like copying your user folder through File Explorer, are a poor fit for technical workflows. They tend to hang on locked files, stumble over long paths, and waste time copying large volumes of disposable data such as caches and dependency trees.
For a Windows-to-Windows setup, a better approach is to separate irreplaceable data from regenerative data and use a tool that can handle interrupted transfers and file lock conflicts without constant babysitting.
Robocopy Script Generator I made a tool to help you generate a robocopy script, explore flags, save and share scripts with others. Click Here!.The Core Strategy
The goal is to back up real user data while skipping content that can be recreated later.
- Keep documents, configuration files, source code, and other personal files.
- Skip locked system hives such as
NTUSER.DATthat commonly break drag-and-drop copies. - Exclude high-volume derived folders like
node_modules, build caches, and other temporary output. - Use incremental synchronization so only new or changed files are copied after the first run.
For this kind of workload, the best built-in Windows tool is robocopy.
Primary Backup Command
robocopy "C:\Users\UserName" "E:\Backups\User_Backup" /MIR /FFT /Z /XA:H /W:2 /R:2 /COPY:DAT /XD AppData Downloads OneDrive node_modules .cache bin pkg dist
This command creates a mirrored incremental backup from your user profile to an external drive.
Why This Works
/MIRmirrors the source to the destination. New and changed files are copied, and files deleted from the source are also removed from the backup./FFTuses FAT-style timestamp tolerance to avoid unnecessary re-copying caused by minor timestamp differences./Zenables restartable mode so interrupted transfers can resume instead of restarting from zero./XA:Hexcludes hidden files, which helps skip unnecessary locked Windows files at the profile root./W:2 /R:2prevents the job from hanging on a locked file by retrying only twice with a short wait./COPY:DATcopies file data, attributes, and timestamps without bringing over ACLs that can cause access issues on another Windows system./XDexcludes low-value, high-churn directories such asAppData,Downloads,node_modules, and common cache or build folders.
Important Notes
- Replace
UserNamewith your real Windows username. - Replace
E:with the drive letter of your backup SSD or external drive. - Use a dedicated backup destination when relying on
/MIR, because files removed from the source will also be removed from the destination. - If you need a dry run before committing, add
/Lto preview what Robocopy would do without copying or deleting anything.
Recommended Workflow
- Close development tools or sync-heavy apps if you want the cleanest possible run.
- Start with a dry run by adding
/Land review the output. - Run the real backup command.
- Periodically check the log file or compare the destination contents.
- Repeat the same command for future backups so only changed files are transferred.
This approach is faster, more repeatable, and more resilient than manual copy-and-paste backups, especially on developer machines with large caches and dependency folders.