elementary / os

The OS build system
https://elementary.io
GNU General Public License v3.0
995 stars 131 forks source link

Provide a built-in & secure backup & restore function #266

Open 4jNsY6fCVqZv opened 4 years ago

4jNsY6fCVqZv commented 4 years ago

Prerequisites

Feature

Is your feature request related to a problem? Please describe. The problem is: data is quickly lost, due to hardware damage or accidental deletion by users. Also settings for the email client or the view mode of files in the file manager or settings in the Switchboard plugins may not be saved at all and have to be adjusted each time the system is migrated.

Describe the solution you'd like I would like my operating system to support me by offering me the following options: a) To have personal data backed up at regular intervals and to be able to access individual data/files or storage levels again on request or in case of need. b) Periodically backup and restore system settings for all native app and system components. c) Everything should be done encrypted if desired. Through a strong password/passphrase and also through two-factor authentication with Open Smart Cards such as the Nitrokey. d) All this should happen in elementary style. Clever, integrated, easy to understand, graphically attractive and not overloaded with features. With the aim of also supporting non-technical users in protecting their data and saving their settings.

My suggestion would be system integration of BorgBackup https://github.com/borgbackup/borg#what-is-borgbackup

As an example: There is a visual integration in the form of an app called Vorta: https://github.com/borgbase/vorta

Existing work There certainly is, but I don't know a concrete example right now.

4jNsY6fCVqZv commented 4 years ago

As an GNOME impulse: https://gitlab.gnome.org/Teams/Design/os-mockups/-/wikis/Backups,-Recovery-&-Migrations

4jNsY6fCVqZv commented 4 years ago

Related to this issue https://github.com/elementary/initial-setup/issues/56

bigfatbird commented 4 years ago

I think this really needs to be integrated deep into the os.

I was thinking about how apple does this with Time Machine and Migration Assistant.

There are several use cases for this. User story: 1) A user plugs in an empty external hard drive -> the system asks the user if he wants to use this drive as a backup medium. 2) A user has an exisiting elementary OS device -> he gets a newer elementary OS device -> he plugs in a cable into both devices -> the devices copy everything from the old device to the new device (the os and data and settings stay almost the same except some new default settings maybe) -> user can use the new device in an already configured software environent 3) A user wants to restore his device to an older software and data state -> User can click in an interface to restore to a previous state.

My main concern is: On an Apple device the partition layout is usually known, and apple mostly knows what hardware they have and what modifications are possible in their own spin of unix. So the environment found in the old mac is almost idetical to the environment in the new mac.

but with linux you have lots of customization options, so there might break many things from one elementry OS install to another, and also it is more difficult to migrate installed software from one to another install. In a mac user applications are not depending operating system applications (in ubuntu/elementary linux we relate to them as packages), so you cannot just move from elementary OS 4 to 5 without reinstalling. On a mac just the Applications Folder and some system folders will be moved, but on Linux some dependencies might be missing?

elsiehupp commented 2 years ago

Déjà Dup is written in Vala (like everything in elementary OS), so it could be a good starting point for this. I am in fact already using it myself.

IMHO the best way to integrate Déjà Dup into elementary in its current form would probably be a Switchboard plug resembling the Time Machine preference pane on macOS. This would presumably require Déjà Dup to be set up with an asynchronous DBus API if it doesn't have one already.

Something worth noting with Déjà Dup is that unlike Time Machine it by default only backs up user folders, and I don't know if it can easily back up more than one user's home folder at once. If you were using it for the purpose of migrating between versions of elementary OS (or restoring after a reinstall) you would probably want to exclude some configuration files but not others, and the exact breakdown would probably have to be finessed. (For example, you probably want to keep your SSH keys, and things like your Dark Mode preference and desktop background would be nice to have transfer over automatically, but other configuration files would probably be safer to generate from scratch.)

Regarding installed applications, it shouldn't be terribly difficult to back up a list of installed Flatpaks and then reinstall them before copying over the user data for each one, but that would be beyond what Déjà Dup does now. (The same could also probably be done for Snaps, even though, yes, I know people hate those. Some Snaps are just difficult to avoid, though.)

Déjà Dup also doesn't really use elementary's UI design patterns, and it doesn't really integrate with Pantheon, but building a Switchboard plug would help with the former, and creating a DBus API would probably help with the latter.

elsiehupp commented 2 years ago

To clarify: yes I'm kind of conflating migration backup-and-restore with ongoing regular backup-and-restore, but Apple kind of does the same with Time Machine. 🤷🏻‍♀️

wasantosfi commented 7 months ago

I'm using Timeshift, the GUI is simple but usefull. When I needed, it worked without any problems.