LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 11-19-2011, 10:16 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
getting stats from rsync after a failure


With the --stats option, rsync produces some nice statistics at the end of the run. However, if there is a failure of some kind, it won't output those stats.

I'm running backups from machines in one network to machines in another. There is a fixed window of time these backups are allowed to run. At the end of the window of time, the backups must end. Anything not backed up this day will have to wait for the next day.

I have used 2 different methods for restricting the backups to the time window. The first was the "timelimit" command. It was awkward because it used an interval, not an absolute time. I was necessary to calculate the interval in the script itself each time rsync was run (it might be run more than once in the same window to first backup priority files, then backup normal files, under different include/exclude rules). The second was to apply the "timelimit" command to the ssh client that sets up the port forwarding over which the backups are run. This works more smoothly because no matter how many times rsync tries to run for a given backup, the ssh port forward is there only during the intended time window.

The problem with rsync happens in both cases. In the first it is rsync itself that gets the SIGTERM signal from timelimit. In the second ssh gets the SIGTERM and rsync only sees a connection lost (or a connection refused when it retries).

The problem is that with either condition of failure (received SIGTERM or connection lost), the statistics requested by --stats is NOT output. Is there any way to get these statistics to be output, at least in the case of a lost connection?
 
Old 12-02-2011, 05:23 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
You might get more answers asking on the rysync mailing list.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 01:39 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 09:48 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:43 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