+if ($backup) {
+ my @oceans= $alloceans ? (sort keys %oceans) : @specoceans;
+ foreach my $ocean (@oceans) {
+ print "## database backup for $ocean\n";
+ db_setocean($ocean);
+ db_writer();
+ db_connect();
+ $dbh->selectall_arrayref("SELECT * FROM commods WHERE commodid=1");
+ my $src= db_filename();
+ my $dst= $src; $dst =~ s,.*/,,; $dst= "$rsyncdir/$dst";
+ copy($src,"$dst.tmp") or die "$src -> $dst.tmp $!";
+ rename("$dst.tmp",$dst) or die "$dst.tmp -> $dst $!";
+ $dbh->rollback();
+ }
+} elsif (@specoceans) {