Windows PS Script and .bat to automatically backup a usb drive to a machine when it is inserted (based on monotone's script). Sources below.
To set up the automatic backup download Sync.bat, USB-backup.ps1 and USB-backup.xml
The batch file should go at the root your usb drive and the PS script can go anywhere you want on your machine.
Open Sync.bat with a text editor and change the backup folder path.
Same with USB-backup.ps1 and change 'Mirror' to your drive name.
Then in Windows Task Scheduler, select import task and open USB-backup.xml
Go to 'Actions' and 'Modify' and in the 'Arguments' delete whats after -File and enter the full path to USB-backup.ps1
You can also remove -WindowStyle Hidden if you want to see the powershell window.
The -ExecutionPolicy Bypass argument allows the script to run.
Monotone's script can be found here :
Their work is based on these blog posts :