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:
if exists home/file
if home/file is a real file
if exists 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:
if exists mackup/file
if exists 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.

Restore any file where it was before the 1st Mackup backup.

Algorithm:
for each file in config
if mackup/file exists
if home/file exists
delete home/file
copy mackup/file home/file
delete the mackup folder
print how to delete mackup