Sponsored Content
Top Forums Shell Programming and Scripting Take backup of scripts listed in crontab Post 302941731 by Sivarajan N on Monday 20th of April 2015 01:50:15 PM
Old 04-20-2015
Take backup of scripts listed in crontab

Hi,

I'm trying to take backups of script files listed in cron tab

but,my cron entry has value like this
Code:
10 3 * * * /usr/sbin/logadm
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
#10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___
00,15,30,45 * * * * /opt/EABcsConfig/bin/metacheck.ksh   
00,15,30,45 * * * * /opt/EABcsConfig/bin/check_zfs_pool.ksh   
0 03 * * 2 /opt/EABcsConfig/bin/scrub_zfs_pool.ksh   
00 2 * * * /opt/EABcsutls/backup/backup.sh   
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/EABaircfg/bin/psrbind AirXmlRpcIf 14,15   
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/EABfds/bin/fdscorecleaner >>/dev/null   
52 * * * * /opt/EABfds/bin/configurationBackup.pl >>/dev/null   
5,15,25,35,45,55 * * * * /scripts/air_traffic_check.sh > /dev/null 2>&1
10 * * * * /scripts/air_hc.sh > /dev/null 2>&1
05 0 * * * perl /scripts/GNOCAutomation/scripts/calculate_airlookups.pl>/dev/null
15 0 * * * perl /scripts/GNOCAutomation/scripts/airEastNewSec.pl>/dev/null
30 0 * * * perl /scripts/GNOCAutomation/scripts/utilWriter.pl>/dev/null
0 * * * * perl /scripts/GNOCAutomation/scripts/resource_utilization.pl > /dev/null
0,10,20,30,40,50 * * * * /usr/lib/sa/sa1
00 8 * * * /usr/lib/sa/sa2 -A
#0,10,20,30,40,50 * * * * /opt/temp/mv_sec_prim
0,5,10,15,20,25,30,35,40,45,50,55   * * * *   su - root -c "/scripts/java_memory_usage.sh" >>/dev/null
00 6 * * *  su - root -c "/var/opt/script/TraceRemover/DeleteTrace.sh" > /dev/null 2>&1
0,10,20,30,40,50 * * * *  su - root -c "/var/opt/script/MoveDR/mv_sec_prim.sh" > /dev/null 2>&1
#00 5 * * * /scripts/old_stat_removal.sh 
00 * * * * sh /export/home/etigers/script_new/netstat_script.sh
0 5 * * * /opt/temp/air_backup.sh


which are unable to distinguished by any specific delimeter like cut -d " " -f6.

I hope a line by line parsing and printing only will help.please help me out how to take it

Advance thanks

Sivarajan.N
[/B]

Last edited by Corona688; 04-20-2015 at 03:40 PM.. Reason: typo
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab backup

I have three users on my server a) root b) oracle c) download i want to take backup of cron for everyuser everyday. Is there any way to schedule this process. (4 Replies)
Discussion started by: blackeyed
4 Replies

2. HP-UX

CVSWeb - Directories listed but files not listed

I am using CVSWeb on HPUnix. When i access it, all directories are listed but files are not listed. I am getting the error "NOTE: There are 51 files, but none matches the current tag. " in tomcat sevrer log i am getting the message "rlog warning: Missing revision or branch number after -r"... (0 Replies)
Discussion started by: ganesh
0 Replies

3. UNIX Desktop Questions & Answers

audit to crontab scripts

hi, I have scripts which are running every 3 minutes. The scripts include connection to a database, using sqlplus. Sometimes, the connection fails (invalid username or password, locked user etc..) and the connection returns the error code, to the unix screen or to a file. I want whenever there's... (2 Replies)
Discussion started by: krem
2 Replies

4. Shell Programming and Scripting

daily backup scripts.....

I want a script which zip the file older than 15 days and move the file to a particular folder...... That script want to run daily.......... Please provide me the script for doing that.....I am very poor in scripting.... (1 Reply)
Discussion started by: jayaramanit
1 Replies

5. Shell Programming and Scripting

Backup/restore scripts

hi people i am in need of some assistance here hoping to star a linux course in january to wanted to get some experiance before starting so got a hold of some old assessments from a mate at college so just working through them in my spare time for the past 8 weeks or so and this is the final ? that... (2 Replies)
Discussion started by: boabbyrab
2 Replies

6. Shell Programming and Scripting

Scripts not nunning in CRONTAB

hi, i need to run one script in cron... in that script has connect antoher server and doing sftp for file transfer to another script. and going to be run another script in another server ssh ravikus\@server2 /export/home/ravikus/scripts/GetDetailsC2b.sh it is work fine when i run... (6 Replies)
Discussion started by: rsivasan
6 Replies

7. AIX

about backup with crontab

dear all! i'm a newbie to this forum as well as aix. i'm using aix version 6.1 by ssh remote with no GUI. i'm using crontab for scheduling backup with "backup" command too. i've created an entry in crontab file to backup some files daily. everything works well. but i've got a question: how can... (8 Replies)
Discussion started by: unknown_man
8 Replies

8. Solaris

Automatic backup through DD and crontab

Hi, I have not been working with Solaris for more than 10 years ago. Many things and details have ben forgotten. Hopes that some could help me with the problem. We used this scripts (below) for daily backup. The problems is following: I want to backup all partions/slice on a specific... (4 Replies)
Discussion started by: gjh
4 Replies

9. UNIX for Dummies Questions & Answers

Help with Crontab and Scripts

I'm trying to create a crontab that runs every hour and runs a script in my $HOME/bin directory. Everytime it goes to run it I get this mail. Message 14: From root@xx.xxxx.edu Thu Apr 12 14:03:01 2012 Return-Path: <root@xx.xxxx.edu> X-Original-To: bbowers Delivered-To:... (4 Replies)
Discussion started by: bbowers
4 Replies

10. UNIX for Advanced & Expert Users

Backup of crontab itself

Hi all What is the best way of making backups (daily or week basis) of a crontab file? Scenario: one userid, acessed by a number of analysts, that has a crontab file contantly updated. It's a large file, with hundreds of entries. Sometimes somebody deletes an entry that shoudn't be deleted.... (2 Replies)
Discussion started by: kzpchn
2 Replies
CRONTAB(1)						      General Commands Manual							CRONTAB(1)

NAME
crontab - maintain crontab files for individual users (ISC Cron V4.1) SYNOPSIS
crontab [-u user] file crontab [-u user] [-l | -r | -e] DESCRIPTION
Crontab is the program used to install, deinstall or list the tables used to drive the cron(8) daemon in ISC Cron. Each user can have their own crontab, and though these are files in /var, they are not intended to be edited directly. If the cron.allow file exists, then you must be listed therein in order to be allowed to use this command. If the cron.allow file does not exist but the cron.deny file does exist, then you must not be listed in the cron.deny file in order to use this command. If neither of these files exists, only the super user will be allowed to use this command. If the -u option is given, it specifies the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines "your" crontab, i.e., the crontab of the person executing the command. Note that su(8) can confuse crontab and that if you are running inside of su(8) you should always use the -u option for safety's sake. The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename ``-'' is given. The -l option causes the current crontab to be displayed on standard output. The -r option causes the current crontab to be removed. The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically. SEE ALSO
crontab(5), cron(8) FILES
/etc/cron.allow /etc/cron.deny STANDARDS
The crontab command conforms to IEEE Std1003.2-1992 (``POSIX''). This new command syntax differs from previous versions of Vixie Cron, as well as from the classic SVR3 syntax. DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line. AUTHOR
Paul Vixie <vixie@isc.org> 4th Berkeley Distribution 29 December 1993 CRONTAB(1)
All times are GMT -4. The time now is 06:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy