I plan to write a semantic backup/restore sync utility and I need your views on how it should shape up

Hello folks!

One of the things that have been surprising me in more consumer-based proprietary operating systems is their seamless setup procedure and a streamlined out-of-the-box experience. Let me explain what I mean with the adjectives “seamless” and “streamlined”. Suppose you are logged in to an account slated by a certain operating system and you opt in for an automatic backup, your entire configuration gets uploaded to their servers and the next time you log in to the same operating system reinstalled, all your configuration gets restored automatically. The configuration, if I orient those for a more GNU/Linux-like environment, can include but are not limited to the following items.

  1. Applications installed from the stores
  2. Wallpaper which is currently in use
  3. Command line stuff like history
  4. Application configurations
  5. GNOME theme which is currently in use
  6. GPG Encrypted SSH configuration
  7. Application cache storage
  8. Custom installed user fonts
  9. Custom installed user icons
  10. (What else? Please let me know down below)

I can imagine how great it would feel to users when the go through the out-of-the-box setup screens on Fedora Workstation to obtain their old wallpapers, icons and themes applied while the application, configurations and cache files get fetched in the background. It would possibly help save on the efforts and time spent on setting up a newly-installed distribution to one’s liking as long as they had backed up their stuff previously and have it accessible during the time of the fresh install. Of course, modularity and pluggability is a huge focus here due to which I also plan on allowing for custom modules so as to ensure users can backup configuration and cache files of an obscure application.

The notion of backup and restore done from the cloud looks very alluring but is seemingly a tougher nut to crack, owing to the availability of the required infrastructure, efficient but lossless compression algorithms to encapsulate the backups, established security procedures for encrypting backups while relying on users to reliably store their GPG keys safely, elaborating on the fact that there is no telemetry when people claim otherwise for no reason etc. This is why I would push these things for later to solve and for now, start with a client that looks friendly enough for people to make use of it and provide for local timestamped backup/restore functionality of the aforementioned items.

So that was my starry-eyed plan to take over the world. Thoughts?

(Also, thanks for reading through the wall of text with no pictures - I totally understand the struggle.)

2 Likes

I like the idea. I recently had to replace my phone without being able to read from the old phone, and I was pleased at how much of my preferences, etc came along after I reconnected my Samsung account.

One thing I didn’t see (although maybe it’s implied) is the repo configuration. Especially the inclusion of third party repos.

As for the cloud backend, you could avoid a lot of the trouble by not doing it yourself and letting the user pick from a variety of backends (Google Cloud, Dropbox, Backblaze, S3, etc). Of course, some of that will require the user to set things up first and not all of those are trivial, but… Having your application be a fancy frontend for Restic would get you a lot of cloud options for free.

Now for the “I’m not telling you not to do this, but here are some issues that I see that you’ll have to solve” part :frowning:

Linux is an inherently multi-user OS and even in the case where one person uses the computer (e.g. my work laptop), you still have to deal with both that user and also root in order to make a lot of things possible (e.g. some applications). Alternatively, you can support doing only what the unprivileged user can do, but that might surprise users when they try to use it because they don’t think about this sort of thing.

Does restoring the wallpaper mean backing up user content? (Or does GNOME copy files selected as a wallpaper to a config directory?)

1 Like

@bcotton,

Thanks for providing your views on this. The repo configuration adds one more thing to the list of things that we would want to have backed up. When it comes to the cloud option, I would have to evaluate Restic a bit more carefully to see if people can trust me to put their data over there. That is why I thought of creating a more barebones PoC which works locally before moving it to the cloud.

For now, I am proceeding with an assumption that a normal desktop user would have just one GNU/Linux account bound to their cloud backup account and hence, the backup utility would be responsible for just that. Of course, if the account is in the sudoers file or belongs to groups that are allowed by sudo, the functionality significantly increases but that is NOT a necessity.

With restoring wallpapers, two things would happen -

  1. The list of user content (custom wallpapers added by the users) would be added to their user wallpaper directory for them to select from.
  2. The previously applied wallpaper would be replaced by the wallpaper from the backup and that would be applied by changing some configs.

I think I saw something along these lines in the Gnome community last year i.e. a discussion/proposal to have Gnome settings stored (or backed up) to Cloud storage such that any machine you log into would be configured according to the settings and preferences you prefer. A quick search around now and I can’t find any reference to it, but it would certainly be worth checking within the various communities (Gnome, KDE, etc) as to whether this is something that is already on a roadmap - even if they haven’t started development.

By the way, there are some good articles out there such as how to back up gnome shell settings.

restic is just the software that does the backup/restore. It allows you to create backup repositories locally and/or in a variety of remote targets. And it’s already in the Fedora repos, which is nice. I use it to run nightly backups of my server at home to a local USB drive as well as to Backblaze. So even if you start with just local saves, you can add support for remotes pretty easily by using restic as the backup management layer, which would mean you’re basically writing a frontend. That may make it more or less appealing. :slight_smile:

@grahamwhiteuk,

Thanks for sharing the context of it now. I will be sure to check around with the people I know from those communities to see if such an application is in scope or in development already. I would say that I would prefer a more integrated solution over a more detached one any day so the one coming along with GNOME or KDE Plasma would be far stronger than what I plan on building. Also, thank you for sharing the article about backing up GNOME settings - those are sure to come in handy.

1 Like

Yep, an incremental update to allow for cloud backup/restore sync is what I plan to do once I’m firm-footed on the local backup/restore functionality. I’d have to see if it is done already or scoped for within the communities before I make a move.

@siosm, hi - would you know if something like this is happening in the KDE Plasma community? :slight_smile: