- Timestamp:
- Aug 12, 2014, 3:55:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140717/ippScripts/scripts/sc_transfer_tool.pl
r37013 r37242 10 10 use Sys::Hostname; 11 11 12 my $local_raw = '/scratch3/watersc1/raw/'; 13 my $local_tmp = '/scratch3/watersc1/tmp/'; 12 my $remote_root = '/lustre/scratch1/turquoise/watersc1/ps1/'; 13 $remote_root = '/scratch3/watersc1/'; 14 my $local_raw = "${remote_root}/raw/"; 15 my $local_tmp = "${remote_root}/tmp/"; 14 16 my $threads = 10; 15 17 my @hosts = ('ippc20.ipp.ifa.hawaii.edu','ippc24.ipp.ifa.hawaii.edu','ippc28.ipp.ifa.hawaii.edu', … … 68 70 } 69 71 elsif (!($fetch)) { # We are pushing 70 print { $filehandles[$i] } "${local_tmp}/$_" . "\n"; 72 # The rsync call expects to find files of a given name in the directory specified. 73 # print { $filehandles[$i] } "${local_tmp}/$_" . "\n"; 74 print { $filehandles[$i] } "$_" . "\n"; 71 75 } 72 76 } … … 112 116 113 117 # the transform bit is there because it looks like the ' gets dropped, so the * is interpreted, and why is our tar so out of date? 114 my $command = "tar cf - --ignore-failed-read --dereference --files-from=${transfer_filelist} | /usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar xf - -C /data/ --transform '" . 's,^.\*/data/,,' . "' --dereference"; 118 # my $command = "tar cf - --ignore-failed-read --dereference --files-from=${transfer_filelist} | /usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes $destination_host tar xf - -C /data/ --transform '" . 's,^.\*/data/,,' . "' --dereference"; 119 my $command = "rsync -Lpt -e '/usr/projects/cosmo/amd6100/bin/ssh -o NoneSwitch=yes -o NoneEnabled=yes' --files-from=${transfer_filelist} ${local_tmp} ${destination_host}:/"; 115 120 print STDERR "$command\n"; 116 121 … … 118 123 run(command => $command, verbose => $verbose); 119 124 unless ($success) { 120 121 125 print STDERR "ERROR: $error_code\n"; 122 126 # my $std = join "\n", @{ $stdout_buf }; … … 125 129 # print "STDERR: $std\n"; 126 130 127 foreach my $line (@{ $stderr_buf }) { # This is a hack. A messy ugly hack.128 if ($line =~ /No such file or directory/) {129 my $file = (split /\s+/, $line)[1];130 $file =~ s/:$//;131 if ($file !~ /nebulous/) { next; }132 print STDERR "Touching $file so tar can continue.\n";133 system("touch $file");134 }135 }131 # foreach my $line (@{ $stderr_buf }) { # This is a hack. A messy ugly hack. 132 # if ($line =~ /No such file or directory/) { 133 # my $file = (split /\s+/, $line)[1]; 134 # $file =~ s/:$//; 135 # if ($file !~ /nebulous/) { next; } 136 # print STDERR "Touching $file so tar can continue.\n"; 137 # system("touch $file"); 138 # } 139 # } 136 140 137 141 warn("Transfer of $transfer_filelist to $destination_host failed with error $error_code.");
Note:
See TracChangeset
for help on using the changeset viewer.
