LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-26-2005, 05:56 PM   #1
goodolday
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
using crontab


this is a practice ques in my linux book, very new to linux, looking for some help with this ques, it says to create a backup schedule as follows:

Set up a complete tape drive backup of the whole system to run every 1st and 15th day of every month at 11pm

Set up a tape drive backup of the /project directory and all its contents to run every weekday (Mon through Fri) at 8pm

The ques says to use crontab, i read over everything and i'm still confused,

thanks,
 
Old 04-26-2005, 07:16 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I assume that you meant to say 'question'.

There are three parts to the problem.
1) A script that will perform the backup of the system
2) A script that will perform the /project directory backup
3) Setting up the cron entries to execute these tasks when you want.

The crond daemon is what performs the execution as certain times using tables on /var/cron/tabs. However, these tables aren't changed directly. You use the 'crontab' program to do this.

Something else to consider is whether on your system, regular users are allowed to use crontab. If this is your system you could change the policies to allow this. However, your example sounds like you need to perform system tasks as the root user.

You may want to print out the man (5) crontab man-page.

man 5 -Tps crontab >crontab.ps
kghostview crontab.ps

for example will give you a better looking man page that you could print out.

Also, it may be a good idea to pipe the output of the crontab listing to a file. Then you can first backup this file and then use any text editor to make changes. When finished, use crontab to load in the new cron table in toto.
 
  


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
crontab x2??? killahsmurf Slackware 2 05-24-2005 10:53 PM
Crontab wormraper Debian 4 05-15-2005 01:01 AM
How to use crontab ? Dakkar Linux - Newbie 2 01-22-2004 10:49 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
HELP!! crontab karleong Linux - General 9 07-12-2003 10:54 AM


All times are GMT -5. The time now is 03:13 PM.

Main Menu
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