lra / mackup

Keep your application settings in sync (OS X/Linux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] BE ALERT TO DATA LOSS

Cyb3rN8 opened this issue · comments

"Backup" should mean "copy" and should not make any changes to the original files and should not cause any possibility of data loss.

This software actually moves the source files to the configuration directory and then creates a symbol link, which is a serious violation of the "backup principle".

If users are not aware of this (and they generally are not) and place the configuration directory on an external storage or unstable network drive thinking that the backup act is one-time and has no side effects, they will lose all their software configuration and have difficulty restoring it with the restore or uninstall parameters that come with the software.

This is a serious design problem.

There is a warning on the CLI.
It's explained in the doc.
It's useful for the huge majority of users for years the way it is.
If you think there is something to do better, please do a PR.

Adding more context:

  • Mackup was originally made for Dropbox, which is versioned, you cannot possibly lose a file with it
  • Later, people asked me to support other storage engines, so I added them despite their sub-par features (most of them lack versioning). The solution to your problem is to remove support for any engine that is not versioned. This would remove a useful tool for tons of people just because a few messed up.
  • Mackup is never deleting any file, to lose a file you have to: 1. Use a non versioned storage 2. Run mackup backup 3. explicitly delete the files in the storage that the user explicitly stated as a backup (again, Mackup defaults to dropbox).

As I said, warnings are there, and I'm not a fan of being part of the popup creators that warn about every action on a computer: this just lowers the bar of UX to match mainstream. Mackup is still a CLI so it's definitely not mainstream. If I ever do a GUI, then it will be more explicit about this, or ensure only versioned storages are supported.

I would suggest changing argument "backup" to "transfer" to imply the fact that it would remove the original file and create a symbol link

This is not a transfer. This is a linking, but very few know what it means.