NAME

Backup::Omni::Restore::Filesystem::Single - Restore a single file using a "filesystem object"

SYNOPSIS

use Backup::Omni::Session::Result;
use Backup::Omni::Session::Convert;
use Backup::Omni::Session::Monitor;
use Backup::Omni::Session::Filesystem;
use Backup::Omni::Restore::Filesystem::Single;

my $session = Backup::Omni::Session::Filesystem->new(
    -host => 'esd189-aix-01',
    -date => '2013-01-10'
);

my $restore = Backup::Omni::Restore::Filesystem::Single->new(
    -host    => 'esd189-aix-01',
    -from    => '/archive/pwsipc/pwsipcs.130110_002319.db',
    -to      => '/import01/pwsipc/pwsipcs.130110_002319.db',
    -target  => 'wem-lmgt-02',
    -session => $session->sessionid
);

my $temp = $restore->submit;
my $jobid = Backup::Omni::Session::Convert->convert(-session => $temp);
my $monitor = Backup::Omni::Session::Monitor->new(-session => $jobid);

while ($monitor->running) {

    $device = $monitor->device;
    printf("saveset positon: %s", $device->done);

    sleep(10);

}

my $result = Backup::Omni::Session::Result->new(-session => $jobid);
printf("the restore finished with a status of: %s\n", $result->status);

DESCRIPTION

This module will restore a single file from a HP DataProtector "filesystem object" using the cli command omnir with the appropiate options. The above is a complete script to restore a single file without any error checking.

METHODS

new

This method will initialize the object. It takes four parameters.

-host

The name of the host that the backup was performed on.

-session

The session id of the backup.

-target

The target system to restore the file too.

-from

The name of the file to restore.

-to

The name of the restored file.

-path

The path on the host that was backed up. Defaults to "/archive".

-label

The label that was defined for this backup. Defaults to "/archive".

submit

Submit the restore job to DataProtector. If successful, it will return a temporary session id, otherwise an exception is thrown.

SEE ALSO

Backup::Omni::Base
Backup::Omni::Class
Backup::Omni::Utils
Backup::Omni::Constants
Backup::Omni::Exception
Backup::Omni::Session::Filesystem
Backup::Omni::Session::Messages
Backup::Omni::Session::Monitor
Backup::Omni::Session::Results

AUTHOR

Kevin L. Esteb, <kesteb@wsipc.org>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by WSIPC

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.