Deleted config.ini in MySQL cluster by mistake I was trying to delete cache file of MySQL cluster for rolling restart, but by mistake I deleted the directory /var/lib/mysql-cluster from both the nodes.

I have ndb_1_config.bin.1 file, but how can I recover config.ini in text format.
NDB version is ndb-7.4.12
The file on the FS is only marked as deleted, with the actual deletion happening once all open FDs to it are closed. 

This means that if you haven't restarted the management server (or any process that had the config.ini file open), then you can copy the config.ini file contents from that FD which the process still has open. 

You can see the open file descriptor(s) with:

lsof | grep config.ini


And here's a one-liner to copy the file contents:

lsof | awk '/config.ini/{print $2 ":" $4}' | tr -d [:alpha:] | sed s/:/\\/fd\\// | xargs -Ifile cat /proc/file &gt; /tmp/config.ini


Alternatively you can try and use ndb_config to dump the in-memory configuration from the management server. 

And in the future, you probably should backup the file. :)