Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--rsync --log-file being ignored? #14

Closed
2cokes opened this issue Dec 19, 2018 · 2 comments
Closed

--rsync --log-file being ignored? #14

2cokes opened this issue Dec 19, 2018 · 2 comments

Comments

@2cokes
Copy link

2cokes commented Dec 19, 2018

Hi,
I think the always present --log-file option is overriding or ignoring the fact that log-file is set in the -r option.
Even with log-file set, the location seems to get put into /tmp.

I somewhat verified this by this hack:

if '--log-file' in options:
            rsync_cmd = "%s %s %s %s" % (RSYNC_EXE, options + ' --quiet --stats --verbose --from0', src + os.sep, dst)
        else:
            rsync_cmd = "%s %s %s %s" % (RSYNC_EXE, options + ' --quiet --stats --verbose --from0 --log-file %s' % rsync_log, src + os.sep, dst)

Which seems to place it to the desired file. Is this by design?

@jbd
Copy link
Owner

jbd commented Dec 25, 2018

Hi, thank you for opening this issue.

You're right, the log-file option is always added and this is by design. https://github.com/jbd/msrsync#notes. I'm not saying this is particularly intelligent choice, but each spawned rsync process generates it's own log file and the simplest solution was to enforce its location.

Maybe you will be interested in those options ?

-b, --buckets ...     where to put the buckets files (default: auto temporary directory)
-k, --keep            do not remove buckets directory at the end
$ mkdir buckets
$ msrsync --buckets buckets --keep src dest
$ cat buckets/msrsync-RbeOP5/0000/0000/tmp584JTA.log 
2018/12/25 20:59:05 [7191] building file list
2018/12/25 20:59:05 [7191] cd+++++++++ src/
2018/12/25 20:59:05 [7191] cd+++++++++ src/proc/
2018/12/25 20:59:05 [7191] Number of files: 2 (dir: 2)
2018/12/25 20:59:05 [7191] Number of created files: 2 (dir: 2)
2018/12/25 20:59:05 [7191] Number of deleted files: 0
2018/12/25 20:59:05 [7191] Number of regular files transferred: 0
2018/12/25 20:59:05 [7191] Total file size: 0 bytes
2018/12/25 20:59:05 [7191] Total transferred file size: 0 bytes
2018/12/25 20:59:05 [7191] Literal data: 0 bytes
2018/12/25 20:59:05 [7191] Matched data: 0 bytes
2018/12/25 20:59:05 [7191] File list size: 0
2018/12/25 20:59:05 [7191] File list generation time: 0.001 seconds
2018/12/25 20:59:05 [7191] File list transfer time: 0.000 seconds
2018/12/25 20:59:05 [7191] Total bytes sent: 67
2018/12/25 20:59:05 [7191] Total bytes received: 22
2018/12/25 20:59:05 [7191] sent 67 bytes  received 22 bytes  178.00 bytes/sec
2018/12/25 20:59:05 [7191] total size is 0  speedup is 0.00

@2cokes
Copy link
Author

2cokes commented Dec 30, 2018

Thanks for the clarification! I tracked those options as I was dealing with the logfile as well. Everything is working to spec.

@2cokes 2cokes closed this as completed Dec 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants