omniti-labs/omnipitr

tar option not available on centos 5.7

gde82 opened this issue · 3 comments

Hello,

I'm currently testing omnipitr-backup-slave. I noticed I have problems doing backup, during the creation of tarballs :

2012-12-19 18:13:52.893575 +0100 : 21347 : omnipitr-backup-slave : LOG : Actual command to make tarballs: exec nice tar cf \- \-\-transform\=s\#\^\\\(uncompressed_pg_xlogs\\\|tmp\/omnipitr\-backup\-slave\/21347\\\)\#postgresql\/pg_xlog\# uncompressed_pg_xlogs 2> \/tmp\/omnipitr\-backup\-slave\/21347\/tar\.stderr | nice bzip2 \-\-stdout \- > \/mnt\/backup_zabbix\/preprod\/hot_backups\/lbn\-mon\-d01\-ixe1\-pre\-xlog\-2012\-12\-19\.tar\.bz2
2012-12-19 18:13:53.015965 +0100 : 21347 : omnipitr-backup-slave : LOG : tar stderr:
2012-12-19 18:13:53.033222 +0100 : 21347 : omnipitr-backup-slave : LOG : ==============================================
2012-12-19 18:13:53.045280 +0100 : 21347 : omnipitr-backup-slave : LOG : tar: unrecognized option `--transform=s#^\(uncompressed_pg_xlogs\|tmp/omnipitr-backup-slave/21347\)#postgresql/pg_xlog#'
2012-12-19 18:13:53.045280 +0100 : 21347 : omnipitr-backup-slave : LOG : Try `tar --help' or `tar --usage' for more information.
2012-12-19 18:13:53.057339 +0100 : 21347 : omnipitr-backup-slave : LOG : =========================================

It seems the application is using an unavailable option on the tar application delivered on centos 5.7.

Is there a workaround possible ?

Thanks !

Hi,
well - installation docs do mention that you need gnu tar 1.20 or newer.
The workaround is to install such tar. For example - get sources (http://www.gnu.org/software/tar/), compile and install (to /usr/local, or /opt/tar), and then use --tar-path option to provide path to this tar.

Please note that sanity-check.sh does check tar version, so if you ever ran it, it should print information about using too old tar.

Please note that gnu tar 1.20 has been released on 2008-04-14. That's 4 and a half years ago. It's not really "cutting edge". Perhaps you should contact CentOS maintainers and ask them why there is no newer version packaged.

Best regards,

Hubert Lubaczewski

Thanks for your quick reply.

Yeah I didn't really do my homework, sorry about that. sanity-check.sh does check it, but only reports the error if you run it with root :

$ ./sanity-check.sh
Checking:
- /usr/local/omnipitr/bin
- /usr/local/omnipitr/lib
7 programs, 29 libraries.
Tar version
All checked, and looks ok.
$ sudo ./sanity-check.sh
Checking:
- /usr/local/omnipitr/bin
- /usr/local/omnipitr/lib
7 programs, 29 libraries.
Tar version
Errors:
- tar (in $PATH) is either not gnu tar, or gnu tar earlier than required 1.20

I should have been more careful. That's a minor problem though. I've compiled from source after opening the issue, seems to go better.

Thanks !

The fact that it doesn't report error when run from non-root suggests that non-roots are using different tar. Check "which tar" on root, and on other account. If you already installed hand-compiled version - rename it for a moment.