Guest xaff Posted July 19, 2003 Report Share Posted July 19, 2003 I decided that I needed a backup routine for my webstuff, so I decided to make a small shell script to do it. (I swear to god, small shell scripts are going to rule the earth one day.) # # These are the only settings that you need to care about # # Define what to back up backup="/home/*/public_html/"; # Define where to put it backupdir="/home/xaff/backup/"; # Define a short reference name for the archives type="web"; # # Nothing to see here.. :P # timestamp=`date '+%Y-%b-%a-%d'`; backupname="$backupdir$type-$timestamp.tar"; tar -cf $backupname $backup Now to crontab it.. :mystismiles: Edit: Either I did it wrong, or it was easy. crontab -e 0 0 * * 1,3,5,7 sh /home/xaff/scripts/backup.sh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.