Add column active to mark filesets which should be backed up.
This can still be overridden with the filesets option.
This commit is contained in:
parent
6514b6cdb6
commit
f8ef39ae0f
|
@ -60,6 +60,7 @@ CREATE TABLE `filesets` (
|
|||
`host` varchar(255) default NULL,
|
||||
`dir` text,
|
||||
`options` text,
|
||||
active tinyint not null default 1,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
|
|
@ -9,7 +9,8 @@ create table filesets (
|
|||
id serial primary key,
|
||||
host varchar,
|
||||
dir varchar,
|
||||
options varchar
|
||||
options varchar,
|
||||
active boolean not null default 't'
|
||||
);
|
||||
|
||||
create table files (
|
||||
|
|
|
@ -121,6 +121,13 @@ sub new {
|
|||
grep { $id == $_ } @{ $opt->{filesets} }
|
||||
} @{ $self->{targets} }
|
||||
];
|
||||
} else {
|
||||
$self->{targets} =
|
||||
[
|
||||
grep {
|
||||
$_->{active};
|
||||
} @{ $self->{targets} }
|
||||
];
|
||||
}
|
||||
if ($ENV{HOME} =~ m{([/\w]*)}) {
|
||||
if (-f "$1/.ssh/id_rsa") {
|
||||
|
|
Loading…
Reference in New Issue