Skip to content

Instantly share code, notes, and snippets.

@stepahn
Created September 21, 2009 19:07
Show Gist options
  • Save stepahn/190478 to your computer and use it in GitHub Desktop.
Save stepahn/190478 to your computer and use it in GitHub Desktop.
#!/bin/bash
DAY=$( date +%d)
BACKUP_DIR="/tehre/goes/the/backups"
mkdir -p ${BACKUP_DIR}
for i in /path/where/important/stuff/is/*
do
BASENAME=$(basename $i)
tar czf ${BACKUP_DIR}/${BASENAME}_${DAY}.tar.gz $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment