Re:Timeshift: System Restore Tool for Linux
by lmz on Tuesday July 23, 2024 @01:54AM
(#41042928)
Your DB is supposed to guarantee consistency even in server crashes. (The Consistency, Durability part of ACID).
[ Parent
| on HN ]
Re:Timeshift: System Restore Tool for Linux
by mdavidn on Tuesday July 23, 2024 @02:26AM
(#41043093)
That consistency is built on assumptions about the filesystem that may not hold true of a copy made concurrently by a backup tool.
e.g. The database might append to write-ahead logs in a different order than the order in which the backup tool reads them.
Re:Timeshift: System Restore Tool for Linux
by grumbelbart2 on Tuesday July 23, 2024 @03:31AM
(#41043552)
That's why you do a filesystem snapshot before the backup, something supported by all systems. The snapshot is constant to the backup tool, and read order or subsequent writes don't matter.
The main difference is that Windows and MacOS have a mechanism that communicates with applications that a snapshot is about to be taken, allowing the applications (such as databases) to build a more "consistent" version of their files.
In theory, of course, database files should always be in a logically consistent state (what if power goes out?).
> something supported by all systems
Well, supported by Windows and MacOS. Linux only if you happen to use zfs or btrfs, and also only if the backup tool you use happens to rely on those snapshots.