Rsync'ing the /snap directory - backup is bigger than source

snap packages are gpg signed, read-only, compressed squashfs image files that do not get unpacked but only get mounted read-only on your system …

the mount points for these files are located underneath /snap

snaps do have a built-in rollback mechanism, which means you always at least have the last as well as the current version on disk …

what you are doing when rsyncing the /snap directory is effectively “unpacking” the snap content into your target location … what you are also doing is to unpack the redundant “roll-back-snaps” from the former version … so you end up with duplicated and uncompressed content that should never have been unpacked in the first place :slight_smile:

do not sync the content of /snapif you feel the need to back up that directory, do not go deeper than two levels …

writable system data of snaps lives underneath /var/snap, writable user data in ~/snap and the actual snap image files live in /var/lib/snapd

2 Likes