LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-03-2009, 05:50 PM   #1
bixbyr
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Starting and stopping rsync without loosing a lot of data


Hi,

I hope this is the right section on the forums, I apologize in advance if it's not. Both of the machines involved below use ubuntu.

I'm trying to copy of a some rather large files from machine A to machine B, but the connection between the two machines is rather slow compared to the file sizes and they can't use bandwidth during certain hours of the day. My idea was to setup a couple cron jobs on machine B to start and stop rsync at the right time of the day.

The script to start the cron job looks like
screen -d -m -S rt rsync --progress --partial -avv -e ssh user@machinea:/remotedir /localdir
where I used screen just to give myself the option of checking up on it. The script to stop rsync for the day uses simply "killall rsync" since there are no other rsync jobs running.

The issue is that rsync seems to write data to file very infrequently and since the files are larger than can be transfered in one session, rsync often looses the entire days worth of work when I kill it this way. I've tried killing rsync with control-c from within screen and it seems a bit better about saving data though still somewhat unreliable. I've also tried replacing killall with "killall -s 15 rsync" to give it time to shut down without effect.

Is there a better way to automatically synchronize the directories which can be halted for part of the day? Is there a different way of invoking rsync which would cause it to save it's partial progress more readily? The need to sync from machine A to machine B is an ongoing one, so I need to find an automated solution instead of just resuming with gftp.

I've given the problem a bit of thought with no solution yet, so I'd be very interested in the communities suggestions. Thanks!

- Ryan
 
Old 03-04-2009, 11:36 AM   #2
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Have you played around with the compression option to rsync. Would these large files compress down?
 
Old 03-04-2009, 01:06 PM   #3
bixbyr
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
No, they won't compress down. For a very ad hoc solution I used split to break them into chunks and let rsync go to work, but 1) rather labor intensive, 2) not easily automated, 3) a rather complicated solution to what ought to be a rather simple problem.
 
Old 08-09-2011, 02:32 PM   #4
loose gravel
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
It's an old thread, I know. But anyway...

Have you found a solution?
 
  


Reply


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
How to Re-Install Suse 11 without loosing data yaarappa Linux - Newbie 4 02-27-2009 09:07 AM
C sockets loosing data? greeklegend Programming 8 01-10-2008 04:40 PM
Loosing power and data flycast Linux - Hardware 2 04-15-2007 01:23 AM
Can i resize my partition without loosing data? byen Linux - General 4 05-25-2005 07:39 PM
RSYNC - Stopping a sub-directory from mirrorring!! RKris Linux - Networking 1 05-19-2003 10:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:11 AM.

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