Report this

What is the reason for this report?

How do I dump an SQLite database?

Posted on June 5, 2017

Hi there,

How would I go about dumping an sqlite database on Ubuntu 16.04?

I am using an sqlite database within TeamSpeak 3 but do not know the commands to dump the sqlite database.

Any help would be appreciated.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@alexeps2014

The easiest way would be to use .dump, for example:

sqlite3 dbname.db .dump > dbname.bak

You can either cd in to the directory where the database is, or call the direct path during execution.

For example, if your database is located at:

/home/sqlite/teamspeak3.db

and you wanted to backup the database to

/usr/local/src/teamspeak3.bak

you’d use:

sqlite3 /home/sqlite/teamspeak3.db .dump > /usr/local/src/teamspeak3.bak

This comment has been deleted

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.