LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 02-04-2006, 10:48 PM   #1
mus1402
LQ Newbie
 
Registered: Dec 2005
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
Exclamation How to make a scheduled backup procedure using the cron file?


Does anyone here know how to make a scheduled backup procedure using the cron file?

Please tell me as soon as possible.

Thanks in advance.
 
Old 02-04-2006, 11:51 PM   #2
card-suse
Member
 
Registered: Dec 2005
Location: Ohio, USA
Distribution: OpenSuSE 10.2
Posts: 74

Rep: Reputation: 15
It's pretty straightforward. You simply write a bash script (or whatever shell flavor you like) to do the backups (either tar or dar commands). Then create a scheduled crontab event using:

Code:
 crontab -e
I'm assuming you know how to input the lines in crontab. Here's an example from mine:

Code:
 5 0-23/1 * * * /usr/local/bin/backup-full.sh /backup/users .users-backup 5 >> $HOME/backup-users-weekly.err 2>&1
This line runs my backup-full.sh script every hour at 5 minutes past the hour. Your scripts can be as simple or complicated as you like. Mine are a little complicated in that they look for hotplug events to migrate my backups and do checks to see when the last backup was performed and such. That's why I installed them to run every hour since they are on my laptop and it's not always powered on. So I let the scripts do all the checking instead of relying on my computer being powered on at the appropriate times. A place to check for some simple backup scripts is: http://www.linux-backup.net

Hope this helps.

Last edited by card-suse; 02-04-2006 at 11:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a scheduled backup using cron file? mus1402 Linux - Newbie 3 02-05-2006 12:23 AM
Cron - doesn't seem to run scheduled tasks robintw Linux - General 11 11-25-2005 02:53 AM
What does cron do if machine is down when job is scheduled? Utah Linux - Software 4 08-24-2005 08:23 PM
best system backup procedure DPenguin Linux - Newbie 1 03-11-2005 07:24 PM
creating a cron(tab) scheduled thing student04 Linux - Software 5 12-26-2004 10:18 PM


All times are GMT -5. The time now is 07:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration