View Single Post
Old 05-22-2009, 12:28 PM   #2 (permalink)
Jayce
 
Monster Techie

Join Date: Sep 2005

Location: /home/jason

Posts: 1,827

Jayce will become famous soon enoughJayce will become famous soon enough

Send a message via AIM to Jayce
Default Re: Get to know Linux: Bash scripting basics

Just to share personal experience: I have a spare hard drive in my computer of ample size compared to my primary. I created a script as follows:

#!/bin/bash
rsync -a --progress --delete /home/jason/ /media/storage/localbackup/

I named it "backup" and ran sudo chmod +x /usr/local/bin/backup (where the file is stored).

That command made it executable.

Then I edited crontab to run "backup" as user "jason" (who also owns the file) @ 4 AM and 4 PM.

So when my hard drive dies, like my lovely brand new Seagate did last month, data-wise : I'm covered.
Jayce is offline