The procedure for backing up your database involves making sure the database (.db) file is unlocked and accessible to the back-up program, so that the back-up program can back up both the database (.db) file and the log (.log) file. Once the backup is complete, you then restart the log file.
The log file is a record of changes made to the database since it was last backed up. As such, whenever you back up the database, you restart the log file to flush out the previous changes.
For instance, suppose you back up weekly. Should you ever need to recover data from your log file, you copy the backup from the previous week to the server and apply to it the contents of the log file for the current week so that the current week’s changes are added to the backup.
You should back up your databases regularly. If you have a heavily-used production database, you should back it up nightly. Alternatively, some sites will back up the database and log file nightly, but restart the log file weekly.
It is also important to perform backups at important milestones. For example, if you finish a yearly chargeback project, you should back up the data and label it as being the basis for that chargeback. The same goes for whenever you finish a data entry project.