Created
November 7, 2010 20:27
-
-
Save luanlmd/666400 to your computer and use it in GitHub Desktop.
Compact folders after sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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