EMC Avamar Replication manual cron job setup

First off let me say that the instructions in this post are not sanctioned by EMC or Myself so if you decide to follow them your on your own and can’t hold anyone liable but yourself. I encourage anyone needing to create a secondary replication cron to call EMC support. But if you know your way around linux and Avamar, plus you want to try it on your own here are some key steps that may help you out. Not being able to create multiple replication jobs in EMC Avamar Administrator was one of the things I pointed out in a previous post as a very big oversight on EMC’s part. As powerful as the solution is for data protection it’s lacking in some key areas. I needed to figure this out for myself so I watch EMC support as they did it for me over Webex and jotted down some notes. Its not terribly hard at all if you know your way around linux and Avamar 6.x.

Some reasons of why you might want to do this might be that:

  • You need to replicate certain clients to a different location than others.
  • You implemented replication after you’ve been running backups for awhile and this will speed up the all that built up data because the replication process only does one client at a time.
  • Maybe you’d like to migrate clients from one site to another so you setup a temporary replication cron job. This works really well for VM image backups.

Either way here are the steps that I’ve used to do this. This assumes that you currently only have a single replication cron job.

  1. ssh into the Avamar server as root. “ssh <avamarserver> -l root
  2. Then “cp -p /usr/local/avamar/bin/repl_cron /usr/local/avamar/bin/repl2_cron
  3. Then “vi /usr/local/avamar/bin/repl2_cron
  4. Under the “sub init” and “sub main” of the “repl2_cron” file replace the “repl_cron” text in with “repl2_cron” and also change “replicate” to “replicate2
  5. Save and exit the file.
  6. Now let’s edit the crontab for dpn so that the job can be scheduled.
  7. Type as root or dpn user “crontab -u dpn -e
  8. Copy the line all the way at the bottom of the file which looks like this “0 14 * * * /usr/local/avamar/bin/cron_env_wrapper /usr/local/avamar/lib/mcs_ssh_add repl_cron
  9. Paste it below the original line and change “repl_cron” to “repl2_cron
  10. Save and exit the file.
  11. Now lets create the configuration file for “repl2_cron
  12. As the admin user “cp -p /usr/local/avamar/etc/repl_cron.cfg /usr/local/avamar/etc/repl2_cron.cfg
  13. Now “vi /usr/local/avamar/etc/repl2_cron.cfg”
  14. Edit the file as needed and replace the line with “-workdir=/tmp/replicate” with “-workdir=/tmp/replicate2
  15. Only -include the clients that you intend to replicate and make sure that you -exclude them from the other “repl_cron” if necessary.
  16. The file will look similar to the one below.                                                                                         
  17. Save and exit the file.
  18. Now if you run “repl2_cron” from the command line the process should start with now errors.
  19. If you get errors make sure that your “repl2_cron.cfg” file has no spaces in the parameters ie. “-dstaddr= 10.15.118.121″ where there is a space between the = sign and the ipaddress. Something this simple will cause the process to fail.
  20. The process and errors will be shown in the Avamar Administrator, so you can get more information there as well.
Hopefully this helps. You will not be able to configure this additional replication from Avamar Administrator but hopefully EMC will add this type functionality from the GUI at some point.

 

EMC Avamar Replication manual cron job setup originally appeared on theHyperadvisor by Antone Heyward

Tags: , , ,

One Response to EMC Avamar Replication manual cron job setup

  1. Important Step on February 16, 2020 at 9:12 pm

    Great article, but there’s a missing step. After you make the cron changes, you have to modify usr/local/avamar/bin/dpncron.pm file to add ‘repl2_cron’ => ['repl2_cron'] or the script won’t run

Disclaimer:

The opinions expressed on this blog are solely those of the individual that left it, and do not reflect the opinions of their employer.