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 <tom@neuro-logic.com> wrote:
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 <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/y5/b+wA+1cUGHqkRAox0AJ95Er67uRwGl7K+RhynPNmKwjKUMACghgxf PpS5H1aupRssuKCUofcwtBk= =l0Hp -----END PGP SIGNATURE-----
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 <tom@neuro-logic.com> 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. 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 <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux) iD8DBQE/y46I+wA+1cUGHqkRAgqkAJ44We9IA+V4JR6VlbYxhojnkeZhPgCfR4RR 8HrDRC3JAVod7c9uXCcpjIg= =G6tI -----END PGP SIGNATURE-----
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 <crontab -e> , then, you can edit the crontab and instruct that messages are sent to root or your personal email in-box see: man crontab and locate crontab[5] which may be a .GZ file you can easily read using MidnightCommander <mc> . ................................... alternatively : use <rdiff-backup> which is set up to mail output :- Re: [SLE] Backup tools Date: Sat Nov 29 19:07:53 2003 From: Benjamin Arai <benjamin@araisoft.com> (Araisoft Corp.) "Flat out the best backup tool is a app called rdiff-backup. Its simple to use and can even backup through ssh for remote incremental backups. The program is free and works on just about every linux distro out there. Just google rdiff-backup on google.com." ............................................................. best wishes ____________ sent on Linux ____________
participants (4)
-
Bruce Marshall
-
Jerry Feldman
-
pinto
-
Tom Nielsen