Crontab backup | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Crontab backup

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-18-2005
blackeyed blackeyed is offline
Registered User
 
Join Date: Mar 2005
Last Activity: 9 October 2010, 6:56 AM EDT
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old 08-18-2005
infierno's Avatar
infierno infierno is offline
Registered User
 
Join Date: Jul 2005
Last Activity: 19 April 2008, 5:41 PM EDT
Location: Asuncion, Paraguay
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb

CRONTAB(1) FreeBSD General Commands Manual CRONTAB(1)

NAME
crontab
-- maintain crontab files for individual users (V3)
SYNOPSIS
crontab
[-u user] file
crontab [-u user] { -l | -r | -e }
... Did you try crontab(1)?
Sponsored Links
    #3  
Old 08-18-2005
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
AFK
 
Join Date: Dec 2004
Last Activity: 28 July 2014, 9:39 AM EDT
Location: UK
Posts: 2,351
Thanks: 0
Thanked 6 Times in 6 Posts
Quote:
Originally Posted by blackeyed
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.
Have you thought of scheduling a cron job for this?
    #4  
Old 08-22-2005
eozcan eozcan is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 20 August 2008, 2:23 AM EDT
Location: Ankara/Turkey
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
crontab backup

you can edit crontab file >(crontab -e) command...but if you want to take oracle backup you must stop oracle after start backup...are your backup ufsdump backup???
Sponsored Links
    #5  
Old 08-22-2005
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
AFK
 
Join Date: Dec 2004
Last Activity: 28 July 2014, 9:39 AM EDT
Location: UK
Posts: 2,351
Thanks: 0
Thanked 6 Times in 6 Posts
I think that the OP wants to backup the crontab files for every user every day. This would be as simple as doing a 'cp -p' of the crontab files. Use the following script:


Code:
today=$(date +%Y%m%d)
mkdir /some_backup_dir/$today
cp -p /var/spool/cron/crontabs/* /some_backup_dir/$today

Maintain the following cron entry in root's crontab:

00 01 * * * /full_path_of_script/whatever_you_call_this_script
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment? MVEERA Shell Programming and Scripting 0 11-23-2011 11:27 AM
Automatic backup through DD and crontab gjh Solaris 4 05-17-2011 12:13 PM
about backup with crontab unknown_man AIX 8 10-29-2010 03:03 AM
copy crontab file from backup server njoroge SCO 4 06-18-2010 12:37 PM
Check backup file size on backup tape ayhanne UNIX for Dummies Questions & Answers 0 10-25-2007 11:41 AM



All times are GMT -4. The time now is 01:31 PM.