---
name: "onedb"
section: "1"
platform: "linux"
package: "opennebula"
version: "3.4.1-3.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/onedb"
---

# onedb(1)

## NAME

**onedb**

This command enables the user to manage the OpenNebula database. It provides information about the DB version, means to upgrade it to the latest version, and backup tools.

## OPTIONS

```
 -f, --force               Forces the backup even if the DB exists
 -b, --backup file         Use this file to store SQL dump
 -v, --verbose             Verbose mode
 -h, --help                Show this message
 -V, --version             Show version and copyright information
 -s, --sqlite file         SQLite DB file
 -S, --server host         MySQL server hostname or IP. Defaults to localhost
 -P, --port port           MySQL server port. Defaults to 3306
 -u, --username user       MySQL username
 -p, --password pass       MySQL password. Leave unset to be prompted for it
 -d, --dbname dbname       MySQL DB name for OpenNebula
```

## COMMANDS

- •

  backup \[*output\_file*\]

-

  ```
  Dumps the DB to a file specified in the argument
  valid options: force
  ```

-

  - •

  version

-

  ```
  Prints the current DB version.
  Use -v flag to see also OpenNebula version
  ```

-

  - •

  history

-

  ```
  Prints the upgrades history
  ```

-

  - •

  restore \[*backup\_file*\]

-

  ```
  Restores the DB from a backup file. Only restores backups generated
  from the same backend (SQLite or MySQL)
  valid options: force
  ```

-

  - •

  upgrade \[*version*\]

-

  ```
  Upgrades the DB to the latest version
  where <version> : DB version (e.g. 1, 3) to upgrade.
                    By default the DB is upgraded to the latest version
  valid options: force, backup
  ```

-

  -

  ## ARGUMENT FORMATS

- •

  file

-

  ```
  Path to a file
  ```

-

  - •

  range

-

  ```
  List of id´s in the form 1,8..15
  ```

-

  - •

  text

-

  ```
  String
  ```

-

  -
