UNSOLVED

gdd2

updated

10 years ago

G

gdd2

16 Posts

0

2118

June 13th, 2016 09:00

what is the easiest way to wait the end of a backup in a script

I use mccli to start a backup but I do not see any option which allows to wait the end of the backup (and to get back the error code if necessary !).

Is there some tools or predefined scripts to do that ?

  • mradamk

    215 Posts

    1374

    0

    Posted June 13th, 2016 18:00

    You need to capture the associated activity id# then establish a loop to query the status of it and take appropriate action accordingly.

    Sent from my iPhone

  • gdd2

    16 Posts

    1374

    0

    Posted June 14th, 2016 00:00

    Thank you, but is there anyone who can give an example of this script in Unix Shell.

  • mradamk

    215 Posts

    1374

    1

    Posted June 14th, 2016 21:00

    Try the following scenario

    1. issue-your-mccli-command > /tmp/check (save the activity-id# to a temp file or to a variable

    2. start a while loop

    3. mccli activity show $MCS_credentials --verbose=true --id=your-activity-id# (monitor the related activity-id by retrieving the activity status fields)

    4. interrogate the activity status values returned and break if it has ended or sleep and continue the loop

    5. report on the completion status of the activity

  • J_H_

    2 Intern

    •

    498 Posts

    1374

    0

    Posted June 16th, 2016 14:00

    My question to you is what are you really trying to do?

    because Avamar has a built in option where you can Run a scipt, do a backup, run a script.

    its called Pre-script and Post-script and you can catch the backup exit code in your post script.

    check out the extra options in the DATASET setup

  • gdd2

    16 Posts

    1374

    0

    Posted June 20th, 2016 05:00

    I have the following environment :

    All the batch processings are launched by an external scheduler.

    The backup is a part of these processing chains and must also been launched by the external scheduler.

    It is idea to use pre and post script to set flags... but I have a lot of server to backup (more than 100), so if I use scripts, I need to move these scripts to all the servers !

  • ionthegeek

    2 Intern

    •

    2049 Posts

    1374

    0

    Posted July 5th, 2016 12:00

    If you're going to use mccli for this I would strongly recommend installing mccli on an external system rather than running mccli on the utility node. Running lots of mccli commands on the utility node -- especially concurrently -- may use enough resources to have a negative impact on the operation of the Avamar system (e.g. it could crash or hang the MCS).