# Managing vaults

{% hint style="info" %}
With the exception of migrating to multi-vault mode, the operations here are only applicable to a multi-vault wallet.
{% endhint %}

## Migrating from v0.4 and earlier

The wallet will automatically convert the default ≤v0.4 database to a single-vault wallet. If you were using multiple, separate databases (with the deprecated `--database` flag), the recommended migration path is to adopt them into a multi-vault wallet. If you have a database at the default path (`~/.accumulate/wallet.db` or `~/.accumulate/wallet_encrypted.db`), migrate that to multi-vault mode after it is automatically converted into a single-vault wallet. Once that is done, adopt your other databases into the wallet.

It *is* possible to maintain multiple, separate wallets but this is **highly discouraged** for the majority of users. The only scenario for which this is recommended is maintaining a separate wallet for use with testnets.

## Migrate to multi-vault mode

The following steps will convert a single-vault wallet into a multi-vault wallet with a single vault.

1. Run `accumulate vault migrate`.
2. Confirm you wish to convert your wallet to multi-vault mode.
3. Choose what your current vault will be named.
4. Choose whether to encrypt the index database. **Encryption is highly recommended.**
   * This will encrypt the vault list, making it harder to determine which files should be attacked in case a malicious actor gains access to your files.
   * Future versions of the wallet may support indexing of keys, accounts, etc. Encrypting these would prevent information leakage.
5. If you are encrypting your wallet, enter a passphrase.
6. Done!

### GUI

{% hint style="warning" %}
This feature is not yet supported in the GUI
{% endhint %}

### CLI

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-5b2538b18dd748fef05d7acaf202d226fac5bf15%2Fcli-migrate-confirm.png?alt=media" alt=""><figcaption><p>Confirm</p></figcaption></figure>

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-4e99d2d44371a084869b843d78c2d616a6b2689f%2Fcli-migrate-name.png?alt=media" alt=""><figcaption><p>Choose a name</p></figcaption></figure>

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-6e9e82770b388400fcfed117213c818032c62a98%2Fcli-migrate-encrypt.png?alt=media" alt=""><figcaption><p>Choose whether to encrypt</p></figcaption></figure>

## Create a new vault

1. Run `accumulate vault create [name]`
2. Choose whether to encrypt the vault. **Encryption is highly recommended.**
3. If you are encrypting your wallet, enter a passphrase.
4. Choose to create a new mnemonic or import an existing one. **Skipping this step is not recommended**, as most functions of the wallet require a mnemonic.
5. Done!

### GUI

{% hint style="warning" %}
This feature is not yet supported in the GUI
{% endhint %}

### CLI

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-23fde38dc961b5d6ccdb945b938ddd4b4d0e9e42%2Fcli-newVault-encrypt.png?alt=media" alt=""><figcaption><p>Choose whether to encrypt</p></figcaption></figure>

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-d6efb0f45e1dce4e973d42134f3d4a19ace4e9cf%2Fcli-newVault-mnemonic.png?alt=media" alt=""><figcaption><p>Generate or import a mnemonic</p></figcaption></figure>

## Adopt an existing vault

The following steps will adopt an existing vault into your wallet. The target can be a single-vault wallet or a ≤v0.4 database.

1. Run `accumulate vault adopt [target]`.
2. Confirm you wish to adopt the target into your wallet.
3. Choose what your current vault will be named.
4. Done!

### GUI

{% hint style="warning" %}
This feature is not yet supported in the GUI
{% endhint %}

### CLI

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-df46ed0ecc892f5a05fa05ebaa6922716c3a38d4%2Fcli-adopt-confirm.png?alt=media" alt=""><figcaption><p>Confirm</p></figcaption></figure>

<figure><img src="https://2671652443-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ry60rQCMYLr8T834Jhv%2Fuploads%2Fgit-blob-31de2bdd8521a75e4775b6267d1aa1ee4532f13a%2Fcli-adopt-name.png?alt=media" alt=""><figcaption><p>Choose a name</p></figcaption></figure>
