PDA

View Full Version : Migrate Export R75.10 Question



gbullock
2011-08-19, 13:38
Hello Everyone! I am trying to run migrate export through cron. Bottom line, it doesnt work. Our strategy is as follows: migrate export -n on Sat @ midnight, then do a backup (configured through backup command in CLI) on Sun @ midnight. We set the location of the migrate export file to be located in a directory that the backup (runs on Sunday 00:00) will pick it up. The backup on Sunday works fine, however the migrate export on Saturday does not. Not really sure where to start. Is there a log file for cron? This is a open management server running splat R75.10. Below are some outputs:

[Expert@mgt]# crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.26196 installed on Mon Jun 27 15:32:44 2011)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 0 * * 7 backup_util sched
0 0 * * 6 /opt/CPsuite-R75/fw1/bin/upgrade_tools/migrate export -n /opt/CPsuite-R75/fw1/conf/cpexport.tgz

[Expert@mgt]# backup -e
Current scheduler configuration:
Backup is scheduled at 00:00 every Sunday on SCP Server X.X.X.X.

alienbaby
2011-08-19, 17:26
1. I recommend you write a script to run this command; and
2. I recommend you do not deposit your backup into your conf directory. It might also be failing because you attempting to feed it a filename, instead of a destination directory.
3. mds_backup might be a better option for you, executed from within a script.

gbullock
2011-08-19, 17:36
What is the big deal with having it overwrite itself in the conf directory. What do you mean 'feed it a filename, instead of a destination directory', it needs a filename???

hvdkooij
2011-08-23, 03:20
There are a number of issues you have not (yet) taken into account:
1. The proper variables are not set yet unless you source the proper script first.
2. Some commands verify that they run interactively and will behave differently when run from a script. Including the (in)ability to overwrite an existing file whithout explicit confirmation.
3. If you overwrite the old backup then any failure during the backup results in you not having any backup at all.

These are just some of the things you need to think about.