new ticket found
[andk-cpan-tools.git] / bin / testing-rmirror.pl
blobd1ebf7897db787236dc4341f6e0b4568cea52d4a
1 #!/home/src/perl/repoperls/installed-perls/perl/pVNtS9N/perl-5.8.0@32642/bin/perl
3 $ENV{USER}="andk"; # fill in your name
4 $ENV{RSYNC_PASSWORD} = shift or die; # fill in your passwd
6 use strict;
7 use File::Rsync::Mirror::Recent;
8 my @rrr = map {
9 File::Rsync::Mirror::Recent->new
11 ignore_link_stat_errors => 1,
12 localroot => "/home/ftp/pub/PAUSE/$_",
13 remote => "pause.perl.org::PAUSE/$_/RECENT.recent",
14 max_files_per_connection => 12503,
15 rsync_options =>
17 port => 8732, # only for PAUSE
18 compress => 1,
19 links => 1,
20 times => 1,
21 timeout => 600,
22 'omit-dir-times' => 1, # not available before rsync 3.0.3
23 checksum => 0,
25 tempdir => "/home/ftp/tmp",
26 ttl => 20,
27 verbose => 1,
28 # verboselog => "/var/log/rmirror-pause.log",
29 runstatusfile => "/var/log/rmirror-status-$_.state",
30 )} "authors", "modules";
31 die "directory $_ doesn't exist, giving up" for grep { ! -d $_->localroot } @rrr;
32 while (){
33 my $ttgo = time + 20;
34 for my $rrr (@rrr){
35 $rrr->rmirror ( "skip-deletes" => 1 );
37 my $sleep = $ttgo - time;
38 if ($sleep >= 1) {
39 # print STDERR "sleeping $sleep ... ";
40 sleep $sleep;