Skip to content

Instantly share code, notes, and snippets.

@sente
Created March 30, 2011 08:44
Show Gist options
  • Save sente/894077 to your computer and use it in GitHub Desktop.
Save sente/894077 to your computer and use it in GitHub Desktop.
script used for localized snapshots
PATH=$PATH:bin/
set -x
cd $HOME || exit 1
DIR=.hide/proc/snapshots
if [ ! -d ${DIR}/daily.0 ]; then exit 1; fi
cp -al ${DIR}/daily.0 ${DIR}/daily.`date +%F`
cp ir.filter ${DIR}
if [ ! -f ${DIR}/ir.filter ]; then exit 1; fi
rsync -a --delete --numeric-ids --delete-excluded --verbose \
--prune-empty-dirs --filter='. /home/spowers/.hide/proc/snapshots/ir.filter' \
/ ${DIR}/daily.0
set -x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment