Mackup Backup/Restore macOS/Linux Apps Config and Sync
本文最后更新于:2 年前
Mackup - Keep your application settings in sync (OS X/Linux)
backup/restore/uninstall 3个操作做了什么? 经常混淆
Backup
home/realfile copy to backup/file and generate home/linkfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Backup the application config files.
Algorithm: ifexists home/file if home/fileis a realfile ifexists mackup/file are you sure ? if sure rm mackup/file mv home/file mackup/file link mackup/file home/file else mv home/file mackup/file link mackup/file home/file
Restore
mackup/file generate linkfile to replace home/file
1 2 3 4 5 6 7 8 9 10 11
Restore the application config files.
Algorithm: ifexists mackup/file ifexists home/file are you sure ? if sure rm home/file link mackup/file home/file else link mackup/file home/file
Uninstall
mackup/file back to home/realfile
1 2 3 4 5 6 7 8 9 10 11 12
Uninstall Mackup.
Restoreanyfilewhere it was before the 1st Mackup backup.
Algorithm: foreachfilein config if mackup/fileexists if home/fileexists delete home/file copy mackup/file home/file delete the mackup folder print how todelete mackup