pantheon-systems / terminus-rsync-plugin

Terminus Plugin that provides a quick shortcut for rsync-ing files to and from a Pantheon site.
MIT License
18 stars 10 forks source link

terminus rsync can leave files in tmp folder when interrupted #19

Open HongPong opened 3 years ago

HongPong commented 3 years ago

Just wanted to make a note that if rsync doesn't complete its process it can leave files in the .tmp temporary folders, nested inside destination folders. So if you break the rsync and run the same command again it can cause there to be 'doubles' around.

This seems to be due to the --delay-updates flag:

https://www.truenas.com/community/threads/rsync-resuming-an-interrupted-transfer-and-delay-updates.25588/

greg-1-anderson commented 3 years ago

That option was added here:

https://github.com/pantheon-systems/terminus-rsync-plugin/commit/37470d361fd072038b7fb6e1108a6bd9d4ee704a

I'm not sure why. A PR to allow the default behavior to be changed would be welcome. Seems like you can already avoid the behavior by specifying the tmp directory manually. The tmp directory should always be /tmp now.

HongPong commented 3 years ago

Thank you for the info - this was my first time around with terminus-rsync and I will keep that in mind. I wasn't aware of the delay-updates option in rsync before this. Other than this issue everything else seemed to work great.