You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 2640981, the script fails silently when busybox's grep is used to do the backup. The U option is not recognized and it produces the following error :
grep: unrecognized option: U
However, it doesn't stop the script and produces a file. It's when you try to restore it that couchdb complains with the following error :
In my case, I used alpine linux to do the backups and it's busybox's grep by default but I was able to fix the issue by installing Gnu grup with the command apk add grep. However I have two weeks of backups that are not valid, as I didn't detect the issue because the script doesn't fail and I don't test restores frequently enough (my bad). Do you think it could be possible to fix the existing files so I can restore them ?
Hi @fungiboletus, I ran into the same issue.
I found out that you can just install grep to override busybox's grep :
/ # grep --help
BusyBox v1.31.1 () multi-call binary.
/ # apk add --no-cache grep
/ # grep --version
grep (GNU grep) 3.4
Copyright (C) 2020 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.
This version includes the missing -U option (grep --help output) :
-U, --binary do not strip CR characters at EOL (MSDOS/Windows)
Same thing for du -P : busybox's du does not have -P option.
apk add --no-cache coreutils
On a side note, maybe this option could be removed, as it is the default behavior on "default" du :
-P, --no-dereference don't follow any symbolic links (this is the default)
Tested in Alpine Linux 3.12 Docker image. The downside is it requires more packages so the Docker image is weighed down by ~2MB (assuming you're running the script in a container).
Since 2640981, the script fails silently when busybox's grep is used to do the backup. The U option is not recognized and it produces the following error :
However, it doesn't stop the script and produces a file. It's when you try to restore it that couchdb complains with the following error :
In my case, I used alpine linux to do the backups and it's busybox's grep by default but I was able to fix the issue by installing Gnu grup with the command
apk add grep
. However I have two weeks of backups that are not valid, as I didn't detect the issue because the script doesn't fail and I don't test restores frequently enough (my bad). Do you think it could be possible to fix the existing files so I can restore them ?The line in question:
couchdb-dump/couchdb-dump.sh
Line 340 in fb21b73
The text was updated successfully, but these errors were encountered: