Skip to content

Instantly share code, notes, and snippets.

@luanlmd
Created November 7, 2010 20:27
Show Gist options
  • Save luanlmd/666400 to your computer and use it in GitHub Desktop.
Save luanlmd/666400 to your computer and use it in GitHub Desktop.
Compact folders after sync
cd /home/secombkp/backup/
DATE=`/bin/date +%Y-%m-%d`
for FILE in *
do
FILENAME=$FILE"-"$DATE".tar.gz"
echo "Creating" $FILENAME
tar -zcf ../backup_history/$FILENAME $FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment