Skip to content

Instantly share code, notes, and snippets.

@munro
Created April 10, 2012 20:18
Show Gist options
  • Save munro/2354193 to your computer and use it in GitHub Desktop.
Save munro/2354193 to your computer and use it in GitHub Desktop.
Backup Script
#!/usr/bin/env sh
find /home/ryan/* -maxdepth 0 -exec echo '{}' +
find /repos/* -maxdepth 0 -exec echo '{}' +
echo /etc/nginx/conf/nginx.conf
echo /etc/named/
#!/usr/bin/env sh
BACKUP_TAR=`date +backup_0x0539_%Y_%M_%d.tar`
BACKUP_FILES=`./files`
echo 'TARing files...'
time tar -cpf ${BACKUP_TAR} ${BACKUP_FILES}
ls -lh ${BACKUP_TAR} | awk '{print "TARed! Tar file is " $5}'
echo 'Gzipping...'
time gzip $BACKUP_TAR
ls -lh ${BACKUP_TAR}.gz | awk '{print "Gzipped! Tar file is " $5}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment