Auto Backup/Sync specific folders to USB drive?

Hi there, i'm loking for something like Time Machine to auto backup specific folder to USB SSD, i would like for it automaticly backup when USB is connected is there a software for that?

Posted on Feb 8, 2014 12:57 PM

Reply
3 replies

Feb 9, 2014 7:25 AM in response to Mariuks

... i would like for it automaticly backup when USB is connected is there a software for that?


You can use launchd.


First, use this script to perform the backup:

(change "~/Documents/" to the Folder to backup

and "/Volumes/MYUSB" to your USB name)


#!/bin/bash


sleep 10

if [[ -d "/Volumes/MYUSB" ]] ; then

/usr/bin/rsync -a "~/Documents/" "/Volumes/MYUSB"

fi


Then put this plist file in ~/Library/LaunchAgents/ and Log oot and back in (or reboot)

(change /Users/Tony/Desktop/backupMyUSB.sh to the name and location of the script that you created above)


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Label</key>

<string>com.tony.backupMyUSB</string>

<key>ProgramArguments</key>

<array>

<string>/Users/Tony/Desktop/backupMyUSB.sh</string>

</array>

<key>StartOnMount</key>

<true/>

</dict>

</plist>

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Auto Backup/Sync specific folders to USB drive?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.