Advertisement
Guest User

Copy daily backup once a week

a guest
Aug 30th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Make a copy of thursdays backup into the weekly folder.
  4. # Run once a week via crontab.
  5.  
  6. # Define Date
  7. DATEFILE=`/bin/date +%G%m%d`
  8.  
  9. # Copy of thursdays backup is copied into the weekly folder
  10. cp /backup/daily/${DATEFILE} /backup/weekly/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement