Question

How do I dump an SQLite database?

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.

Subscribe
Share

Submit an 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.

This comment has been deleted

@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