Skip to main content
1 of 2
A. Que
  • 673
  • 1
  • 8
  • 19

Using retry command with rsync

Having problems with the retry command when paired with rsync. retry is a Debian package and states it can "Repeat command until a criteria is met, usually success.". Trying to use it with rsync on a connection that can sometimes fail. However it always gives the same error: "giving up: No such file or directory".

retry '/usr/bin/rsync -av source destination'

Both source and destination exist. I've tried using the absolute path, single and double quotes, quotes around paths, and paths as variables, but none work. I can use the approach from this solution but it is rather cumbersome when doing several directories. Is there something I am missing?

A. Que
  • 673
  • 1
  • 8
  • 19