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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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