1

I want to back up an SQLite database file without making a local copy to avoid flash memory wear. I'd also like to avoid moving the partition to a snapshottable file system like LVM.

I figured I could just run flock database.db rsync ... but when I search online I cannot find this technique recommended anywhere, which is often a sign that it might not be a good idea.

Will this work or is there a better way?

AndreKR
  • 551
  • 1
  • 3
  • 17
  • This ought to work. I'm a little surprised that rsync doesn't seem to lock files it's copying, or have that as an option. – Hack Saw Dec 08 '22 at 02:33

0 Answers0