Bug #19663 ndb_backup/restore fails upgrading to new 5.1 build
Submitted: 10 May 2006 6:22 Modified: 31 May 2006 13:29
Reporter: Nikolay Grishakin Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.9 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[10 May 2006 6:22] Nikolay Grishakin
Description:
I’m getting very weird error trying to restore database with latest mysql-5.1-new(5.1.10) that was backed up with mysql-5.1.9.
I’m running two node groups on ndb13, 14, 17 and 18; ndb15 is running ndb_mgmd.
-I installed 5.1.9 cluster. 
-Ran load_tpcb.pl script. 
-Backed up data “ndb_mgm ndb15:14000 -e "start backup" “ 
-Copied data from each node to ndb15 
-Installed 5.1.10 
-Tried to restore and get the following error: 

“[ndbdev@ndb15 BACKUP]$ ndb_restore -c ndb15:14000 -n 2 -b 1 -m -r ./BACKUP-1
Nodeid = 2
Backup Id = 1
backup path = ./BACKUP-1
Ndb version in backup files: Version 5.1.9
Restore program incompatible with backup versions between Version 5.1.3 and Version 5.1.3
NDBT_ProgramExit: 1 - Failed”

How to repeat:
Here are exact steps taken to reproduce the problem:

I’m using ndb15 server as a management server. Different build are located under ndb15:/home/ndbdev/ngrishakin/u_d_test/

[ndbdev@ndb15 ~]$ ls ngrishakin/u_d_test/
5.0  5.1.10  5.1.3  5.1.4  5.1.9

Copy build you need on each machine in cluster.
In my case I copy 5.1.9 build from ndb15:/home/ndbdev/ngrishakin/u_d_test/5.1.9/builds/

Cluster backup/restore:

1. ndb15: 
    $ ssh ndb15
    $ cd /home/ndbdev/ngrishakin
    $ . ./shortcut.sh
    $ ndb_mgmd -f 2nd.ini
    $ mysql_server start

2. ndb13:
   $ ssh ndb13
   $ cd /home/ndbdev/ngrishakin
   $ . ./shortcut.sh
   $ rm -rf /space/run/*
   $ ndbd -c ndb15:14000 –initial

Step 2 repeated for ndb14, ndb17 and ndb18

3. Back to ndb15
[ndbdev@ndb15 ngrishakin]$ ndb_mgm ndb15:14000
-- NDB Cluster -- Management Client --
ndb_mgm> all status
Connected to Management Server at: ndb15:14000
Node 2: started (Version 5.1.9)
Node 3: started (Version 5.1.9)
Node 4: started (Version 5.1.9)
Node 5: started (Version 5.1.9)

4. Load TPCB database.
$ perl load_tpcb.pl -so -e ndbmix 

5. Start ndb_back up on ndb15.
[ndbdev@ndb15 ngrishakin]$ ndb_mgm ndb15:14000 -e "start backup"

Connected to Management Server at: ndb15:14000
Waiting for completed, this may take several minutes

Node 2: Backup 1 started from node 1
Node 2: Backup 1 started from node 1 completed
 StartGCP: 878 StopGCP: 881
 #Records: 314118 #LogRecords: 0
 Data: 37160124 bytes Log: 0 bytes

6. Copy BUCKUP directory from each machine (13,14,17,18) to ndb15:/space/run

On each cluster node directory  /space/run/BACKUP/BACKUP-1/ was created.
From each machine in cluster copy back up files to ndb15
$ scp -r /space/run/BACKUP ndb15:/space/run/

7. Restart cluster and start from scratch by using ndbd -c ndb15:14000 –initial

Copy build 5.1.10 from  ngrishakin/u_d_test/5.1.10/  
And then to each machine in cluster:
[ndbdev@ndb15 ngrishakin]$  cp -r ./u_d_test/5.1.10/builds/ .
[ndbdev@ndb15 ngrishakin]$ scp -r builds/ ndbXX:/home/ndbdev/ngrishakin/.

8. Perform restore.
[ndbdev@ndb15 ngrishakin]$ cd /space/run/BACKUP
$ ndb_restore -c ndb15:14000 -n 2 -b 1 -m -r ./BACKUP-1

***ERROR***
[ndbdev@ndb15 BACKUP]$ ndb_restore -c ndb15:14000 -n 2 -b 1 -m -r ./BACKUP-1
Nodeid = 2
Backup Id = 1
backup path = ./BACKUP-1
Ndb version in backup files: Version 5.1.9
Restore program incompatible with backup versions between Version 5.1.3 and Version 5.1.3
NDBT_ProgramExit: 1 - Failed
[31 May 2006 13:30] Tomas Ulin
will not fix backwards compat with old beta version, if issue persists 5.1.10 and forward please reopen