# Export by cli for Keepass

**URL:** <https://community.passbolt.com/t/export-by-cli-for-keepass/7519>\
**Category:** Community Feedback\
**Created:** [May 25, 2023, 9:16am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519 "2023-05-25T09:16:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cedric2](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Cedric2](https://community.passbolt.com/u/Cedric2)\
**Post date:** [May 25, 2023, 9:16am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519/1 "2023-05-25T09:16:43Z")

</div>

Hi everyone,

I would like to know if there is a way to export an account to a keepass database by CLI ?

I want to export by cron, in case of security problem, or if passbolt server is inaccessible but we want to have access to some information.

I want to explore all the possibility if there is a problem in our infrastructure 🙂  
Thank you !

---

<div class="post-metadata">

**Author:** ![Steph](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/steph/32/2348_2.png) [@Steph](https://community.passbolt.com/u/Steph)\
**Post date:** [May 25, 2023, 9:32am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519/2 "2023-05-25T09:32:57Z")

</div>

Hello @Cedric2

I think it will be hard to do. The reason is that to export to Keepass you will need to decrypt the secrets from the Passbolt database before creating a Keepass database file.  
But, the thing is that in the Passbolt’s database the secret are encrypted for the users who have access to the secrets with their own public keys. Thus, to decrypt the secrets you will need the user’s private keys to proceed, which you normally don’t have and would brake the security IMO.

However, what I understand from your message is that you could go with a backup on your Passbolt instance. If so, yes, you can do stuffs with cli.

Here’s a help page to proceed with backup if you wish

> **[Backing up a Passbolt package installation](https://help.passbolt.com/hosting/backup/package.html)**

---

<div class="post-metadata">

**Author:** ![Cedric2](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Cedric2](https://community.passbolt.com/u/Cedric2)\
**Post date:** [May 25, 2023, 9:37am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519/3 "2023-05-25T09:37:22Z")

</div>

Hi @Steph,

Thank you for your answer. You confirm what I thought but wanted to be sure.

I knew that I could backup the mysql database by cli, but I wanted to explore other possibilities.

I guess we will do this manually from our account.

Thank you again and have a nice day 😉

---

<div class="post-metadata">

**Author:** ![Steph](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/steph/32/2348_2.png) [@Steph](https://community.passbolt.com/u/Steph)\
**Post date:** [May 25, 2023, 9:45am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519/4 "2023-05-25T09:45:38Z")

</div>

Thinking about it (I should have thought out of the box at first).

If it’s for a specific user only you could go maybe with the GO-cli: [GitHub - passbolt/go-passbolt-cli: A CLI tool to interact with Passbolt, a Open source Password Manager for Teams](https://github.com/passbolt/go-passbolt-cli)  
There’s a way to export to Keepass

---

<div class="post-metadata">

**Author:** ![Steph](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/steph/32/2348_2.png) [@Steph](https://community.passbolt.com/u/Steph)\
**Post date:** [May 25, 2023, 9:55am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519/5 "2023-05-25T09:55:45Z")

</div>

I took a look and you could actually do that with the go cli (after the client is configured)

```bash
passbolt export keepass -p password

```

It will generate a file `passbolt-export.kdbx` (the name can be change with the option -f )

---

<div class="post-metadata">

**Author:** ![Cedric2](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Cedric2](https://community.passbolt.com/u/Cedric2)\
**Post date:** [May 25, 2023, 11:55am UTC](https://community.passbolt.com/t/export-by-cli-for-keepass/7519/6 "2023-05-25T11:55:41Z")

</div>

Thank you ! I’ll take a look to this and come back to tell you.

Thanks again
