Backup .sqlite database (that is used) using restic

I want to backup a sqlite database using restic. I understand that this can be risky, because of changes to the file. However, how risky are those in real life? Anybody a clue?

Impossible to tell exactly as all depends on many factors. Worst case your backup will contain corrupted and useless data so it is not worth of trying unless you do this for science and do not care about your data:)

Just do it right by either backing up database dump (can be done with no downtime) or by briefly stopping it, taking filesystem snapshot and using it for backup (downtime can be minimal, less than 1 min easily).

It is really not so hard to do this properly and this is not secret knowledge. Use google for details.

1 Like

Thanks for your reply, @kapitainsky . This was just the push I needed to get this fixed in a good way :slight_smile: . Now -as part of my backup script- I first do a docker-compose down, THEN backup, then docker-compose up again :slight_smile: . Ineed simple and way better for consistency and integrity of the backups.

1 Like

hahaha

It is good way and if you do not mind downtime created by backup time it is perfectly valid solution.

When downtime period is critical then filesystem snapshots can be handy. But again if you are happy with how it works now all is jolly good.

1 Like