Skip if unchanged - metadata (tags)

Intended behaviour or bug?

Just upgraded to new restic version with skip if unchanged - great feature and adjusting my workflows as a result.

Something I discovered which was a minor surprise — if the tags of a backup is different (but contents the same) - the it is considered an unchanged backup and no snapshot created…

but tags are kept at snapshot level! So if I want to change the tag; I can only when contents are changed?

Is that intended? it caught me by a bit of a surprise…

Can you explain your use case a bit more?

You want to give restic different tags, and want it to create a snapshot even when skip-if-unchanged is specified? If you know you’re giving it different tags and want a snapshot to be created, why not call restic without skip-if-unchanged?

In my mind, tags are metadata about the snapshot, not part of the snapshot itself. For example, you can go back and rewrite/change the tags on a snapshot - this doesn’t modify the snapshot itself (its hash remains the same etc)

I am thinking how I can do following:

  1. Backup runs hourly on cron job. No tag.
  2. Backup also runs after (some irregular complicated job with output sometimes but not always). Tag ‘job output’

In the past - the hourly backups make the list really log and the ‘job output’ tag was handy to filter out the routine backups.

the skip-unchanged really helps reduce the clutter. Thats great

but as side effect - now when I call restic after (the irregular job) — I don’t always get a snapshot with the (occasionally no changes) output.

Sorry if I’m being dense but can’t you just call the irregular backup without the skip-if-unchanged?

Doesn’t that solve the problem? If the contents haven’t changed then you’re using hardly any diskspace to create the snapshot anyway.

Again, sorry if I’m being dumb but I still can’t figure out the problem, the way I read what you’ve posted is you always want irregular backup to create a snapshot?

Thanks for help - my setup is a bit unusual - so no worries if it looks confusing.

My issue is that the cron job and the post-job backup is using same script (ie with the skip-unchnaged) hence causing me problems. Creating another script without the option is a work around and is enough for now.