daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. DAY=$( date +%d)
  4. BACKUP_DIR="/tehre/goes/the/backups"
  5.  
  6. mkdir -p ${BACKUP_DIR}
  7.  
  8. for i in /path/where/important/stuff/is/*
  9. do
  10.     BASENAME=$(basename $i)
  11.    
  12.     tar czf ${BACKUP_DIR}/${BASENAME}_${DAY}.tar.gz $i
  13. done
RAW Paste Data
Top