Skip to content

Backup and Restore the Database

Patrick McGuire edited this page Apr 12, 2022 · 11 revisions

Backing up the database

Detection data is stored in an SQLite database called 'birds.db in the 'scripts' directory. At any time, you can download a copy (create a backup) of the database using the "Tools" > "File Manager" tool.

To download the database to your laptop, PC, smartphone, or tablet:

  1. Go to "Tools" image
  2. "File Manager" image
  3. Click the 'scripts' directory image
  4. Select the database image
  5. And finally, choose to download the database using the buttons to the right image

Restoring the database

Unfortunately, there is a bug in the "File Manager" that does not properly upload files. The current solution is to either use the command line (Linux and macOS users) or WinSCP (Windows users).Update: I found the bug and will have this fixed soon!

Linux and macOS users

To restore a database from a backed-up birds.db database:

scp /$HOME/Downloads/birds.db pi@birdnetpi.local:/home/pi/BirdNET-Pi/scripts/birds.db

Windows Users

(Sorry, no screenshots yet -- I don't have access to a Windows machine. If you do, and are willing to provide screenshots, please let me know and I will be grateful to add them here for other users.

  • Download WinSCP.
  • Connect to the BirdNET-Pi
  • Move the backed-up birds.db file so that it replaces the birds.db file on the BirdNET-Pi in /home/pi/BirdNET-Pi/scripts/birds.db.