Allow --files-from to be used without a destination #473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A syntax check currently prevents the option
--files-from=list_of_files.txt
to be used without a destination (implied--list-only
).This makes it hard to list all local files from rsync's perspective, that is, after processing of
--include
,--exclude
,--recursive
, and IO/permission errors during listing. Note that this list should be independent of destination.In my case,
dirs_to_backup.txt
points to directories such as~/camera/
and~/.conf/
, and I'd like to keep a list of all "files to back up", for validation and troubleshooting purposes. This should be possible even when the remote host is offline. My current workaround is to dry-run a transfer to a temp dir:But this is obviously not ideal, from a clarity and performance perspective.
I think the check that throws a syntax error when
!am_daemon && !am_server && argc == 1
was either added incorrectly, or before the introduction of--list-only
. This pull request removes this check, allowing the example above to work.