On Mon, Sep 28, 2015 at 11:11 AM, Lars Ellenberg <lars.ellenb...@linbit.com> wrote:
> On Sat, Sep 26, 2015 at 09:28:16PM -0400, Brian Blater wrote: > > This is what I have in the csync2.cfg: > > > > nossl * *; > > > > group production { > > key /etc/csync-production-group.key; > > host server1; > > host server2; > > include /data; > > exclude /data/conflict; > > exclude *~ .*; > > action { > > pattern /data/*; > > logfile "/var/log/csync2/csync2.log"; > > That would log the output of the *action* > (but you did not define any). > > action being some command to be called > if csync2 updated a file matching pattern. > > intended use case would be a pattern matching some apache conf files, > and an action that basically does "apachectl graceful", once that > conf file has been copied over. > > > do-local; > > } > > auto none; > > } > > > > I'm not getting any logging at all. I can't figure out if the pattern is > > wrong or what. I basically want csync2 to log what it does in the log > file, > > but I can't get it working. > > > > Any help would be greatly appreciated. > > If you want csync2 to log what it does, > you have to increase its "verbosity" (add -v...), > and possibly tell it to use syslog. > it usually should redirect to syslog anyways, > if it detects that it has no tty. > Thanks Lars for your comments. I'm just getting back to this problem because my day job got overly busy. Anyways, what I really want is the information I see when running csync2 -xv to go to a log file. I basically want to see what csync2 has done i.e. what files were updated, what files were deleted etc. Right now if I run csync2 -xv from the terminal window I see something like this: Marking file as dirty: /data/users/bblater/testing6.txt Marking file as dirty: /data/users/bblater/testing5.txt Marking file as dirty: /data/users/bblater/testing3.txt Marking file as dirty: /data/users/bblater/testing.20151010.081120.txt Connecting to host server2 (PLAIN) ... Deleting /data/users/bblater/testing6.txt on 280z.blaterfamily.org ... File is already up to date on peer. Deleting /data/users/bblater/testing5.txt on 280z.blaterfamily.org ... File is already up to date on peer. Deleting /data/users/bblater/testing3.txt on 280z.blaterfamily.org ... File is already up to date on peer. Deleting /data/users/bblater/testing.20151010.081120.txt on 280z.blaterfamily.org ... File is already up to date on peer. Finished with 0 errors. I want that to go to a log file so that I can then look at the log file and see what errors there were if any and what files where moved. However, I cannot seem to get logging for csync2. I've got some other questions, but I don't want to clutter this thread, so I'll start a new one. Thanks, Brian
_______________________________________________ Csync2 mailing list Csync2@lists.linbit.com http://lists.linbit.com/mailman/listinfo/csync2