Highlighted
Lieutenant Lieutenant
Lieutenant
1269 views

Media object copy from command line; how?

I wrote a script that selects from all protected media those who have less than 50% of the used capacity protected (Data Protector cannor do that!). Now I'd like to create a media object copy job by script that copies all the protected objects form the media found in the previous step to another media (to free the source media completely).

It seems to me I can only run such a copy interactively from the GUI (or the manual pages are way too incomplete).

Can anybody tell me how to start such a command from command line? I'm using Linux for the Cell Manager...

0 Likes
6 Replies
Micro Focus Expert
Micro Focus Expert

Hi Ulrich,

please refer to the CLI reference guide (CLIReference.pdf in the Docs folder). It contains details on the omniobjcopy command that can be used for Object Copy in a script.

Please use the Accept Solution button next to my post and assign a KUDO (thumbs up icon) if this works for you.

Regards,
Sebastian Koehler

---
Please use the Like button below, if you find this post useful.
0 Likes
Highlighted
Lieutenant Lieutenant
Lieutenant

When I wrote "or the manual pages are way too incomplete" please don't just tell me to read the manual page when you don't know the solution!

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

The manual is not limited, it is the omniobjcopy command itself. Most of the Object Copy operations that can be executed from GUI can't be done from command line. If you're not able to make it work with the available command switches you need to run it from GUI. It is simple as this.

FYI, BRICK has a module called space claim. Not sure if it already generates the necessary omniobjcopy commands, but it might be worth looking into it.

Please use the Accept Solution button next to my post and assign a KUDO (thumbs up icon) if this works for you.

Regards,
Sebastian Koehler

---
Please use the Like button below, if you find this post useful.
0 Likes
Highlighted
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class


@Ulrich Windl wrote:

I wrote a script that selects from all protected media those who have less than 50% of the used capacity protected (Data Protector cannor do that!). Now I'd like to create a media object copy job by script that copies all the protected objects form the media found in the previous step to another media (to free the source media completely).


I reckon that's not explicitly provided by DP because it's a situation better to be avoided in the first place. It may build up occasionally by accident (wrong protection on some backups/copies, fixed later) or due to churn in long term protected media (objects were protected for years or even permanently, then some part of the objects became irrelevant and their protection was revoked or shortened). In such cases, the Interactive Copy GUI is usually enough to fix it. I would not go to the extreme of trying to automate this (except maybe when I inherit a heap of such media that grew out of bounds already, but not to be part of regular backup ops), instead to fix it at the source. Objects with different protections should funnel into different pools and if that means there are a lot of them, consider using a free pool to simplify the media lifecycle. Or unify the protections into less classes than you had before. Or both.


It seems to me I can only run such a copy interactively from the GUI (or the manual pages are way too incomplete).
Can anybody tell me how to start such a command from command line? I'm using Linux for the Cell Manager...


Ignoring the manpage for a second, I had a look into omniobjcopy -help and most of what I know from the GUI seems to be reflected there one way or another. So if you already have a list of objects you need to copy, the format

omniobjcopy [GeneralOptions] Object [Object] ... [Device] ...

looks quite right. You apparently have to know the individual object's type, name (a tuple specific to the type), session ID and ideally copy ID to make the selection unique, but that's not really different from the GUI methinks. What's missing?

HTH,
Andre.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert


@André Beck wrote:


Ignoring the manpage for a second, I had a look into omniobjcopy -help and most of what I know from the GUI seems to be reflected there one way or another.


Hi André,

you have to be very careful with the information provided by omniobjcopy -help. The synopsis is not as accurate as it seems. I had this once where I had to replicate all objects included in a session from a StoreOnce Catalyst store to another. If you know the source objects the command will work ok.

Please use the Accept Solution button next to my post and assign a KUDO (thumbs up icon) if this works for you.

Regards,
Sebastian Koehler

---
Please use the Like button below, if you find this post useful.
0 Likes
Highlighted
Lieutenant Lieutenant
Lieutenant

I'd be happy if someone does read what I wrote, or ask what he doesn't understand before giving wrong or not helpful answers: I know the name of a medium (label) with protected objects on it. I wnat to copy all protected objects from that medium to another medium, recycling the objects on the first medium, keeping the protection on the target medium. This is what intercative "media object copy" can do. Please read again before answering: "media object copy"

I started an interactive session from the GUI that does exactly what I want, the I observed the process lists on the cell manager and the media agnet hosts: I could not see the command that DP uses to do the media object copy; specifically not the "omniobjcopy"

The media agent process (bma) uses options like "-sessiontype 16" and "-operation 21". No idea what that means.

 

My script produces debug output like the following:

[2] reading output of '/opt/omni/bin/omnirpt -report media_list -class File -protection 6666 -tab'
[2] matching medium Jukebox2_11 File_Jukebox2_SAP 130629.00 MB -111.2 21.8
[1] 1 of 1 media selected
[1] matching media list: Jukebox2_11
[1] checking medium labeled Jukebox2_11
[2] reading output of '/opt/omni/bin/omnimm -list_media Jukebox2_11 -detail'
[2] 8 of 1076 objects protected (0%)
[2] 21807249 of 147481644 kB protected (14%)
[1] reorganize Jukebox2_11 140 0.15 0.01
[1] 1 of 1 media to reorganize: Jukebox2_11

So all I know is that the medium named Jukebox2_11 is to be reorganized (copyied, then recycled). Of course "media copy" is not what I want!

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.