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

omnisv.sh

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

  • omnisv.sh -status - tells you if omniback is running
  • omnisv.sh -start - if it isn't, this starts it
  • omnisv.sh -stop - and this stops it

omnib

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

  • omnib -device DEV -filesystem server:/ label -tree /usr -compress - will

backup to DEV filesystem /usr on hostname server moumted at mount point / , giving the backup a label of label

  • omnib -omnidb server:/ label -device DEV

will backup the actual omniback databse (indicated by -omnidb). For recovery purposes it is important to use this form of the backup for the database.

  • omnib -datalist NAME -mode Full

Perform the backup using a predefined datalist.

  • omnimnt

can be used to confirm or cancel any mount requests.

omnir

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:
        o omnistat -previous -since YY/MM/DD - all sessions since date
        o omnistat -previous -until YY/MM/DD - all sessions up to date
        o omnistat -previous -last number - the last number of sessions
 2. from this a list of session ids is provided. To check these:
        o omnidb -session SESSIONID -detail - tells you what's on the tape
          Alternatively
        o 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:
        o 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)
        o 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.

omniabort

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.

  • omnistat -mount - will tell you the sessions currently running
  • omniabort -session SESSIONID - will kill off the session (works for

backups and restores)

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.

  • omnidownload/omniupload - can be used to modify entries in the database. Entries are downloaded into an ascii file where they can edited and uploaded
  • omnidbcheck - checks the database consistency
  • omnidbutil - is a database configuration tool e.g. increasing database size
  • omnidbinit - initialises the database, but don't do this unless you don't mind loosing everything

Recent Changes