Using Omniback Commands

If you’re fed if with the GUI or maybe stuck on a character base terminal or perhaps you’re just eccentric. Whatever, below are some command line based examples of using Omniback

First things first, how do you know omiback is actually running? The command tells you this. For example:


Now it’s running we may as well carry out it’s primary function, perform a backup. omnib is used for this, e.g.


We’ve been doing our backups but now’s the moment of truth, someone wants something restored. omnir is used to do this. However, first we need to determine what tape to use. omnistat and/or omnidb can be used for this….

  1. Find out the correct tape as follows:

    omnistat -previous -since YY/MM/DD - all sessions since date omnistat -previous -until YY/MM/DD - all sessions up to date omnistat -previous -last number - the last number of sessions

  2. from this a list of session ids is provided. To check these:

    omnidb -session SESSIONID -detail - tells you what’s on the tape


    omnidb -session -datalist NAME -since< YY/MM/DD - will supply sessions for the datalist specified since the date specified. The -detail option can be used with this command.

  3. So, now we know the session ID of the tape, we can do the restore:

    omnir -filesystem server:/ -full -session SESSIONID -tree /usr - performs a full restore of /usr (i.e. from the last full backup plus any incrementals done since)

    omnir -omnidb server:/ -session SESSIONID -into /tmp_location - restores the omniback database into the specified location (can’t directly restore back into database)

  4. omnimnt - can be used to confirm or cancel any mount requests.


So you’ve kicked off the restore and it’s happily chugging away when the hideous reality of the situation dawns on you, you’ve typed in the command wrong and it’s restoring the wrong files. Oh well, you never liked the job anyway but maybe you can retrieve the situation if you stop the session now. This is where omniabort comes in.

Setting up a new backup

The command line method of setting a new backup form scratch is:

  1. omnidownload/omniupload - can be used to create a new device if required. A database entry is downloaded to an ASCII file, edited and uploaded.

  2. omnimm -create_pool name “class” strict 12 100 - will create a new tape pool called name of type class with a strict allocation policy with the media to be kept for 12 months or 100 overwrites

  3. omniminit -init device label -force -pool poolname - will initialise media in drive device with a label or label in pool poolname

  4. A datalist /etc/opt/omni/datalist will need creating, e.g. copy and edit an existing datalist file.

  5. omnicreatedl -datalist NAME -host hostname -device device_name - will create a datalist entry

  6. omnist/omniver - can be used to check the media. The first checks displays the contents, the later verifies the data in the medium

  7. omnimcopy - can be used to copy media

Database commands

You never know, you may want to manipulate the database. These tools are only available on the command line.