Advice on plugs for a backup snap

I’m creating a snap for my rsync gui and so far I have plugs: - home - removable-media - network - system-backup

Are there any more that make sense in this case?

How would backup be restored? There is no such thing as “system-restore”…

I can’t see backup and restore apps doing anything other than being classic. Unless they only backup specific known data folders.

All the backup tools I’ve ever used (since about 1990) have no limitations on what gets backed up. If users want to back up their deb package database or webserver logs in /var/log, they should be able to. Therefore, a confined app backup app will be dead on arrival if it can’t complete those simple tasks.

Restoring is a whole other kettle of fish, and it depends on the scenario from which it is recovering. Is it just one file that was accidentally deleted in ~/Documents, or a library removed from /lib? Or maybe the entire system is hosed, and the user wants to recover everything from a last known good state.

1 Like

the system-backup interface will essentially make the whole filesystem available in readonly mode under /var/lib/snapd/hostfs so backing up your deb package DB (or whatever random stuff you want to backup) shouldn’t be any issue in strict mode …

indeed restoring is a completely different task that is not covered by that interface

1 Like

Ok, system-backup will take care of the first part. Restoring aside, what about executions of external applications from a snap, is that allowed? I have many run before and run after like in the images, besides executing the staged rsync.

Running my newly built but not yet published snap seems to be able to execute other programs.

Operating System        = Linux version 6.9.11-200.fc40.x86_64 running on amd64
Java; VM; Vendor        = 22.0.2; OpenJDK 64-Bit Server VM 22.0.2+9; Azul Systems, Inc.
Runtime                 = OpenJDK Runtime Environment 22.0.2+9
Java Home               = /snap/nbrsync/x4/nbrsync/jre

Will that also be possible when installed from the store in strict mode?

From what I can tell, backup programs is not listed as approved for classic mode.

No, any random binary cannot be run in the host from within the confinement. That’s not possible at all.

So snap is not for this use case I guess, and @popey declared.

Even though doing this from within the confinement and I agree with @popey that isn’t possible, still, Snap is the perfect solution for such softwares, just reduce the confinement and create a classic snap.

While there is indeed an interface for backups, if you can’t restore files without breaking out of confinement or using a completely different tool, it’s a pretty useless interface.

Backups are not backups, if you can’t restore them.

1 Like

Yup, I completely agree with you. I just mentioned the possibility. Sorry, my last messaged was a bit unclear about that. Very sorry for that.

1 Like