aboutsummaryrefslogtreecommitdiff
path: root/lib/App/Beam/Backup.pm
blob: c2da25402774fcb1ffbddedf95a3bae0ec3b0473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package App::Beam::Backup;

use strict;
use Carp;

require App::Beam;
our @ISA = qw(App::Beam);

use Unix::Sysexits;

=head1 NAME

beam backup - create new backup

=head1 SYNOPSIS

B<beam> [I<OPTIONS>] B<backup>

=head1 DESCRIPTION

=head1 OPTIONS

=over 4
    
=item B<-h>

Print a short help summary.

=item B<--help>

Display manpage.

=item B<--usage>

Print a short command line usage reminder.    

=back

=cut    

sub run {
    my $self = shift;

    #GetOptionsFromArray(\@_, ...);
    my @items = $self->check_items(@_);

    foreach my $item (@items) {
	my $backend = $self->{backend}{$self->get("item.$item.backend")};
	$self->{history}->top->begin_entry($item);
	$self->{history}->top->finish_entry($item, $backend->backup($item));
    }
}

1;

Return to:

Send suggestions and report system problems to the System administrator.