Skip to content

Instantly share code, notes, and snippets.

@paularmstrong
Created September 12, 2010 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paularmstrong/576589 to your computer and use it in GitHub Desktop.
Save paularmstrong/576589 to your computer and use it in GitHub Desktop.
#!/bin/bash
DIR=$1
ACTION='backup'
if [ $# -eq 2 ]; then
ACTION=$2
fi
if [ $ACTION = 'delete' ]; then
rsync -rv --delete --size-only backup@files::$DIR/ /mnt/group1/media/$DIR/
else
rsync -rv --size-only backup@files::$DIR/ /mnt/group1/media/$DIR/
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment