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

Old logs are not deleted #25

Closed
proninyaroslav opened this issue Jun 15, 2022 · 8 comments
Closed

Old logs are not deleted #25

proninyaroslav opened this issue Jun 15, 2022 · 8 comments
Assignees
Labels

Comments

@proninyaroslav
Copy link
Contributor

proninyaroslav commented Jun 15, 2022

I use rsync-incremental-backup-system and rsync-incremental-backup-system-remote scripts.
I have the maxLogFiles option set to 7, but when deleting the logs I see the following error on the sender side:

[2022-06-15T20:45:40+0300] Deleting excess of logs at target
tail: unable to open '+7' for reading: No such file or directory

My options:

backupDepth = 7
maxLogFiles = 7
useChecksum = 
useCompression = 1
additionalFlags = 
interactiveMode = no
@pedroetb pedroetb self-assigned this Jun 16, 2022
@pedroetb
Copy link
Owner

Hi, I'm not able to reproduce this on my environment, but I think it may be caused by using an old version of bash at remote (assuming your output example came from rsync-incremental-backup-system-remote).

Can you run bash --version at your remote server and share output? Here is mine, as reference:

$ bash --version
GNU bash, version 5.0.17(1)-release (aarch64-unknown-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Thanks!

@pedroetb
Copy link
Owner

Or maybe the outdated is tail itself. Here is my version output:

$ tail --version
tail (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor,
and Jim Meyering.

@proninyaroslav
Copy link
Contributor Author

proninyaroslav commented Jun 19, 2022

OS: Fedora 36 (although I observed this problem on 35)
bash: 5.1.16(1)-release (x86_64-redhat-linux-gnu)
tail: 9.0

@pedroetb
Copy link
Owner

Hmm.. no old versions there.

Can you confirm with tail --help that you have -n, --lines=[+]NUM option available? If it is there, I can include -n to prefix the offset parameter (instead of using this wshorthand).

@proninyaroslav
Copy link
Contributor Author

Yes

  -n, --lines=[+]NUM       output the last NUM lines, instead of the last 10;
                             or use -n +NUM to output starting with line NUM

@pedroetb
Copy link
Owner

Thanks!

@proninyaroslav
Copy link
Contributor Author

Thank you, I will test it

@proninyaroslav
Copy link
Contributor Author

Yes, works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants