I would like to use MySQL Cluster for catalog storage. MySQL Cluster uses master/master replication and a shared nothing architecture. The primary difference from regular MySQL is the use of the NDB (Network DataBase) storage engine, which is what provides the redundancy. NDB is an ACID compliant transaction oriented storage engine supporting the READ COMMITTED isolation level.
The advantages of using MySQL Cluster are that if I lose a data node, I don't lose any data and everything continues as if nothing had happened. A second advantage is that if I lose a server node, Bacula can simply switch to a different server node to get full access to the same data (right now, I'm using haproxy, installed on the system running the director, to provide transparent failover between server nodes). I didn't install MySQL Cluster just for Bacula. I already had it running in production. Given how important the catalog is to Bacula's operation, I figured it would be good to use a database with built-in redundancy for it. The only problem that I have detected so far is that NDB doesn't support indexing on the BLOB or TEXT data types. The comments in make_mysql_tables state that BLOB is used in order to get case-insensitive sorts. The work around for this is to use VARCHAR with an appropriate character set and/or collation order. An example would be to take this: CREATE TABLE Client ( ClientId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name TINYBLOB NOT NULL, Uname TINYBLOB NOT NULL, /* full uname -a of client */ AutoPrune TINYINT DEFAULT 0, FileRetention BIGINT UNSIGNED DEFAULT 0, JobRetention BIGINT UNSIGNED DEFAULT 0, UNIQUE (Name(128)), PRIMARY KEY(ClientId) ); and replace it with this: CREATE TABLE Client ( ClientId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Name VARCHAR(255) CHARACTER SET BINARY NOT NULL, Uname TINYBLOB NOT NULL, /* full uname -a of client */ AutoPrune TINYINT DEFAULT 0, FileRetention BIGINT UNSIGNED DEFAULT 0, JobRetention BIGINT UNSIGNED DEFAULT 0, UNIQUE (Name), PRIMARY KEY(ClientId) ); See: https://dev.mysql.com/doc/refman/5.7/en/globalization.html and in particular: https://dev.mysql.com/doc/refman/5.7/en/charset-binary-collations.html I did my initial testing of Bacula using sqlite3. I ran into this problem while switching databases in order to move to production. Another comment in the script says that one is on their own if they mess with the schema, which is a fair comment. So, I was wondering if anybody had any comments on the idea of changing BLOB to VARCJHAR? ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel