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

CLI:Error Utility Name Empty when try to use backup gem #871

Closed
franciscopaniskaseker opened this issue Jul 6, 2017 · 6 comments
Closed
Labels

Comments

@franciscopaniskaseker
Copy link

franciscopaniskaseker commented Jul 6, 2017

What went wrong?

When I try to execute some backup commands I am receiving CLI Error.

What steps did you follow?

[root@ models]# backup check
[2017/07/06 12:41:44][error] CLI::Error
[2017/07/06 12:41:44][error] --- Wrapped Exception ---
[2017/07/06 12:41:44][error] Utilities::Error: Utility Name Empty
[2017/07/06 12:41:44][error] Configuration Check Failed.

[root@ models]# /usr/local/bin/backup perform --trigger sql --tmp-path /home/tmp/
[2017/07/06 12:43:34][error] CLI::Error
[2017/07/06 12:43:34][error] --- Wrapped Exception ---
[2017/07/06 12:43:34][error] Utilities::Error: Utility Name Empty

How is your copy of backup configured?

I already tried new (from zero) config.rb file. I already tried create new models (follow official documentation). If I put the model name, I get error. If I do not write, it will fail (as we expect).

[root@wither models]# /usr/local/bin/backup perform --trigger 
No value provided for option '--trigger'

[root@wither models]# /usr/local/bin/backup perform --trigger sql
[2017/07/06 12:46:42][error] CLI::Error
[2017/07/06 12:46:42][error] --- Wrapped Exception ---
[2017/07/06 12:46:42][error] Utilities::Error: Utility Name Empty

Tell us about the computer that runs the backup gem

[root@ models]# mysql --version
mysql  Ver 15.1 Distrib 5.5.52-MariaDB, for Linux (x86_64) using readline 5.1

Linux wither 4.12.0-1.el7.elrepo.x86_64 #1 SMP Sun Jul 2 20:38:48 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@ ~]# cat /etc/issue
CentOS Linux release 7.3.1611 (Core)

[root@ ~]# rpm -qa | egrep -i ruby
rubygem-io-console-0.4.2-29.el7.x86_64
rubygem-psych-2.0.0-29.el7.x86_64
ruby-libs-2.0.0.648-29.el7.x86_64
rubygem-json-1.7.7-29.el7.x86_64
rubygem-rdoc-4.0.0-29.el7.noarch
ruby-2.0.0.648-29.el7.x86_64
rubygems-2.0.14.1-29.el7.noarch
ruby-devel-2.0.0.648-29.el7.x86_64
rubygem-bigdecimal-1.2.0-29.el7.x86_64
ruby-irb-2.0.0.648-29.el7.noarch
rubygems-devel-2.0.14.1-29.el7.noarch


[root@wither models]# backup version
Backup 4.4.0

[root@wither models]# gem list backup
*** LOCAL GEMS ***
backup (4.4.0)
@franciscopaniskaseker
Copy link
Author

I already tried remove backup gem and reinstall from zero without success.

@stuartellis
Copy link
Contributor

stuartellis commented Jul 7, 2017

Hello @franciscopaniskaseker,

OK, please which can you double-check that mysqldump is installed and where it should be? e.g.:

which mysqldump

Next, please can you post an example of the config and model files as a gist? I can then investigate further with you.

@franciscopaniskaseker
Copy link
Author

[root@ ~]# whereis mysqldump
mysqldump: /usr/bin/mysqldump /usr/share/man/man1/mysqldump.1.gz

[root@ ~]# mysqldump
Usage: mysqldump [OPTIONS] database [tables]
OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR     mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help

[root@ ~]# which mysqldump
/usr/bin/mysqldump

Now a SQL backup example:

Model.new(:sql, 'dump sql') do

        database MySQL do |db|
                db.name         = :all
                db.username     = "root"
                db.password     = "*******"
                db.host         = "localhost"
                db.port         = "3306"
                db.socket       = "/var/lib/mysql/mysql.sock"
                db.prepare_backup       =       true
                db.additional_options   =       ["--quick", "--single-transaction"]
        end

        #compress_with Gzip

        compress_with Custom do |compression|
                compression.command = 'pxz -k -6 -T2'
                compression.extension = '.xz'
        end

        store_with Local do |local|
                local.path = '/backup/sql'
                local.keep = 160
        end

        Logger.configure do
                logfile.enabled   = true
                logfile.log_path  = 'log'
                logfile.max_bytes = 500_000
        end
end

We used this script since 2017 January without changes. Backup stopped since 9th June.

@stuartellis
Copy link
Contributor

OK, thank you. Have you tried without the custom compression? That could also raise the "Utility Name Empty" error.

@franciscopaniskaseker
Copy link
Author

I removed custom compression and I get same error. I have others servers using same version without problem even with CentOS x86_64 7.3.1611.

I compared ruby version and gems and they use same versions. I wondering if I have some environment variable causing this.

I am not expert with ruby on rails environment, but If reinstall ruby and backup gem (config from zero, ie, without reuse config files) did not work, probably I have environment issues.

@stale
Copy link

stale bot commented Nov 24, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 24, 2020
@stale stale bot closed this as completed Dec 9, 2020
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