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

is -l switch needed when invoking rsync ? #1361

Open
MontrealSergiy opened this issue Nov 13, 2023 · 6 comments
Open

is -l switch needed when invoking rsync ? #1361

MontrealSergiy opened this issue Nov 13, 2023 · 6 comments

Comments

@MontrealSergiy
Copy link
Contributor

-a (ARCHIVE) option of rsync should already include -l (symlinks)

@prioux
Copy link
Member

prioux commented Nov 13, 2023

I don't understand the context of this issue. What is the problem? Which rsync? We use rsync all over the place in CBRAIN.

For data providers, we already have, as a matter of design decision, that symbolic links are preserved as-is. So the rsync options used by the data provider code already does that.

@prioux
Copy link
Member

prioux commented Nov 13, 2023

So can we close this?

@MontrealSergiy
Copy link
Contributor Author

MontrealSergiy commented Nov 13, 2023

The context is that the rsync commands containing both -a and -l can be shortened

@MontrealSergiy
Copy link
Contributor Author

but up to you

@prioux
Copy link
Member

prioux commented Nov 13, 2023

I did not understand you original ticket. The subject and description shoudl have said all that. e.g.

Subject: rsync commands have -l option
Description: in the data provider class (file.rb at line xyz and xyz)
the rsync command is invoked. In the options, both the "-a" and "-l"
options are specified. Given that -l is already implied by -a, is
the -l really necessary?

As you can see, providing a full description of what goes on would have prevented a lot of back and forth.

And the answer is: it is probable that some older versions of rsync did not imply -l with -a, and that is why I originally wrote the command like that. Since there is no harm, let's no change it, especailly since we're still connecting to legacy systems where the old behavior might be still active.

@MontrealSergiy
Copy link
Contributor Author

MontrealSergiy commented Nov 14, 2023

Actually, the first release of rsync in 1996 already was like that ( -a included -l) because these options where modelled on tar.

The source archive is still available at https://download.samba.org/pub/rsync/src

At the same time there is no harm in a redundant option indeed , but would you mind in the upcoming code I skip -l

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