I am attempting to use the sqlite backup command through php.
This requires 3 statements
sqlite3 testing.sqlite
.backup testing_backup.sqlite
.exit
The exec
command doesn't like this as it hangs when the process stays open, I have tried running all three commands together using && to join them but this doesn't work either.
Can anyone help me run the 3 commands through php?
This is an attempt to create a backup file to solve a database locking issue.
The sqlite3
command-line shall can also receive command(s) as parameters.
Just execute the following command:
sqlite3 testing.sqlite ".backup testing_backup.sqlite"