Bash Sync Script

by Scott, Revised on September 10, 2015 (Scripting)

Used for syncing to a usb drive.

#!/bin/bash
exitcode=1
if test -e '/media/mount/point'
then
  exitcode=0
  rsync -avue --inplace --delete /home/user/files/ /media/mount/point/backup
fi
exit $exitcode

Tags: Scripting