Posted By

adkatrit on 06/29/12


Tagged

backup cron


Versions (?)

backup into folder daily


 / Published in: Bash
 

i've got this running on an hourly cron. works beautifully.

  1. #!/bin/bash
  2. TODAY=$(date +%m-%d-%Y)
  3. mkdir -p /path/to/backup/$TODAY/
  4. cp /full/path/to/backup.data /path/to/backup/$TODAY/$(date +%s).data
  5.  
  6. #perfect for cron job

Report this snippet  

You need to login to post a comment.