Should I backup the /snap directory?

On my openSuse server I see a directory /snap and I am not sure if this directory should be backed up.

I read the topic The system /snap directory

On my system, there are only this subdirectories in /snap:

bin certbot core20 snapd

Should I exclude from the backup one or more of this subdirectories or the whole /snap directory?

I’d probably exclude the whole directory. They’re not “real” files, in the sense that they’re not actually written on the disk at all. Snaps are distributed as squashfs filesystems, and their contents are mounted rather than extracted, so the actual content of /snap exists entirely in RAM and only when it’s actually needed.

Will this probably also apply to the directory /snap/bin

I’d say yes. It’s not expected that /snap/bin is modified by anything other than snap itself, so it’s likely just going to cause subtle issues if you place things in there that aren’t properly tracked.

As an example I’m thinking that snap keeps note of whether the binaries there were placed automatically or added by a specific snap alias command. If you were to add to it manually it’d probably cause some subtle issues with tracking that state.

And plus, all the files there are actually just symlinks to /usr/bin/snap anyway, so they’re not unique either.