fg-cleanup-table - delete database records of MySQL
fg-cleanup-table [OPTION]...
Delete table records in which -t table name and -d database name are specified. Default table name is ‘instance’ and database name is ‘euca’. My SQL user and password information are from the configuration file. Condi tions can be specified by -w where_condition option.
-t tbl_name deletes rows from tbl_name -d db_name a database name of a table specified by -t tbl_name -w where_condition (optional) specifies the conditions that identify which rows to delete -C, --conf filename configuraton file of the database to be used. The configuration file has the following format:
[EucaLogDB] host=HOST port=PORT user=USER passwd=PASS db=DBif this parameter is not specified and a database is used the default location for this file is in:
~/.futuregrid/futuregrid.cfg
Delete all records in a default table and database with default configuration file:
$ fg-cleanup-tableDelete all records in a specific table:
$ fg-cleanup-table -t table_nameDelete all records in a specific table and a specific database:
$ fg-cleanup-table -t table_name -d db_nameDelete records with a different configuration file (~/futuregrid.cfg):
$ fg-cleanup-table --conf ~/futuregrid.cfgDelete records with where clause:
$ fg-cleanup-table -w "instanceId = i-534109B6"
Written by H. Lee, Fugang Wang and Gregor von Laszewski.
Report fg-cleanup-table bugs to laszewski@gmail.com
Github home page: <https://github.com/futuregrid/futuregrid-cloud-metrics>