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.
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.
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)?
Have you thought of scheduling a cron job for this?
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???
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:
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