Mavri Get started

Self-hosting

How to back up a self-hosted SQLite business app

What a Mavri backup contains, what it leaves out, and how to keep a copy you can actually restore.

By Raktim Ranjit ·

Short answerDownload a backup from Settings → Backup, copy the whole data folder as well, store both somewhere other than the server, and test a restore on a spare instance before you need it.

What is being protected

Mavri keeps everything in a SQLite database inside the data folder of the machine or container where you installed it. Nobody else holds a copy: the maintainers do not host your data and cannot recover it for you. That makes your backup the only safety net.

Two things to back up, not one

1. The backup file. In Mavri, open Settings → Backup and download. You get one gzip file with your records. The API reference is explicit about its limits: accounts, API keys and store connections are not part of a backup.

2. The data folder. The database lives there, and so does the key that protects your store webhook secrets. If you want to rebuild an installation exactly, including store connections, copy the whole folder (or Docker volume) as well. The security notes in the repository say the same thing: the folder holds the database and the keys.

TipFor the cleanest copy of the folder, stop the container briefly, copy the folder, then start it again. A database file copied while it is being written to can be inconsistent.

Where to keep the copies

  • On a different disk or machine from the one running Mavri.
  • Ideally also somewhere off-site. A backup in the same room as the server is lost with the server.
  • Treat the backup file as sensitive: it contains your clients and invoices.

Test the restore

  1. Start a spare Mavri (for example a second container on another port).
  2. Create its owner account. This is needed because accounts are not stored in a backup.
  3. Use the restore control in Settings → Backup and choose your file.
  4. Open a few invoices and check the totals and the numbering.
  5. Re-create API keys and re-connect any stores, since those are not in the file.

If this works on a spare instance, you have a backup. If you have never done it, you have a hope.

A simple routine

  • Download a backup file after any busy billing day.
  • Copy the data folder on a schedule you will keep.
  • Once a quarter, run the restore test above.

See the guide and API reference for the exact behaviour in your version.

Sources

About the authorRaktim Ranjit created Mavri and leads the project at NodeDR Infotech Private Limited. See About.

More from the blog

Invoicing

Quote vs. invoice: when to use each

What separates a quote from an invoice, how they move through a job, and how Mavri turns one into the other.

Raktim Ranjit ·