LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-06-2009, 04:49 AM   #1
MasterOfTheWind
Member
 
Registered: Jul 2004
Distribution: Arch, Debian sid, Kubuntu, Slackware 11
Posts: 324

Rep: Reputation: 30
Interrupting rsync


Hi!

I have set up a backup solution on one of my home computers utilizing rsync.

I am now wondering what happens if one of my rsync-s is interrupted before completion?

Say we have a following situation: I have downloaded the latest OpenSUSE dvd and rsync is now backing it up. What will happen if I interrupt the process? The next time I run the same rsync command, will it continue where it was interrupted?

I just want to ensure that my backups can be trusted
 
Old 01-06-2009, 05:39 AM   #2
rizwanrafique
Member
 
Registered: Jul 2006
Distribution: Debian, Ubuntu, openSUSE, CentOS
Posts: 147

Rep: Reputation: 19
Have a look at --partial option in
Code:
man rsync
 
Old 01-06-2009, 06:03 AM   #3
MasterOfTheWind
Member
 
Registered: Jul 2004
Distribution: Arch, Debian sid, Kubuntu, Slackware 11
Posts: 324

Original Poster
Rep: Reputation: 30
Thanks a lot for pointing it out!

Answering my own question for any future reference, here is a quote from the man pages:

Quote:
By default, rsync will delete any partially transferred file if the transfer is interrupted. In some circumstances it is more desirable to keep partially transferred files. Using the --partial option tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.
Although I guess it may not be a good idea to use this option. What if the original large file changes after the interrupted sync, but before a resync occurs? Does rsync match the partially copied file to the original file to see whether any changes have been made in the meantime?
 
Old 01-06-2009, 06:41 AM   #4
antegallya
Member
 
Registered: Jun 2008
Location: Belgium
Distribution: Debian
Posts: 109

Rep: Reputation: 42
Hello,
I've done some testing using "rsync -Ph" (-P is equivalent to --partial --progress wich shows the progress and -h is for human readable) and it seems to always restart the transfer at the beginning of the file (either if the partial destination file has been modified or not). So I think --partial is only to force the "commit" of a partial transfer instead of canceling it.

Last edited by antegallya; 01-06-2009 at 06:46 AM.
 
Old 01-06-2009, 06:42 AM   #5
antegallya
Member
 
Registered: Jun 2008
Location: Belgium
Distribution: Debian
Posts: 109

Rep: Reputation: 42
[Oops double post, please delete this]

Last edited by antegallya; 01-06-2009 at 06:44 AM.
 
Old 01-06-2009, 06:57 AM   #6
MasterOfTheWind
Member
 
Registered: Jul 2004
Distribution: Arch, Debian sid, Kubuntu, Slackware 11
Posts: 324

Original Poster
Rep: Reputation: 30
Well, thanks, antegallya! That's settled then No -P/--partial for me.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade OS without badly interrupting network? TongueTied Linux - General 3 07-25-2006 05:31 AM
Network message interrupting console swashbuckler Linux - Networking 1 02-12-2005 08:31 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM
interrupting sysinstall mathfeel *BSD 4 05-23-2004 05:39 PM
Interrupting worms How To? pazvant Linux - Security 3 10-19-2003 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:57 PM.

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