In fact, you don’t need to export/import, because the client.db is everything. Maybe you’ll need to restart the process, that is using the file, to reload the altered DB.
sqlite3 client.db .dump > backup.sql
sqlite3 client.db < backup.sql
.dump will write a lot more into the file, than a copy the whole db or a
SELECT * FORM client … It will also give instructions how to create/overwrite the table.
But we can also learn a lot from this file.
vim backup.sqlwill show the lines:
INSERT INTO client VALUES('00:1F:16:AA:BB:CC','192.168.8.164',3936451,830191135,1658485224,'cable',2,'LupusELaptop');
INSERT INTO client VALUES('40:4E:36:AB:CD:EF','192.168.8.236',7452752,404097620,1658484734,'5G',1,'LupusEMobile');
We can use these lines in
sqlite3 client.db or as command.
sqlite3-cli is available in the package repositories
sqlite3-cli | 3330000-1 | 94.4 KB | SQLite is a small C library that implements a self-contained, embeddable,… should be easier than exporting/importing.
Since the file is created at startup, I would not recommend to use the recovery, rather than delete the first part with
create table ... and just execute the
INSERT INTO statements.
Can anyone confirm by now, that a change in the database would lead to the wanted result?
If this database is only a storage for display the values at the fancy wegui, we can stop here. Else we can develop a few ‘recover status x from sd card’ queries.
Right now, i can’t find any process, using this file in normal runtime.
ls -al /proc/*/fd/ | grep -i client.db.