Using rsync to delete remote files as they're transferred?

This is a discussion on Using rsync to delete remote files as they're transferred? within the Rsync forums, part of the Networking and Network Related category; I have a task where I need to take a collection of files on a remote server and transfer them, ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-03-2004
Erik Max Francis
 
Posts: n/a
Default Using rsync to delete remote files as they're transferred?

I have a task where I need to take a collection of files on a remote
server and transfer them, one at a time, a local server, deleting each
remote file as it is successfully transferred. The reason for the
delete-as-transfer phase is that there are potentially a lot of files
and the task is likely to be interrupted, so it is intended to save disk
space on the remote server (there could be very long periods before a
sync actually fully completes to run a separate cleaning script).

At present I'm doing this with a script that uses ssh to initially get
the list of remote files to transfer, and then loops over each file
doing an scp and then (upon success) doing an ssh to remove the remote
file. Nothing fancy, naturally, but after starting to use rsync for
other tasks it occurs to me that rsync would be a much better tool if it
had a mode which would allow this behavior (since the current script
involves creating many ssh sessions, exactly the thing that rsync is
designed to minimize).

Can rsync do this?

--
__ Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ Education is a state-controlled manufactory of echoes.
-- Norman Douglas
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:48 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0