rsync and network failure

Colin Law clanlaw at gmail.com
Thu Apr 7 08:21:36 UTC 2016


On 6 April 2016 at 14:57, Dave Howorth <dhoworth at mrc-lmb.cam.ac.uk> wrote:
>
>
> On 2016-04-06 14:43, Colin Law wrote:
>>
>> I have a script that I run to keep a remote backup of a folder
>> heirarchy.  The script uses rsync with a command of the form
>>
>> rsync -H -azipc /path/to/backup user at my.remote.domain:destination_folder
>>
>> This works fine.  My question is, if the network fails part way
>> through, or the PC is shut down then should I just be able repeat the
>> command and rsync will transfer any remaining files that were not
>> successfully transferred the first time?
>
>
> I've never had any trouble. I've used dirvish for backups and downloads for
> many years, which uses rsync, and I've experienced various network problems.
> Dirvish just retries the rsync and normally the transfer completes the
> second time.
>
> Worst case on the rare occasion things somehow get completely mangled is
> just to delete the faulty image, but I usually do that after the following
> day's transfer has completed successfully.

You say you have never had any trouble, but then say that on rare
occasions things get mangled.  The two statements appear to be in
conflict.  The reason I am asking is that this is intended to be an
automatic unattended operation (weekly via cron or something similar)
and I need to know that it won't get mangled, and the worse that will
happen is that the archive will be out of sync until the next time it
is run.

Colin



More information about the ubuntu-users mailing list