Table Of Contents

5.6. quasardb database tool

5.6.1. Introduction

The quasardb database tool enables you to analyze, dump, repair, backup, restore and verify backups of your quasardb node.

5.6.2. Quick Reference

Option Usage Default
-h, --help display help  
-v, --version display qdb_dbtool version  
--database path to the database  
-a, --analyze analyzes the database  
-r, --repair repairs the database  
-b, --backup performs a database backup  
--restore restores a database backup  
--verify_backup verifies database backups  

5.6.3. Parameters reference

Parameters can be supplied in any order and are prefixed with --. The arguments format is parameter dependent.

-h, --help

Displays basic usage information.

-v, --version

Displays the version of the quasardb database tool.

--database=<path>

Specifies the path to the database on which to work.

Arguments
A string representing the path to the database, may be relative or absolute.
Default value
None
Example

Work on a database in the current directory:

qdb_dbtool --database=.

Work on a database in the /var/quasardb/db directory:

qdb_dbtool --database=/var/quasardb/db directory
-a, --analyze

Requests an analysis of the database. A report will be printed to the standard output.

Example

Analyze the database in the current directory:

qdb_dbtool --database=. --analyze
-r, --repair

Attempts to repair the database. All data may not be recovered. Note that the quasardb daemon daemon automatically attempts to repair the database if needed; this option is intended for offline operations.

Example

Repairs the database in the current directory:

qdb_dbtool --database=. --repair
-b=<path>, --backup=<path>

Performs an incremental database backup. The daemon must not be running.

Arguments
A string representing the path to the backup, may be relative or absolute.
Default value
None
Example

Backup a database in /var/lib/db/qdb to /mnt/backups/qdb:

qdb_dbtool --database=/var/lib/db/qdb --backup=/mnt/backups/qdb
--restore=<path>

Restores a database backup. The daemon must not be running. Data in the destination directory may be destroyed.

Arguments
A string representing the path to the backup from which do the restoration. May be relative or absolute.
Default value
None
Example

Restore a backup in /var/lib/db/qdb to /mnt/backups/qdb:

qdb_dbtool --database=/var/lib/db/qdb --restore=/mnt/backups/qdb
--verify_backup=<path>

Verifies a database backup.

Arguments
A string representing the path to the backup to verify. May be relative or absolute.
Default value
None
Example

Verify a backup in /mnt/backups/db:

qdb_dbtool --verify_backup=/mnt/backups/qdb
arrow_backPrevious
5.5. quasardb web server
Next arrow_forward
5.7. quasardb benchmarking tool