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,
|
`host` varchar(255) default NULL,
|
||||||
`dir` text,
|
`dir` text,
|
||||||
`options` text,
|
`options` text,
|
||||||
|
active tinyint not null default 1,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
|
@ -9,7 +9,8 @@ create table filesets (
|
||||||
id serial primary key,
|
id serial primary key,
|
||||||
host varchar,
|
host varchar,
|
||||||
dir varchar,
|
dir varchar,
|
||||||
options varchar
|
options varchar,
|
||||||
|
active boolean not null default 't'
|
||||||
);
|
);
|
||||||
|
|
||||||
create table files (
|
create table files (
|
||||||
|
|
|
@ -121,6 +121,13 @@ sub new {
|
||||||
grep { $id == $_ } @{ $opt->{filesets} }
|
grep { $id == $_ } @{ $opt->{filesets} }
|
||||||
} @{ $self->{targets} }
|
} @{ $self->{targets} }
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
$self->{targets} =
|
||||||
|
[
|
||||||
|
grep {
|
||||||
|
$_->{active};
|
||||||
|
} @{ $self->{targets} }
|
||||||
|
];
|
||||||
}
|
}
|
||||||
if ($ENV{HOME} =~ m{([/\w]*)}) {
|
if ($ENV{HOME} =~ m{([/\w]*)}) {
|
||||||
if (-f "$1/.ssh/id_rsa") {
|
if (-f "$1/.ssh/id_rsa") {
|
||||||
|
|
Loading…
Reference in New Issue