UNSOLVED

Trekk1

updated

19 years ago

T

Trekk1

1 Rookie

•

48 Posts

0

1743

July 31st, 2007 06:00

Nsrclone

I actually have got 5 savegroups, using each 1 or 2 media in their own specific pool

I wanna do an automatic clone of each savegroup each saturday night

if I check the "Clone" checkbox in savegroup property, what does this mean?
Will cloning happen everyday which is not what I want?


My problem is that my 5 savegroups take around 8 hours to finish (starting a 08:00 PM. )
I do not want to have cloning happen at the same time and delay backup which will continue during work hours.

Should I use a script with nsrclone?
Is there a way to dynamically clone a media belonging to a savegroup without using the volume barcode name? (I do not want to modify the script every week)
  • Trekk1

    1 Rookie

    •

    48 Posts

    891

    0

    Posted July 31st, 2007 06:00

    No way to do the same thing as checking the "clone" checkbox in group property but telling Networker to do the clone only after 11:00PM for example?

    If he does the clone at the same time he backup, my backup will take too much time and will not be finished when work hours begins which is not good :(

    Do you know where I can find some example scripts ?

    (you are a great help for me, you are always responding to all my threads :) )
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    891

    1

    Posted July 31st, 2007 06:00

    if I check the "Clone" checkbox in savegroup
    property, what does this mean?

    It means it will clone upon backup has finished. Check nsr_group manual or online help in NMC.

    Will cloning happen everyday which is not what I
    want?

    Yes.

    Should I use a script with nsrclone?

    Yes.

    Is there a way to dynamically clone a media belonging
    to a savegroup without using the volume barcode name?
    (I do not want to modify the script every week)

    Use mminfo to generate ssid list according to your preferences.
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    891

    0

    Posted July 31st, 2007 06:00

    No way to do the same thing as checking the "clone"
    checkbox in group property but telling Networker to
    do the clone only after 11:00PM for example?

    No. NetWorker via GUI enables you to run cloning and by design that will happen after your group has finished. If you wish to change it you can of course, but it will require using CLI.

    If he does the clone at the same time he backup, my
    backup will take too much time and will not be
    finished when work hours begins which is not good :(

    Clone during the day then - use CLI to make it automatic.

    Do you know where I can find some example scripts ?

    I have no idea, but script is nothing but calling mminfo to generate ssid list and putting that into some file. That file is that called by nsrclone. Check manuals for both and give it a try manually. When you get desired result make it as script and call it from external scheduler whenever you want.
  • pgerke

    35 Posts

    891

    1

    Posted July 31st, 2007 11:00

    Hrvoje has already provided the answer, but I might be able to help with the scripting examples if your environment is unix. If you are interested in pursuing this, please reply and let me know.

    My experience with creating scripts to automatically clone in the 7.2.1 environment is:
    1. Be very careful with mminfo. I have found that if you don't use the -t option to set the time frame, then the mminfo output did not always provide the desired savesets/volumes. I use -t "today" to get the volumes that have been written to today, but my backups start after midnight. Since it sounds like you start your backups at 8 PM, you could start testing with: mminfo -t "yesterday 20:00" and see if that selects the correct volumes/savesets.

    2. If your devices are restricted as to which pools they can mount, you should premount the source tape to an appropriate drive because the nsrclone command seems to result in the tape being loaded into any available drive, which may or may not be one allowed to mount that pool. I grab the last device used for the volume from the daemon.log file and premount the tape there:
    nsrjb -lf "device_name" "source_volume_name"

    3. To speed up your cloning, clone an entire volume rather than by save sets. I use:
    nsrclone -vb "Clone_pool" "source_volume_name"


    I hope this helps, and, as I said, if you are using Unix and are interested, I can provide more about how I create the source_volume_list and/or pull out the correct device_name for tape premounting. Just reply and let me know.

    Good Luck,
    Paul
    M-F 8:30-5 PDT
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    891

    0

    Posted July 31st, 2007 17:00

    2.

    I usually address that by setting up read hostname parameter.

    3. To speed up your cloning, clone an entire volume
    rather than by save sets. I use:
    nsrclone -vb "Clone_pool" "source_volume_name"

    Actually it depends on number of savesets and their size so script is always site customized. Ideally script should sort ssids in a way to handle ssids not spanning tapes first and then those spanning. If you scripts takes into account number of drives you must pay attention to that.
  • ble1

    6 Operator

    •

    14354 Posts

    •

    56186 Points

    891

    0

    Posted August 1st, 2007 03:00

    That approach has a small problem. Imagine you have volume 000A. Now you run cloning and you have cloned data from 000A. On next day that volume is used again for new data. If you run cloning now again in a way you do you will clone AGAIN already cloned data.
  • Trekk1

    1 Rookie

    •

    48 Posts

    891

    0

    Posted August 1st, 2007 03:00

    In fact, I am on a windows environment

    I writed a very simple batch file which seems to do the job
    It list all media actually in library which belongs to pool I wanna clone
    It write it to a file
    I launch nsrclone to clone all media listed in file to default clone

    mminfo -r "volume" -q location=NAMEOFMYLIBRARY -q pool=Pool1 -q pool=Pool2 -q pool=Pool3 -q pool=Pool3 -q pool=Pool4 -q pool=Pool5 > liste.txt

    nsrclone -v -b "Default Clone" -f liste.txt
  • mllegato

    20 Posts

    891

    0

    Posted August 1st, 2007 07:00

    The problem which Hrvoje mentioned, can be corrected by adding
    -t'last day'
    condition to your "mminfo" query. It'll display only the savesets made on last day.
    read the manpage on mminfo for other options to specify time (like 'last week' which seems to fit your bill)

    Message was edited by:
    Dmitri Ryjikh
  • Trekk1

    1 Rookie

    •

    48 Posts

    475

    0

    Posted August 1st, 2007 08:00

    You are right

    But it think it will not be a problem as I will do only clone one time per week, and cloned media will be taken to storage in bank.
    So I won't clone same data again
  • mllegato

    20 Posts

    149

    0

    Posted August 1st, 2007 08:00

    Well, practically - it'll work, since there's no tapes older then a week in the library, but I'd still add this condition just to make things last week'

    It won't hurt but your script will look more professional, imho