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 error : rsync: --sparse cannot be used with --inplace #230

Open
PandaRoux8 opened this issue Sep 10, 2024 · 1 comment
Open

rsync error : rsync: --sparse cannot be used with --inplace #230

PandaRoux8 opened this issue Sep 10, 2024 · 1 comment

Comments

@PandaRoux8
Copy link

Hello,

It seems like my rsync version is not compatible with log2ram.

When I run service log2ram reload it is supposed to write logs to disk.
But instead I get the following error in /var/log/log2ram.log

rsync: --sparse cannot be used with --inplace
rsync error: syntax or usage error (code 1) at main.c(1585) [client=3.1.2]

Here's my rsync version

# rsync -v
rsync  version 3.1.2  protocol version 31

Apparently the support for both of these flag at the same time has been added in 3.1.3

Here's a few ideas :

  1. We set a flag in the config something like USE_RSYNC_LEGACY=false and change the rsync command if the flag is up
  2. We check the rsync version with a regex at runtime and change the rsync command if the flag is up
  3. You don't care about old rsync version and I make a fork of log2ram to support my old rsync :p

I will gladly make a pull requests, just want to know what you prefer. Or if you have any other idea

@azlux
Copy link
Owner

azlux commented Sep 18, 2024

On this issue, any PR is welcome.
In my opinion, I prefer the second option : checking the version and remove the flag if <3.1.3.
Since this soft is made for debian/ubuntu, you can try to use dpkg --compare-versions to compare versions.

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