- for my $suf (qw(.pipe.lock -journal)) {
- my $orig = "$old/over.sqlite3$suf";
- link($orig, "$new/over.sqlite3$suf") and next;
- next if $!{ENOENT};
- die "failed to link $orig => $new/over.sqlite3$suf: $!\n";
+ my $over = "$old/over.sqlite3";
+ if (-f $over) {
+ require PublicInbox::Over;
+ $over = PublicInbox::Over->new($over);
+ $over->connect->sqlite_backup_to_file("$new/over.sqlite3");