Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple way to backup / restore database in SQLite3

I was wondering what the simplest and easiest way to backup / restore a database on SQLite 3 is? I have read around and there are lots of articles detailing methods for complicated situations, but I am struggling to find a basic procedure.

I have one simple database on a site which is basically a news reel of a company's recent activities. The site is just about to be deployed and will have new posts added on a roughly daily basis. I am hoping to write a number of posts before the site goes online, then upload the database onto the live server. From then on, new posts will be added online but it would be nice to have a backup in case something goes wrong.

So, essentially my question is: Is there a simple way to backup a database in SQLite3 and also to upload a database? I am aware that I could possibly use seeds as a way to upload the data initially, but ideally i would rather just copy the development database (if possible...) and upload it onto the production server.

Apologies for my ignorance...

like image 918
Texas Avatar asked Dec 22 '22 12:12

Texas


1 Answers

I would read the backup documentation here. There are some potential risks in doing file copies, but especially for the initial launch, this approach would be fine. I have done this on a couple of low traffic sites for a number of years and never run into any issues.

like image 173
bmatheny Avatar answered Jan 09 '23 06:01

bmatheny