Does not work --skip-if-unchanged if stdin is used

Hi all!

We use dd and restic to backup VM hard drives.

restic 0.18.1 compiled with go1.25.1 on linux/amd64

restic -v -r /tmp backup --skip-if-unchanged --stdin-filename VMdsk --stdin-from-command – dd if=/dev/VMdsk bs=4k status=none

The problem is that restic creates a new snapshot even if the VM was turned off and nothing has changed on the disk since the last backup.

Is the --skip-if-unchanged option compatible with stdin input ?

We solved this problem in another way - in the script we look at the mtime (date -r /dev/sdX) of the disk and based on it we decide whether to make a backup copy of this disk or not.

It is not. IIRC stdin does not work with a parent snapshot (i.e. it is identical to --force). --skip-if-unchanged on the other side does compare the snapshot tree with the snapshot tree from the parent. So, this won’t work with stdin.