Restoring a Bark-based wallet’s balance always requires two things:
- The mnemonic (seed phrase): Restores the wallet’s keys only.
- A backup of wallet’s database: Restores the wallet’s VTXOs and operational state (exit progress, payment history).
Wallet data should be backed up continuously. Wallet state changes after every board, send, receive, refresh, offboard, and exit.
Bark CLI and Barkd
bark and barkd store wallet data (db.sqlite) and the mnemonic in the data directory, which defaults to $HOME/.bark on all operating systems. You can override it with the --datadir flag or the BARK_DATADIR (BARKD_DATADIR for the daemon) environment variable; the current default is shown for --datadir in bark --help.
Back up the entire data directory continuously, for example by mounting it on mirrored storage (RAID, ZFS, or similar) or syncing it to a secure location after each transaction. The mnemonic file is stored in plain text, so restrict access to the directory and its backups.
Mobile and desktop apps (Bark SDK)
The SDK persists wallet data through the storage your app provides, typically in the app sandbox. Your app is responsible for backing that data up continuously, for example to the user’s cloud storage. It’s also responsible for making sure the mnemonic is recoverable, for example getting the user to write it down.
If you use a wallet app built on Bark, make sure your wallet has automated continuous or periodic backups.
Web apps (Bark SDK)
In the browser, the SDK stores wallet data in IndexedDB. IndexedDB is scoped to the site origin and can be evicted by the browser, so it’s even more important to ensure that the wallet database is continuously backed up to another a secure location and that the mnemonic is recoverable.