backup into folder daily


/ Published in: Bash
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.