143 |
|
|
144 |
my $where = ''; |
my $where = ''; |
145 |
my @data; |
my @data; |
146 |
if ($host_id && $share_id && $num) { |
if (defined($host_id) && defined($share_id) && defined($num)) { |
147 |
$where = qq{ |
$where = qq{ |
148 |
WHERE |
WHERE |
149 |
hosts.id = ? AND |
hosts.id = ? AND |
256 |
|
|
257 |
|
|
258 |
## update index ## |
## update index ## |
259 |
if (($opt{i} || $opt{j} || ($index_path && ! -e $index_path)) && !$opt{c}) { |
if (($opt{i} || $opt{j} || ($index_path && ! -e $TopDir . $index_path)) && !$opt{c}) { |
260 |
# update all |
# update all |
261 |
print "force update of HyperEstraier index "; |
print "force update of HyperEstraier index "; |
262 |
print "importing existing data" unless (-e $index_path); |
print "importing existing data" unless (-e $TopDir . $index_path); |
263 |
print "by -i flag" if ($opt{i}); |
print "by -i flag" if ($opt{i}); |
264 |
print "by -j flag" if ($opt{j}); |
print "by -j flag" if ($opt{j}); |
265 |
print "\n"; |
print "\n"; |
310 |
size bigint not null, |
size bigint not null, |
311 |
inc_size bigint not null default -1, |
inc_size bigint not null default -1, |
312 |
inc_deleted boolean default false, |
inc_deleted boolean default false, |
313 |
|
parts integer not null default 1, |
314 |
PRIMARY KEY(id) |
PRIMARY KEY(id) |
315 |
); |
); |
316 |
|
|
343 |
); |
); |
344 |
|
|
345 |
create table archive_burned ( |
create table archive_burned ( |
346 |
archive_id int references archive(id), |
archive_id int references archive(id), |
347 |
date date default now(), |
date timestamp default now(), |
348 |
iso_size int default -1 |
part int not null default 1, |
349 |
|
copy int not null default 1, |
350 |
|
iso_size bigint default -1 |
351 |
); |
); |
352 |
|
|
353 |
|
create table backup_parts ( |
354 |
|
id serial, |
355 |
|
backup_id int references backups(id), |
356 |
|
part_nr int not null check (part_nr > 0), |
357 |
|
tar_size bigint not null check (tar_size > 0), |
358 |
|
size bigint not null check (size > 0), |
359 |
|
md5 text not null, |
360 |
|
items int not null check (items > 0), |
361 |
|
date timestamp default now(), |
362 |
|
primary key(id) |
363 |
|
); |
364 |
}); |
}); |
365 |
|
|
366 |
print "creating indexes: "; |
print "creating indexes: "; |
379 |
files:size |
files:size |
380 |
archive:dvd_nr |
archive:dvd_nr |
381 |
archive_burned:archive_id |
archive_burned:archive_id |
382 |
|
backup_parts:backup_id,part_nr |
383 |
)) { |
)) { |
384 |
do_index($index); |
do_index($index); |
385 |
} |
} |