samba-bugs@samba.org
2007-Jan-04 07:34 UTC
DO NOT REPLY [Bug 2423] Feature Request: Ability to transfer files newer than date or file. (--newer switch).
https://bugzilla.samba.org/show_bug.cgi?id=2423 pe-rsync@hindenburgring.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pe-rsync@hindenburgring.com ------- Comment #6 from pe-rsync@hindenburgring.com 2007-01-04 01:34 MST ------- I can only second this suggestion. I'm currently working on a project where I have to import tons (about 150 GB) of data from a remote site and process them, with subsequent updates to the source files where only very few files are changed or added and the majority of the processed files lie around motionless, possibly for years. No use at all in keeping it around, except that rsync (without the suggested --newer switch) insists on having them about. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
samba-bugs@samba.org
2007-Jan-05 00:53 UTC
DO NOT REPLY [Bug 2423] Feature Request: Ability to transfer files newer than date or file. (--newer switch).
https://bugzilla.samba.org/show_bug.cgi?id=2423 ------- Comment #7 from hashproduct+rsync@gmail.com 2007-01-04 18:53 MST ------- (In reply to comment #3)> Actually, that cant work. I dont have the filenames I need to rsync. I'm > rsyncing from client, not from server. > > The destination is '.' not 'host:/dest/'You could write a script on the server that pipes the results of the find to rsync and then specify that script as the --rsync-path. Roman and Peter, another way to accomplish what you want is to use --update and have the receiver truncate files it is finished with to zero length instead of deleting them. James, I don't know whether this technique accomplishes what you want. An alternative to adding --newer is to add a new kind of filter rule that makes rsync pass file names to a user-specified program, which decides whether they "match" the rule. The specifics could be as follows. A "|" modifier means to interpret the text of the rule as a command line instead of a filename pattern. Rsync runs the command and gives it one filename per line on standard input. The command must print a "0" or "1" character for each file to indicate whether the custom rule matches the file. For example, the following option would have the same effect as `--newer=TIME': --filter='-!| newer-filter TIME' where newer-filter is the following script: #!/bin/bash # We convert times to seconds since the Epoch so # we can compare them with [ -gt ]. cutoff_time=$(date +%s -d "$1") while IFS='' read fname; do # Compare file's mtime to cutoff time if [ $(stat --format=%Y $fname) -gt $cutoff_time ]; then echo -n 1 else echo -n 0 fi done The "|" modifier would support all non-name-based filters at once and would have the additional advantage that they could be prioritized anywhere in the filter list. One disadvantage is that many rsync daemons would want to refuse the modifier for security. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Possibly Parallel Threads
- DO NOT REPLY [Bug 2423] Feature Request: Ability to transfer files newer than date or file. (--newer switch).
- [Bug 2423] Feature Request: Ability to transfer files newer than date or file. (--newer switch).
- [Bug 2423] New: Feature Request: Ability to transfer files newer than date or file. (--newer switch).
- [Bug 2423] Feature Request: Ability to transfer files newer than date or file. (--newer switch).
- [Bug 2423] Feature Request: Ability to transfer files newer than date or file. (--newer switch).