| Bug #31754 | ndb_mgm -e "start backup wait started" does not display output on stdout | ||
|---|---|---|---|
| Submitted: | 22 Oct 2007 16:50 | Modified: | 13 Apr 16:52 |
| Reporter: | Oli Sennhauser | ||
| Status: | Closed | ||
| Category: | Server: Cluster | Severity: | S3 (Non-critical) |
| Version: | 5.1.21 | OS: | Any |
| Assigned to: | jack andrews | Target Version: | CGE |
| Triage: | Triaged: D4 (Minor) | ||
[22 Oct 2007 16:50]
Oli Sennhauser
[21 Nov 2007 19:26]
Tomas Ulin
Workaround, and much more reliable way to get the backup id ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; DELETE FROM test.backup_info; LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; SELECT @the_backup_id:=backup_id FROM test.backup_info;
[21 Nov 2007 23:19]
Matthew Montgomery
Simpler method for selecting backup id is: $ ndb_select_all --ndb-connectstring="$NDB_CONNECT_STRING" -d sys SYSTAB_0 | grep 520093696 | cut -f 2
[22 Nov 2007 0:14]
Hartmut Holzgraefe
ndb_backup tool source
Attachment: ndb_backup-0.1.tar.gz (application/x-gunzip, text), 299.40 KiB.
[22 Nov 2007 0:24]
Hartmut Holzgraefe
Given that the ndm_mgm_start_backup() MGMAPI call returns the backup id anyway the attached source for a "ndb_backup" binary seems to be a cleaner approach to me. Usage: ndb_backup [-c connectstring] [-w wait] "wait" can be 0, 1, or 2 for NOWAIT, WAIT STARTED and WAIT_COMPLETED, the default is 2 for wait completed. The output looks like this: starting backup backup 6 started If "wait" is set to 0 for NOWAIT the backup id will be reported as 0 as in this case the API call will not wait for the cluster nodes to report the backup id.
[5 Dec 2007 2:22]
Stewart Smith
I'd be happy to add this to the standard distribution - it seems useful. Care to prepare a patch?
[31 Mar 11:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/70866 2862 jack andrews 2009-03-31 bug#31754 ndb_mgm -e 'start backup wait started' does not display output on stdout
[31 Mar 13:07]
Magnus Blaudd
Approved for MySQL CLuster 7.0 Remember to file new bug about "ndb_backup" tool
[1 Apr 13:01]
Bugs System
Pushed into 5.1.32-ndb-7.0.5 (revid:jack@sun.com-20090401104309-3ywt3htkjxd4evef) (version source revid:jack@sun.com-20090331090422-rehidt7tiljfr0p5) (merge vers: 5.1.32-ndb-7.0.4) (pib:6)
[13 Apr 16:52]
Jon Stephens
Documented in the NDB-7.0.5 changelog as follows:
Invoking the management client START BACKUP command from the system
shell (for example, as ndb_mgm -e "START BACKUP") did not work
correctly, unless the backup ID was included when the command was
invoked.
Now, the backup ID is no longer required in such cases, and the backup
ID that is automatically generated is printed to stdout, similar to how
this is done when invoking START BACKUP within the management client.
Also updated the following Note in
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-backup-using-management-client.html
from
*Note* If you start a backup using ndb_mgm -e "START BACKUP", the
backup_id is required.
to
*Note* Prior to MySQL Cluster NDB 7.0.5, when starting a backup
using ndb_mgm -e "START BACKUP", the backup_id was required.
(Bug #31754)
