LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-30-2011, 08:45 PM   #1
kenny53067
Member
 
Registered: Jul 2011
Location: Rio Grande City, Texas
Posts: 54

Rep: Reputation: Disabled
Question Need someones opinion on a cron file


Will this:

* * 1 1-12 * #dump -0uf /dev/st0/
* * * * 0 #dump -2uf /dev/st0/
* * 2-31 * 1-6 #dump -5uf /dev/st0/

answer this question?

How to create a cron file that will regularly perform the following backups:
a. Performs a level 0 backup once per month
b.Performs a level 2 dump one day per week
c.Performs a level 5 dump every day that neither a level 0 nor a level 2 dump is performed.

If not, I'm I close? This is homework, so I don't want a direct answer, just some good guidance
 
Old 07-31-2011, 01:05 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Are you certain you want to run all of these dumps
at every minute of every hour on the given day(s)?
 
Old 07-31-2011, 01:39 AM   #3
culaterout
Member
 
Registered: Jul 2006
Location: colorado
Distribution: Debian, Arch Linux, Linux Mint, Ubuntu, Fedora, Suse, Mepis, Redhat, Sayabon, mandrake and android (
Posts: 189

Rep: Reputation: 29
Simply put that is a unix machine....

First off computers are far more advanced then needing to use such scripts or small programs to run backups....

Terminal line is important, but there have been thousands of Graphical user programs made to run backups and just about

any computer function.... Furthermore, half the Unix idiot professors are unaware that you can load Linux OS as the

primary shell over the Server and use then linux programs to manage the computer and IBM following will sell and license Linux OS just need to look at there website...

Here is a link to get you started...

Just keep in mind if you are a Computer Net worker or just decided to take a IBM class because you have a degree that requires you to have knowledge of a Unix system this is pretty useless data in the real world....


Most companies use a IBM Server, but not the OS that is either Windows or Novell... In a rare while you might run across As400 and Linux.... Very rare, hospitals use AS400 for billing information and some linux can be found on the east coast such as in North Carolina Red Hat....



Best answer I can give you is the IBM website link....

IBM WEBSITE

Most of the data you are looking for is becoming specific and outdated in the larger sense you can know buy a 1 terabyte hard drive and store thousands of programs and millions upon millions of data....

So you figure I could build a Server that has 4 tb of disk space to write to.... That would be an huge space to write to... Furthermore most fortune 500 companies have a segregated system so data is not in one location but shared across the network....

Well good luck...
 
0 members found this post helpful.
Old 07-31-2011, 03:07 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Ummmm .... what has that ramble got to do with the cron question above?



Please, pretty please, edit that and post something useful.



Cheers,
Tink
 
1 members found this post helpful.
Old 07-31-2011, 03:40 PM   #5
kenny53067
Member
 
Registered: Jul 2011
Location: Rio Grande City, Texas
Posts: 54

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
Ummmm .... what has that ramble got to do with the cron question above?



Please, pretty please, edit that and post something useful.



Cheers,
Tink
I don't know about all the stuff that was said above. all I want to know is does what I wrote answer the question?? If not Am I headed in the right direction??
 
Old 07-31-2011, 04:50 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Did you see my response above the ramble?
 
Old 07-31-2011, 07:24 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Read Tinkster's response in post #2 carefully, and also consider what the '#' char means in that crontab cmd.
 
Old 07-31-2011, 08:07 PM   #8
kenny53067
Member
 
Registered: Jul 2011
Location: Rio Grande City, Texas
Posts: 54

Original Poster
Rep: Reputation: Disabled
From what I could gather the "*" character was used as a ignore character.
* * 1 1-12 * means run on the 1day of months 1-12

as for the "#" character I'm not sure what it means, all I know is that it was used on an example for dump in my text book but it doesn't say why.
 
Old 07-31-2011, 08:17 PM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by kenny53067 View Post
From what I could gather the "*" character was used as a ignore character.
* * 1 1-12 * means run on the 1day of months 1-12

as for the "#" character I'm not sure what it means, all I know is that it was used on an example for dump in my text book but it doesn't say why.
In most cases, the # character signifies a comment; Anything after the pound sign is technically ignored, as comments start with it. Hope that helps!
 
Old 07-31-2011, 08:22 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Try this http://adminschoice.com/crontab-quick-reference and note that (as usual in most contexts) '*' is an all-encompassing wildcard; pretty much the opposite of 'ignore'
 
Old 07-31-2011, 08:33 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by kenny53067 View Post
From what I could gather the "*" character was used as a ignore character.
* * 1 1-12 * means run on the 1day of months 1-12

as for the "#" character I'm not sure what it means, all I know is that it was used on an example for dump in my text book but it doesn't say why.

I'd like to suggest reading
Code:
man 5 crontab

Cheers,
Tink
 
Old 07-31-2011, 08:35 PM   #12
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by chrism01 View Post
Try this http://adminschoice.com/crontab-quick-reference and note that (as usual in most contexts) '*' is an all-encompassing wildcard; pretty much the opposite of 'ignore'
Oooooo..... Thanks for that man. Definitely saving to my bookmarks for future use when I come across another crontab thread.
 
Old 07-31-2011, 09:35 PM   #13
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You're welcome
man pages are all very well, but really they are for ref, not for learning from, unless you already have a good understanding of *nix (imho).
 
Old 07-31-2011, 10:14 PM   #14
kenny53067
Member
 
Registered: Jul 2011
Location: Rio Grande City, Texas
Posts: 54

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
Try this http://adminschoice.com/crontab-quick-reference and note that (as usual in most contexts) '*' is an all-encompassing wildcard; pretty much the opposite of 'ignore'
so does that mean I would use an 0 instead of *??
 
Old 08-01-2011, 12:42 AM   #15
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Read the link & try it; it's all well explained there.
Come back if its still not working
 
  


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
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 09:09 AM
cron file 000-delay.cron (it is on my FC5) - what is the purpose? jtmoon Linux - Server 1 03-08-2007 12:15 PM
Someones logged in as root, and its not me joose Linux - Security 7 10-14-2005 06:35 AM
Opinion: (name, file name, and extension) un shiza Programming 2 06-28-2005 05:23 PM
what can be done with someones router access cartman12345 General 2 04-22-2005 12:09 AM


All times are GMT -5. The time now is 04:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration