rsync to retry if copy failed - possible?

LIMA David DLIMA at fr.scc.com
Tue Dec 14 09:50:18 GMT 2004


 Hi, 

Personnaly I use --partial option, preventing from retrieving data severall times if it fails: it works like a charm for me.

_________________________________
 
David LIMA
Professional Services
www.scc.com
 
 

-----Message d'origine-----
De : Eberhard Moenkeberg [mailto:emoenke at gwdg.de] 
Envoyé : samedi 11 décembre 2004 22:28
À : rsync at lists.samba.org
Objet : Re: rsync to retry if copy failed - possible?

Hi,

On Sat, 11 Dec 2004, Tomasz Chmielewski wrote:
> Eberhard Moenkeberg wrote:
> > On Sat, 11 Dec 2004, Tomasz Chmielewski wrote:

> > > I want to be 100% sure that rsync copies something from one location to
> > > another.
> > > 
> > > However, I did not see an option which would make rsync retry an operation
> > > if
> > > it failed for whatever reason (network was down when rsync started, or
> > > network
> > > went down during rsync was copying something, connection timed out etc.).
> > > 
> > > For example, wget has an option like --tries=number Set number of retries
> > > to
> > > number.  Specify 0 or inf for infinite retrying.
> > > 
> > > Is there something similar in rsync? If not, are there any ways to achieve
> > > a
> > > similar behaviour?
> > 
> > 
> > rsync has a very differentiated set of return codes.
> 
> So is it really the only way?
> 
> Restarting rsync if the exit code was different than 0 (success) means it has
> to recalculate everything again.
> With archives when there are a lot of files this means waste of time, CPU etc.

I see, but...

> Are there any other options?

An option "retry n times" would make sense only for some very special 
situations. I am not sure if there are some, but you surely have to do a 
full restart-from-beginning if the other side does not respond any longer.

And "retry n times" would make no sense in almost all cases of other 
errors where rsync currently is aborting the whole thing...

So I guess it is up to find concrete situations next where the idea would make sense in practice.

Error code 12 subcase "max sessions" looks like a candidate, but you win
an entry in the server admin's /etc/hosts.deny if you do not pause at that point.
  
Cheers -e
-- 
Eberhard Moenkeberg (emoenke at gwdg.de, em at kki.org)
-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


-



------------------------------------------------------------------------------------------

Ce message contient des informations dont le contenu est susceptible d'être confidentiel.
Il est destiné au(x) destinataire(s) indiqué(s) exclusivement.

A moins que vous ne fassiez partie de la liste des destinataires, ou que vous soyez
habilité à recevoir le mail à leur place, il vous est interdit de le copier, de l'utiliser
ou de dévoiler son contenu à un tiers.

Si vous avez reçu cet email par erreur, merci de prendre contact avec l'émetteur.

Les opinions exprimées dans cet e-mail sont celles de l'émetteur et ne reflètent pas
nécessairement celles de l'entreprise.

Ce e-mail peut contenir des pièces jointes dont certaines pourraient contenir des virus
qui pourraient endommager votre système informatique.

La compagnie a pris toutes dispositions afin de minimiser ce risque et décline toute
responsabilité pour toute perte ou dommage résultant directement ou indirectement de
l'utilisation de cet email ou de son contenu.

Il vous appartient d'effectuer vos propres contrôles anti-virus avant d'ouvrir
la ou les pièces jointes.
------------------------------------------------------------------------------------------



More information about the rsync mailing list