Gist 代码: https://gist.github.com/bramblex/9e888771e63be95e93d817b8199f3c65
# 1. 建立一个 github 仓库 # 2. clone 仓库 ~/.autobackup abu init <git 仓库> # 3. 把配置文件加入跟踪 abu add <file> # 4. 同步 git 仓库 abu sync # 5. 生成计划任务,每 30 分钟同步一次。(只有使用 ssh 协议并且上传了 public key 的才能自动同步。) abu cron
# 1. clone 已有的 abu 仓库到本地 ~/.autobackup abu init <git 仓库> # 2. 一键恢复所有已备份配置文件 abu restore
比如我自己的配置仓库是长这样 https://github.com/bramblex/ConfigAutoBackup
init 初始化 abu 仓库 cron 创建 crontab 计划任务 add 跟踪配置文件 remove 将文件从跟踪中删除 list 列出所有被跟踪的文件 status 当前同步状态,相当于 git status sync 同步至远端 git 仓库 restore 一键从 abu 仓库中恢复所有配置文件。
1 oh8 2016-08-28 15:19:42 +08:00 弱弱的问一下,这个 terminal 是装了啥插件吗?显示路径和各种颜色啥的。 |
2 chenqh 2016-08-28 18:34:44 +08:00 同步什么配置? |
3 cuminflea 2016-08-28 19:32:04 +08:00 via iPad 可以试试 mackup |
4 bramblex OP |