LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 07-23-2010, 04:52 AM   #1
glennbtn
Member
 
Registered: Dec 2009
Posts: 89

Rep: Reputation: 18
Limit rsync log output


Hi all

Is there a way to limit the amount of data that goes in to an rysnc log. The problem I have is that I email myself the log file to make sure it went ok but sometime the log is huge

Here is what I am doing with rsync
rsync -azHK --delete-after /home/ /mnt/usbbackup/home/ >/backup-log/backup.txt

Cheers
Glenn
 
Old 07-23-2010, 05:44 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,159

Rep: Reputation: 258Reputation: 258Reputation: 258
Hi

You could limit it with something like this:

rsync -azHK --delete-after /home/ /mnt/usbbackup/home/ |head -n 1000 >/backup-log/backup.txt

This will limit it to the 1000 first lines. Replace head with tail if you want the 1000 last lines, the last lines are probably more important. Personally I don't like email on successes at all, I just put the rsync line in cron, and I get emails on errors only.
 
  


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
(Bash) Redirect all output from script to all.log and copy of errors to err.log hmsdefender Programming 5 03-05-2010 02:52 PM
Clean Up Log - Search for Pattern in Log file and Output result bridrod Linux - Newbie 10 01-05-2010 10:49 AM
set speed limit to rsync? malo_umoran Linux - General 7 08-27-2009 01:39 AM
rsync output for a report DaveQB Linux - Server 0 08-24-2009 02:11 AM
How to limit/control console output? jaristr Linux - Newbie 5 08-28-2005 04:10 PM


All times are GMT -5. The time now is 07:34 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration