Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-18-2010, 02:48 PM   #1
Registered: Feb 2004
Posts: 62

Rep: Reputation: 23
Rsync Didn't Exit Upon Error


I back up with rsync like this:

rsync -av --delete /mnt/hda1/ /mnt/hdb1/

hda1 had an error (bad superblock, i think), but rsync didn't exit! It just went on on deleting my files until i hit Ctrl+C. Now I can't access the original drive and the back-up drive has lost a lot of files. Why doesn't rsync exit when it encounters and error? How can I stop this behavior?

Old 09-18-2010, 11:21 PM   #2
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 97
Before using rsync with the --delete option, I test to make sure
that the partition is mounted correctly. The test verifies the
existance of a directory on the filesysystem. For example:

[ -d /mnt/hdaq/somedir ] && rsync -av --delete /mnt/hda1/ /mnt/bhd1

Last edited by carltm; 09-18-2010 at 11:22 PM. Reason: mispelled code
Old 09-20-2010, 06:09 PM   #3
Registered: Feb 2004
Posts: 62

Original Poster
Rep: Reputation: 23
The problem is that there was no sign of anything being wrong with the drive. It was mounted and I was editing files up to the last minute before I tried to back up.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync error: IO error encountered - skipping file deletion lwainscott Linux - General 1 08-21-2009 01:15 PM
eturned error exit status 2 sulekha Ubuntu 1 11-14-2008 05:05 AM
Rsync Has Unexplained Exit rkulp Linux - Server 5 05-30-2008 08:02 AM
How to exit on nmake error cjs_pro Programming 0 03-07-2005 08:42 PM
error exit status 30 debian_dummy Debian 2 09-21-2004 11:26 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration