Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
Absent Member.. jomaltster Absent Member..
Absent Member..
1007 views

Copy sessions via cli

Hi,

 

I need to copy for example 5 sessions to one medium from command line, how it should look. Is it posible to do copy of several sessions at one time.

0 Likes
3 Replies
Bob_Clark Absent Member.
Absent Member.

Re: Copy sessions via cli

There are different type of 'Copy' operations,

 

   - 'omnimcopy' is pretty much a dumb copy from one media to another

   - 'omniobjcopy' lets you copy from individual sessions

 

It will be much easier if you can create the Object Copy in the GUI, and save it as a filename, because trying to run the entire Object Copy from the command line is very difficult, and can be prone to syntax errors

 

If you are able to create the Object Copy in the GUI, then, to run it from the command line:

 

     omniobjcopy -copylist "[name]" -scheduled                                 for a scheduled Object Copy

or

     omniobjcopy -copylist "[name}" -postbackup  -session [session_id]        Do not include the [   ] marks

 

where [name] is the name of the Copy List, and the " marks are required if the Copylist name has any 'spaces' in it

 

If you don't have the Object Copy created, the task becomes much more complex

 

  omniobjcopy [Object Name] -session [session_id] -sourcedevice [logical_Device] -targetdevice [logical device]

     -dynamic [min] [max] -targetprotect [protection level]

 

and the list of options goes on and on.  I would encourage you to check the Command Line Guide, which you can find by, in the GUI, click Help -> Guides, and look for 'Command Line Interface Reference' (you will need to have Adobe Acrobat installed to view the Guides, expand 'Section 1' and click on 'omniobjcopy'

 

Probably the place where you wil have the most trouble is in defining the Object name.  You can get the session ID of the backup session and run

     omnidb -session [session_id] -detail

 

This type of Object Copy has to be done on an Object by Object level, and on a Session by Session basis.   The documentation seems to suggest that you can combine several different objects and sessions into one Object Copy operation

 

Example 1

omniobjcopy -winfs system.company.com:/C 'Object1' -session

2011/04/01-3 -targetdevice 'DEV1' -recycle -winfs

systems.company.com:/C 'Object2' -session 2011/04/25-9 -targetdevice

'DEV1'

 

or, splitting it for clarity

 

omniobjcopy

   -winfs system.company.com:/C 'Object1' -session 2011/04/01-3 -targetdevice 'DEV1' -recycle

   -winfs systems.company.com:/C 'Object2' -session 2011/04/25-9 -targetdevice 'DEV1'

0 Likes
Absent Member.. jomaltster Absent Member..
Absent Member..

Re: Copy sessions via cli

Thank you for your response, as I undestood we need to write script specifing objects too, not only session id.

0 Likes
Bob_Clark Absent Member.
Absent Member.

Re: Copy sessions via cli

That is correct, I would recommend that the script be assembled and tested in pieces, rather t5han trying to write the entire script in one sitting

 

One thing to be conscious of when writing a command or a script it the format fo the Object part.  The Object name consists of

 

    Hostname:Mountpoint 'Descriptor'

 

and this depends very much on what type of system was backed up, in terms of a file system backup.  If it was a UNIX-based system, the type of Object is 'filesystem' so the Object would look like

 

      -filesystem hostname:mountpoint 'descriptor'

 

so, for example

 

       -filesystem mysys.hp.com:/tmp 'Monday tmp'

 

while, if the Object was Windows, it would look like

 

     -winfs mysys.hp.com:/D "Monday D-drive"

 

Notice that when doing an Object Copy of UNIX, single quotes are used, but an Object name of a Windows Copy needs double-quotes

 

This is where the output from 'omnidb -session -detail' can really help you

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.