Add a --version and --help option

Bug #665295 reported by Baron Schwartz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Triaged
Low
Unassigned

Bug Description

xtrabackup has no --version or --help options. For writing wrapper scripts such as innobackupex, we really need a --version option. And --help is a standard option too.

Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :
Download full text (8.9 KiB)

--help works for me

./xtrabackup_55 --help
./xtrabackup_55 Ver undefined Rev undefined for 5.5.6-rc unknown-linux-gnu (x86_64)
Open source backup tool for InnoDB and XtraDB

Copyright (C) 2009 Percona Inc.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt

Usage: [./xtrabackup_55 [--defaults-file=#] --backup | ./xtrabackup_55 [--defaults-file=#] --prepare] [OPTIONS]

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
The following groups are read: mysqld xtrabackup
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
  --target-dir=name destination directory
  --backup take backup to target-dir
  --stats calc statistic of datadir (offline mysqld is recommended)
  --prepare prepare a backup for starting mysql server on the backup.
  --export create files to import to another database when prepare.
  --apply-log-only stop recovery process not to progress LSN after applying
                      log when prepare.
  --print-param print parameter of mysqld needed for copyback.
  --use-memory=# The value is used instead of buffer_pool_size
  --suspend-at-end creates a file 'xtrabackup_suspended' and waits until the
                      user deletes that file at the end of '--backup'
  --throttle=# limit count of IO operations (pairs of read&write) per
                      second to IOS values (for '--backup')
  --log-stream outputs the contents of 'xtrabackup_logfile' to stdout
                      only until the file 'xtrabackup_suspended' deleted (for
                      '--backup').
  --incremental-lsn=name
                      (for --backup): copy only .ibd pages newer than specified
                      LSN 'high:low'. ##ATTENTION##: checkpoint lsn must be
                      used. anyone can detect your mistake. be carefully!
  --incremental-basedir=name
                      (for --backup): copy only .ibd pages newer than backup at
                      specified directory.
  --incremental-dir=name
                      (for --prepare): apply .delta files and logfile in the
                      specified directory.
  --tables=name filtering by regexp for table names.
  --tables-file=name filtering by list of the exact database.table name in the
  ...

Read more...

Revision history for this message
Baron Schwartz (baron-xaprb) wrote : Re: [Bug 665295] Re: Add a --version and --help option

Vadim,

On Fri, Oct 22, 2010 at 5:01 PM, Vadim Tkachenko <email address hidden> wrote:
> --help works for me

You will get the same thing if there is no command-line options at
all. There is no actual --help option, so there is no difference
between "I want help" and "there is a syntax error in your command."
This behavior can change in the future and break things.

Revision history for this message
Valentine Gostev (longbow) wrote :

Confirmed, xtrabackup --help option returns the same output as running without options and the exit code is 1.

With 1.6:
[root@gval-cent5-64-n401 ~]# xtrabackup > /dev/null
[root@gval-cent5-64-n401 ~]# echo $?
1
same for --help and --version options.

Changed in percona-xtrabackup:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → Vadim Tkachenko (vadim-tk)
tags: added: fr innobackupex xtrabackup
Stewart Smith (stewart)
Changed in percona-xtrabackup:
assignee: Vadim Tkachenko (vadim-tk) → nobody
status: Confirmed → Triaged
tags: added: low-hanging-fruit
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.