On Fri, Jun 19, 2020 at 7:20 AM Pavel Stehule <pavel.steh...@gmail.com>
wrote:

> some czech user reported a broken database when he used a repair point on
> Microsoft Windows.
>
> The reply from Microsoft was, so it is not a Microsoft issue, but Postgres
> issue, because Postgres doesn't handle VSS process correctly, and then
> restore point can restore some parts of Postgres's data too.
>
>
> https://docs.microsoft.com/en-us/windows-server/storage/file-server/volume-shadow-copy-service
>

That is pretty much trying to do file system level backup [1], and the same
caveats apply. Most likely, anything but a repair point with a shutdown
server will result in a broken database when restored.

In order to get a consistent copy there has to be a specific Postgres
Writer [2]. There are some samples on how to use the interface with the
Volume Shadow Copy Service [3], but I do not think there is an interface to
a file-system consistent snapshot in any other system.

[1] https://www.postgresql.org/docs/current/backup-file.html
[2] https://docs.microsoft.com/en-us/windows/win32/vss/writers
[3]
https://github.com/microsoft/Windows-classic-samples/tree/master/Samples/VolumeShadowCopyServiceWriter

Regards,

Juan José Santamaría Flecha

Reply via email to