Product Documentation

In order to clear space from the DB table utilization, please run below steps.

  1. Log into the appliance as strongauth user.
  2. Check current disk-space usage for/usr/localpartition:
    shell> df -h
    shell> ls -lh /usr/local/strongauth/mariadb-<latest-version>/ibdata/strongkeylite/decryption_requests.*
     shell> ls -lh /usr/local/strongauth/mariadb-<latest-version>/ibdata/strongkeylite/search_requests.*
  3. Stop Glassfish.
    shell> sudo service glassfishd stop
  4. Change directory to /usr/local/strongauth/dbdumps
    shell> cd /usr/local/strongauth/dbdumps
  5. Take a backup of data from two tables (decryption_requests and search_requests) that would be cleaned.
    shell> mysqldump -u root -p -w "request_date>'2023-01-01 00:00:00'" --lock-all-tables --insert-ignore --no-create-info strongkeylite decryption_requests > dec_req_2023jan1.db
    shell> mysqldump -u root -p -w "request_date>'2023-01-01 00:00:00'" --lock-all-tables --insert-ignore --no-create-info strongkeylite search_requests > search_req_2023jan1.db

    https://demo4.strongkey.com/getstarted/assets/documents/HTML/images/key_strong_cyan.pngNOTE: It's understandable that you would like to keep this data for future reference. But, the data in these two tables are for logging purposes only and the same details will be stored in server.log files as well. So, if you would have server.log files from the same time period, you would have two copies of same logs.

  6. Log into the strongkeylite DB as skles user.
    shell> mysql -u skles -p strongkeylite
        or
    shell> mys
  7. Clean data from two tables.
    MariaDB [strongkeylite]> truncate decryption_requests;
    MariaDB [strongkeylite]> truncate search_requests;

    https://demo4.strongkey.com/getstarted/assets/documents/HTML/images/key_strong_cyan.pngNOTE: This command took 0.235 sec to cleanup 10.2M rows and it cleared ~1.8G of disk-space from 10.2M deleted records in our test environment.

  8. Exit out of the DB.
    MariaDB> exit
  9. Check file size of the two tables as well as the total disk-space usage.
    shell> ls -lh /usr/local/strongauth/mariadb-10.2.30/ibdata/strongkeylite/decryption_requests.*
    shell> ls -lh /usr/local/strongauth/mariadb-10.2.30/ibdata/strongkeylite/search_requests.*
    shell> df -h
  10. Start Glassfish
    shell> sudo service glassfishd start
  11. Set KC-PINs and run 'pingsaka.sh 1' to confirm the appliance is activated.

    https://demo4.strongkey.com/getstarted/assets/documents/HTML/images/key_strong_cyan.pngNOTE: For deletion_requests table, you may follow the same steps. But, before cleaning this table, make sure there is no replication backlog (run repl alias command on all nodes and if there is no output, it would mean all the data has been replicated). Also, you would have to make sure that new deletion requests are not being processed by any of the node in the cluster while performing these steps. You may schedule some maintenance time to clean up deletion_requests table, when there will not be any new deletion requests coming from the client application.