Medium sized Internalization made by flattener against megalog-2018-06-29
[andk-cpan-tools.git] / bin / testing-rmirror-k75-k81.pl
blobc5767267a4792c1eaac4eaf1a3717c928fd5178a
1 #!perl
4 =head1 NAME
6 testing-rmirror-k75-k81 -
8 =head1 SYNOPSIS
12 =head1 DESCRIPTION
14 We like to call it as root and not with sudo because of strange
15 permission problems on the .perldb file.
17 /usr/local/perl-5.10-uld/bin/perl -I /home/k/sources/rersyncrecent/lib -d /home/k/sources/CPAN/andk-cpan-tools/bin/testing-rmirror-k75-k81.pl
19 =cut
22 die "obsolete";
23 $ENV{USER}="sandy";
24 $ENV{RSYNC_PASSWORD} = "VteTseXA"; # password published knowingly
26 use strict;
27 use File::Rsync::Mirror::Recent;
28 my @rrr = map {
29 my $statusfile = "/root/rmirror-status-$_.state";
30 my $r;
31 if (0 && -f $statusfile) { # 0 && because it's not yet tested 2009-04-25 akoenig
32 $r = File::Rsync::Mirror::Recent->thaw ( $statusfile );
33 } else {
34 $r = File::Rsync::Mirror::Recent->new
36 ignore_link_stat_errors => 1,
37 localroot => "/home/ftp/pub/PAUSE/$_",
38 max_files_per_connection => 22501,
39 remote => "192.168.2.101::PAUSE/$_/RECENT.recent",
40 tempdir => "/home/ftp/tmp",
41 ttl => 10,
42 rsync_options =>
44 # port => 8732,
45 # compress => 1,
46 links => 1,
47 times => 1,
48 timeout => 600,
49 checksum => 0,
50 'omit-dir-times' => 1, # not available before rsync 3.0.3
52 verbose => 1,
53 # verboselog => "/var/log/rmirror-k75-k81.log",
54 _runstatusfile => $statusfile,
57 $r;
58 } "modules", "authors";
59 die "directory $_ doesn't exist, giving up" for grep { ! -d $_->localroot } @rrr;
60 while (){
61 my $ttgo = time + 20;
62 for my $rrr (@rrr){
63 $rrr->rmirror ( );
65 # last;
66 my $sleep = $ttgo - time;
67 if ($sleep >= 1) {
68 print STDERR "sleeping $sleep ... ";
69 sleep $sleep;
70 } else {
71 printf STDERR "No time to sleep: ttgo[%s] time[%s]\n", $ttgo, time;