I just added a small mod to s3sync.rb that lets you delete the source files after they've been transferred.
I don't know how to create one of those nifty patch files so I'll put the relevant code below and bold my additions.
[ '--delete', GetoptLong::NO_ARGUMENT ],
[b][ '--delete-source', GetoptLong::NO_ARGUMENT ],[/b]
[ '--verbose', '-v', GetoptLong::NO_ARGUMENT ],
dNode.updateFrom(sourceNode) unless $S3syncOptions['--dryrun']
[b]if $S3syncOptions['--delete-source']
sourceNode.delete unless $S3syncOptions['--dryrun']
puts "Remove source node #{sourceNode.name}" if $S3syncOptions['--verbose']
end[/b]
sourceNode = sourceTree.next? ? sourceTree.next : nil
elsif $S3syncOptions['--debug']
$stderr.puts "Node #{sourceNode.name} unchanged"
end[b]
if $S3syncOptions['--delete-source']
sourceNode.delete unless $S3syncOptions['--dryrun']
puts "Remove source node #{sourceNode.name}" if $S3syncOptions['--verbose']
end[/b]
sourceNode = sourceTree.next? ? sourceTree.next : nil
destinationNode = destinationTree.next? ? destinationTree.next : nil
G-Man
Geoffrey Faivre-Malloy
Edit: It didn't use the bbcode for bold so just look for the
to see where my additions were...