How Restic manages the in-flight events before taking snapshot of Persistent volume

Hi All,

When Restic performs backup and creating snapshot of a persistent volume then how it manages the in-flight events?. Is it uses “fsfreeze” or something like that to flush out in-flight events and then create snapshot.


It starts by scanning the filesystem for changes to know which files to back up, then backs them up. If a file changed after it was backed up during that backup run and before the snapshot is created at the very end, it doesn’t do anything about that. It simply backs up the files one by one.

My question is that if a program is writing something on a file and during data write operation restic goes to take backup of that file then what it will do to take consistent snanpshot of filesystem?

Is it suspend the filesystem using “fsfreeze” or something like that. and after taking snapshot is it remove the suspension of file system.

Because I am worried how Restic maintain the consistent snapshot backup


Restic does not do this by itself. You need to couple it with platform-specific tools, such as LVM/btrfs/ZFS snapshots on Linux, or VSS on Windows.

Think of restic like tar but with more sophisticated storage. Tar doesn’t have any facilities for automatically managing volume snapshots, either.

My platform is openshift platform. I am using Restic with Velero to take backup of PVs. During velero backup restic creates snapshot of PV.

So my question is can Restic suspend the filesystem during preparation of snapshot to maintain the consistency. Velero has hook facility where we can use fsfreeze command to suspend the filesystem. But if we don’t use hook then is restic able to take snapshot of PV with consistent data and if it is able then how it will take the consistent snapshot.

@DebashisMondal As @cdhowie already explained to you, restic does not make a snapshot of the filesystem or similar. It just backs up the files. If you want to “freeze” the filesystem you will have to do that outside of restic, e.g. with the stuff you already mentioned (fsfreeze before the restic backup run). What about this is unclear to you?

Restic isn’t doing this, something else is.

Please see HELP WANTED: Testing Windows VSS support .