Computing.Net > Forums > Linux > backup a cron job

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

backup a cron job

Reply to Message Icon

Name: Rodrigo (by rslrdx)
Date: March 21, 2007 at 11:45:07 Pacific
OS: redhat 7.3
CPU/Ram: 1.3MHZ 512MB
Product: Home built
Comment:

How can I backup a cron job? i dont want to create a cron job to backup something... i want to backup the cron job itself, just the settings to have crontab execute that job.

Thank you.




Sponsored Link
Ads by Google

Response Number 1
Name: ernie
Date: March 21, 2007 at 17:55:53 Pacific
Reply:

You can copy the file that contains your cron jobs to a backup location easily enough. The files that contain your cron jobs are located at /var/spool/cron/$USER (e.g.: If I have a user account 'joe' on my system, joe's cron job file would be /var/spool/cron/joe).

/var/spool/cron is accessible only by the root user. In KDE, open a terminal window, su to root, start the file manager (konqueror -profile filemanagement), navigate to /var/spool/cron and copy the file to the backup location of your choice.

You can also switch to a console screen, log in as root, and copy it:

cp /var/spool/cron/joe /home/joe/joe

Or you can use the Midnight Commander (mc).

If you are smart enough to do regular backups, you can include /var/spool/cron in your system wide incremental back up routine.

HTH,

Ernie Registered Linux User 247790
ICQ 41060744


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: backup a cron job

Cron jobs problem www.computing.net/answers/linux/cron-jobs-problem/21299.html

FTP as Cron Job www.computing.net/answers/linux/ftp-as-cron-job/7821.html

cron job to check and restart named www.computing.net/answers/linux/cron-job-to-check-and-restart-named/24567.html