I've been running rsync via kcron with the -v tag to get a list of what is copied, but I can't find the log. From what I understand, there should be a rsync.log under /var/log but it's not there. Any thoughts? Tom -- Tom Nielsen Neuro Logic Systems 805.389.5435 x18 www.neuro-logic.com
On Mon December 1 2003 01:04 pm, Tom Nielsen wrote:
I've been running rsync via kcron with the -v tag to get a list of what is copied, but I can't find the log. From what I understand, there should be a rsync.log under /var/log but it's not there.
Any thoughts?
Tom
My thoughts?? I've never heard of kcron, but that's my problem. I see nothing in 'man rsync' that talks about rsync.log. I DID see a comment that rsync will send its output to stdout. What's wrong with using '> <path and name of logfile> which is what I told you to do a few days ago?? -- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 12/01/03 13:28 + +----------------------------------------------------------------------------+ "If you eat yogurt you'll have lots of culture."
On Mon, 2003-12-01 at 10:32, Bruce Marshall wrote:
On Mon December 1 2003 01:04 pm, Tom Nielsen wrote:
I've been running rsync via kcron with the -v tag to get a list of what is copied, but I can't find the log. From what I understand, there should be a rsync.log under /var/log but it's not there.
Any thoughts?
Tom
My thoughts?? I've never heard of kcron, but that's my problem.
I see nothing in 'man rsync' that talks about rsync.log. I DID see a comment that rsync will send its output to stdout.
What's wrong with using '> <path and name of logfile> which is what I told you to do a few days ago??
"A few days ago"? Boy, that's like years ago to me. :-) First, kcron is for low-watt bulbs like me that aren't really sure how to setup a cron task manually. If you type kcron you should get the window pop up...if it's installed. Second, I didn't, and still don't, understand what you wanted me to do with the > <... thing. Where do you want me to stick it? I mean should I put it in the bash script I made (see below)? #!/bin/sh rsync -auvzr --delete /home/tom/Documents/ /mnt/root2/ What does stdout mean? Tom -- Tom Nielsen Neuro Logic Systems 805.389.5435 x18 www.neuro-logic.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 01 Dec 2003 11:13:10 -0800
Tom Nielsen
First, kcron is for low-watt bulbs like me that aren't really sure how to setup a cron task manually. If you type kcron you should get the window pop up...if it's installed.
Second, I didn't, and still don't, understand what you wanted me to do with the > <... thing. Where do you want me to stick it? I mean should I put it in the bash script I made (see below)?
#!/bin/sh rsync -auvzr --delete /home/tom/Documents/ /mnt/root2/
What does stdout mean? Every process in Unix and Linux has 1 standard input from the terminal (stdin), 1 standard output to the terminal (stdout) and 1 standard error output (stderr).
What this means is the non-error output from a command like rsync prints
on the terminal, and you can redirect it using the right angle bracket
(eg. >). The double right angle bracket means append.
So:
rsync -auvzr --delete /home/tom/Documents/ /mnt/root2/ > mylog
Will direct the output of rsync to the file, mylog, in the current
working directory.
As I had mentioned earlier, the standard output of a cron job is emailed
to the email address of the owner of the process, which would be tom if
that is the user name you created your cron spec.
So, if you do nothing, the output of your rsync command will be emailed
to your user id. if you want that to go to another email address, set
the mailto variable (using kcron). Select variables, edit/new,
variable:mailto
value:tom@neuro-logic.com
That should cause all your cron output for your account to be redirected
to tom@neuro-logic.com.
As I mentioned before, kcron is just a GIU way to specify your crontab
file. From the command line, run the "crontab -l" command and you will
see how kcron set up your crontab.
- --
Jerry Feldman
On Mon December 1 2003 02:13 pm, Tom Nielsen wrote:
On Mon, 2003-12-01 at 10:32, Bruce Marshall wrote:
On Mon December 1 2003 01:04 pm, Tom Nielsen wrote:
I've been running rsync via kcron with the -v tag to get a list of what is copied, but I can't find the log. From what I understand, there should be a rsync.log under /var/log but it's not there.
Any thoughts?
Tom
My thoughts?? I've never heard of kcron, but that's my problem.
I see nothing in 'man rsync' that talks about rsync.log. I DID see a comment that rsync will send its output to stdout.
What's wrong with using '> <path and name of logfile> which is what I told you to do a few days ago??
"A few days ago"? Boy, that's like years ago to me. :-)
First, kcron is for low-watt bulbs like me that aren't really sure how to setup a cron task manually. If you type kcron you should get the window pop up...if it's installed.
Second, I didn't, and still don't, understand what you wanted me to do with the > <... thing. Where do you want me to stick it? I mean should I put it in the bash script I made (see below)?
#!/bin/sh rsync -auvzr --delete /home/tom/Documents/ /mnt/root2/
What does stdout mean?
Ok, *nix 101... but first... I'm subscribed to the list too, so you don't need to copy me on the replies..... 1) Almost all *nix commands write their output to a thing called 'stdout' (standard output). There is also a 'stderr' for error messages. 2) If you don't do anything special with a command, the output sent to stdout is displayed on your termy. 3) If you want to do something special with stdout, you can 'pipe' it to some other process. So that lsmod | grep usb will show you all the usb modules that are loaded because the output of lsmod sends a listing of ALL modules to the pipe, and grep receives the piped output and only displays those modules that have 'usb' in their name. 4) One of the neet tricks you can do with stdout output is direct it to a file with the '>' operator. so that lsmod > my-modules would create a file named 'my-modules' which would be a list of all modules loaded. 5) The '>' operator creates a file or overwrites the file if it already exists. There is also a '>>' operator that will append the output to the file if the file already exists or create the file if it doesn't. So what I was trying to tell you to do was to use: rsync <whatever options and arguments> > /var/log/rsync.log to create a rsync.log file if that's what you want. -- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 12/01/03 15:32 + +----------------------------------------------------------------------------+ "Where there's a will, there's an inheritance tax."
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 01 Dec 2003 10:04:11 -0800
Tom Nielsen
I've been running rsync via kcron with the -v tag to get a list of what is copied, but I can't find the log. From what I understand, there should be a rsync.log under /var/log but it's not there.
Any thoughts. kcron is simply a GUI for you to specify the tasks you want to schedule.
In general, it sets up your crontab file. By default cron sends its
output to mail. You can set the mailto variable in kcron to whomever
should receive the email.
Or, you can redirect the output of rsync to a log file. Normally, I
don't run rsync directly from cron. I usually put a script around it.
A short script might be:
#!/bin/sh
echo "rsync started: $(date)" >> mylog ## append to the mylog file
rsync -auvz sourcedir targetdir >> mylog ## Append rsync data
echo "Rsync completed with $?: $(date)" >> mylog
- -------------
In this case, I date stamp when rsync starts, redirect the output to a
logfile, then date stamp the completion along with the completion code
of the last task. I would avoid sending rsync output to syslog.
- --
Jerry Feldman
On Monday 01 December 2003 06:04 pm, Tom Nielsen wrote:
I've been running rsync via kcron with the -v tag to get a list of what is copied, but I can't find the log.
~ if you command
participants (4)
-
Bruce Marshall
-
Jerry Feldman
-
pinto
-
Tom Nielsen