aboutsummaryrefslogtreecommitdiff
path: root/lib/App/Beam/Backup.pm
blob: 78e62f4bec8b033ec47ff4859dd2cd7669477ba2 (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
package App::Beam::Backup;

use strict;
use Carp;

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

use Unix::Sysexits;

sub run {
    my $self = shift;

    shift; # Skip subcommand name
    $self->abend(EX_USAGE, "bad number of arguments") if @_;

    $self->lock();
    foreach my $item (split /\s+/, $self->get('core.items')) {
	my $backend = $self->{backend}{$self->get("item.$item.backend")};
	$backend->backup($item);
    }
    $self->unlock();
}

1;

Return to:

Send suggestions and report system problems to the System administrator.