Logging errors using rsync and the -log-file option
We are having problems with the client SAN storage and the files "disappear" when sync is stored. We have a custom 4D database that runs a simple script to sync files from one location to another via rsync.
The script is executed: "rsync -rvuE --log-file = / tmp / rsync.log SRC DST". The problem is that rsync reports "rsync warning: some files disappeared before they can be migrated (code 23)". This error only appears in terminal / STDOUT and system.log. However, it doesn't appear in the -log folder of the file. I would like to post it to rsync.log because we read the log for completion and errors and report it to the user.
Now here is the tricky part, we cannot redirect STDOUT or STDERR to the log as it blocks the server.
source to share
I back up using rsync
several times a day (via an automated tool). I did grep
through my backup logs. My logs show that rsync
by default it archives the missing files to its log file. I am not using --log-file-format
or any other option that changes the format of the log file.
It looks like this:
2012/08/17 19:00:28 [12861] file has vanished: "foo"
I can find other errors logged there, such as files that cannot be transferred due to permissions. The date above is the actual date in the oldest log file I have that shows this type of error. The version rsync
I was using at the time was 3.0.9, so rsync
it has been doing it ever since.
source to share