Skip to main content

Exporting & Importing DB

If you need to migrate your Hrida.ai data (e.g., chat histories, configurations, etc.) from one server to another or back it up for later use, you can export and import the database. This guide assumes you're running Hrida.ai using the internal SQLite database (not PostgreSQL).

Follow the steps below to export and import the hridaai.db file, which contains your database.


Exporting Database​

To export the database from your current Hrida.ai instance:

  1. Use docker cp to copy the database file: The hridaai.db file is located in the container inside the directory /app/backend/data. Run the following command to copy it into your local machine:

    docker cp hrida-ai:/app/backend/data/hridaai.db ./hridaai.db
  2. Transfer the exported file to the new server: You can use FileZilla or any other file transfer tool of your choice to move the hridaai.db file to the new server.

    info

    FileZilla is recommended for its ease of use when transferring files to the new server.


Importing Database​

After moving the hridaai.db file to the new server, follow these steps:

  1. Install and Run Hrida.ai on the New Server: Set up and run Hrida.ai using a Docker container. Follow the instructions provided in the 🚀 Getting Started to install and start the Hrida.ai container. Once it's running, stop it before performing the import step.

    docker stop hrida-ai
  2. Use docker cp to copy the database file to the container: Assuming the exported hridaai.db file is in your current working directory, copy it into the container:

    docker cp ./hridaai.db hrida-ai:/app/backend/data/hridaai.db
  3. Start the Hrida.ai container: Start the container again to use the imported database.

    docker start hrida-ai

    The new server should now be running Hrida.ai with your imported database.


Notes​

  • This export/import process only works if you're using the internal SQLite database (hridaai.db).
  • If you're using an external PostgreSQL database, this method is not applicable because the database is managed outside the container. For PostgreSQL, you'd need to follow PostgreSQL-specific tools and procedures to back up and restore your database.

Why It's Important​

This approach is particularly useful when:

  • Migrating your Hrida.ai data to a new server or machine.
  • Creating backups of your data before an update or modification.
  • Testing Hrida.ai on multiple servers with the same setup.

# Quick commands summary for export and import

# Export:
docker cp hrida-ai:/app/backend/data/hridaai.db ./hridaai.db

# Stop container on the new server:
docker stop hrida-ai

# Import:
docker cp ./hridaai.db hrida-ai:/app/backend/data/hridaai.db

# Start container:
docker start hrida-ai

With these steps, you can easily manage your Hrida.ai migration or backup process. Keep in mind the database format you're using to ensure compatibility.


Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.