Backup::Omni::Restore::Filesystem::Single - Restore a single file using a "filesystem object"
use Backup::Omni::Session::Result; use Backup::Omni::Session::Monitor; use Backup::Omni::Utils 'convert_id'; 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 = convert_id($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);
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.
This method will initialize the object. It takes four parameters.
The name of the host that the backup was performed on.
The session id of the backup.
The target system to restore the file too.
The name of the file to restore.
The name of the restored file.
The path on the host that was backed up. Defaults to "/archive".
The label that was defined for this backup. Defaults to "/archive".
Submit the restore job to DataProtector. If successful, it will return a temporary session id, otherwise an exception is thrown.
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
Kevin L. Esteb, <kesteb@wsipc.org>
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.
To install Backup::Omni, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Backup::Omni
CPAN shell
perl -MCPAN -e shell install Backup::Omni
For more information on module installation, please visit the detailed CPAN module installation guide.