Unsolved
This post is more than 5 years old
91 Posts
0
2666
October 29th, 2013 07:00
DPN Crontab configuration for custom replication config
Do I have the correct syntax of the following dpn crontab line?
0 0 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl_cron --expert --flagfile=/usr/local/avamar/etc/repl_cron_daily.cfg
The white paper is ambiguous as to whether or not --expert and --flagfile flags should be apart of the crontab line or apart of the repl_cron script.
Thanks.
0 events found
No Events found!


J_H_
2 Intern
•
498 Posts
0
October 29th, 2013 14:00
1) my crontab entry does NOT have that
45 4 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl2_cron
2) neither of my files /usr/local/avaamr/etc/repl2_cron.cfg or /usr/local/avamar/bin/repl2_cron have that line in it.
but the bin/repl2_cron has a comment in it about using the --expert - mine just does not seem to.
3) I did not modify the main one (except to change what avamar domin it did - by excluding the ones I was making a special replicaiton for)
4) I was also told to not let them start at the same time.
5) for other it would be nice if you posted a link for the white paper you are reading
JWeinsheimer
91 Posts
0
October 29th, 2013 16:00
I'm working from the "EMC AVAMAR REPLICATION METHODS AND OPTIMIZATION STRATEGIES" which was provided by someone at EMC. I'm sure it can be found somewhere on EMC's support.emc.com maze.
The flags, supposedly, will allow the command to run with specified .cfg files without having to edit the repl_cron script directly.
ae86levin
70 Posts
0
October 29th, 2013 21:00
This is a cut and paste from my own documentation I created after setting up multi stream replication.
The section pasted below is the part on crontab - let me know if you wnat the rest of it?
I don't have the --expert flag either.
Modify the dpn crontab
About CRON – explained here: http://www.scrounge.org/linux/cron.html
Here is the format of a cron job file:
[min] [hour] [day of month] [month] [day of week] [program to be run]
Each field is defined as:
[min] Minutes that program should be executed. 0-59.
[hour] Hour that program should be executed on. 0-23. * for every hour.
[day of month] Day of the month that process should be executed on. 1-31. * for every day.
[month] Month that program whould be executed on. 1-12 * for every month.
[day of week] Day of the week. 0-6 where Sunday = 0, Monday = 1, Saturday = 6. * for every day of the week.
[program] Program to be executed. Include full path information.
For example in the cron shown below there are already two crons set to run. The MCS managed cron that runs at 19 (7pm) each night:
0 19 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl_cron
In the example above:
0 specifies that the cron runs at 0 mins – or on the hour.
19 specifes tha tit runs at 19 hours and the remaining *’s siginify that it runs daily – that is there are no settings to the contrary.
1) As user root on the utility node, to list the existing cron:
% crontab -u dpn -l
The existing crontab of an Avamar server that performs replication looks something similar to:
--BEGIN--
# DO NOT EDIT THIS FILE - edit the master and reinstall.
0 1 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl2_cron
# <<< END AVAMAR ADMINISTRATOR MANAGED ENTRIES >>>
# <<< BEGIN AVAMAR ADMINISTRATOR MANAGED ENTRIES -- DO NOT MANUALLY MODIFY >>>
0 19 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl_cron
# <<< END AVAMAR ADMINISTRATOR MANAGED ENTRIES >>>
2) As user root or dpn on the utility node, modify the crontab to add the additional replication.
To modify the dpn crontab as user root, use:
crontab -u dpn -e
The DPN crontab file is located at: /var/spool/cron/tabs/dpn
After the modifications, the crontab should look like:
--BEGIN--
0 1 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl2_cron
# <<< BEGIN AXION ADMINISTRATOR MANAGED ENTRIES -- DO NOT MANUALLY MODIFY >>>
0 10 * * * /usr/local/avamar/bin/cron_env_wrapper morning_cron_run
0 18 * * * /usr/local/avamar/bin/cron_env_wrapper evening_cron_run
0 0 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib//mcs_ssh_add repl_cron
# <<< END AXION ADMINISTRATOR MANAGED ENTRIES >>>
--END—
If you edit the cron any other way (ie gui text editor) it must be opened and saved using crontab -u dpn -e
Open using the above command and perform :w then :q (vi write and quit) to force the cron to be read into memory.
JWeinsheimer
91 Posts
0
October 30th, 2013 14:00
Gotta love when white papers and actual configs feature inconsistencies.
The --expert flag didn't work when replication ran last night so I'm just going to keep it simple and edit repl_cron to point to my customer .cfg file.