Forums/Knowledge Base/ClusterControl

Schema management - upload files

Johan
posted this on Feb 13 21:57

When you have got ClusterControl installed you can upload SQL files and install them from the Web Interface (right sidebar , "Schema Management").

However, you may have to prepare your tweak your setup.

Setup php.ini to allow upload of files larger than 2MB

Apache/PHP disallows upload of files larger than 2MB.

To fix this you have to:

Ubuntu/Debian:

sudo EDITOR /etc/php5/apache2/php.ini

Centos/Redhat:

sudo EDITOR /etc/php.ini

Change the following (for any OS):

...
post_max_size = 8M ... 
upload_max_filesize = 2M
...

to

....
post_max_size = 256M
...  upload_max_filesize = 256M
...

 save and exit, and finally restart apache:

Ubuntu/Debian:

sudo service apache2 restart

Centos/Redhat:

sudo service httpd restart

Supported File Types

The following files types can be uploaded:

  • .sql
  • .zip
  • .gz  
It is mandatory that zip/gz archives contains files that have the extension .sql! 

Upload Big Files (>256M)

If you have big files (>256M) we recommend that you copy the files directly to the ClusterControl Server.

Centos/Redhat:

scp bigfile.sql.zip  user@clustercontrol_server:
ssh user@clustercontrol_server
/usr/bin/unzip -jqo  bigfile.sql.zip -d /var/www/html/cmon/upload/schema/
#Now, you can go to "Schema Mgmt" in the web interface and install the SQL file 

Ubuntu/Debian:

scp bigfile.sql.zip  user@clustercontrol_server:
ssh user@clustercontrol_server
/usr/bin/unzip -jqo  bigfile.sql.zip -d /var/www/cmon/upload/schema/
#Now, you can go to "Schema Mgmt" in the web interface and install the SQL file