备份 Brew 或 Brew Cask 安装的软件
- 作者:scsidisk
- 最后编辑:2016年04月23日
- 标签: Brew
备份安装的软件
在云存储目录中创建文件夹,保存安装过的程序
1
2
3
$ mkdir ~/brew-backup/
$ brew leaves > ~/brew-backup/soft-brew.txt
$ brew cask list -1 > ~/brew-backup/soft-brew-cask.txt
自动备份
添加下面的命令,每天自动保存安装过的软件列表
1
2
3
4
5
6
7
8
9
10
11
$ crontab -e
* 1 * * * /usr/local/bin/brew leaves > ~/brew-backup/soft-brew.txt
* 1 * * * /usr/local/bin/brew cask list -1 > ~/brew-backup/soft-brew-cask.txt
## 查看 cron
$ crontab -l
## 备份 cron 列表
$ crontab -l > backup/crontab.out
## 恢复 cron 列表
$ crontab backup/crontab.out
恢复备份
恢复备份的安装列表,执行下面的命令
1
2
$ brew install `cat ~/brew-backup/soft-brew.txt`
$ brew cask install `cat ~/brew-backup/soft-brew-cask.txt`
文章分类
标签云
Gray,
Public,
灰度发布,
灰度放量,
ABTest,
AB测试,
分流发布
CentOS,
Linux,
Shell
Mac,
Shell,
Vim
Linux
SSH
Mac
Mail
MacOSX
命令
MySQL,
调优
Apache,
HTTP,
ngnix
MySQL
gif,
jpeg,
png
Markdown
CentOS
PHP,
WordPress,
Blog
AsciiDoc,
mod_deflat
sudo
Leopard,
Snow
Leopard
Apache
Nginx,
木马
hostname,
upload
md5,
md5sum,
DNS
版本
Cookie,
PHP
Chrome
DooPHP,
CSS
Filter
IT
Java,
Maven,
Thrift
Git
Memcache
MongoDB
Node
Node.js
npm
HTML
Nginx
JDK,
Sublime
Timestamp
Lua,
Redis,
MacOSX,
Class,
Function
Sublime,
Snippets
ObjC
Cobar,
Bash
Brew,
Homebrew
AsciiDoc
Error
Yii
MacOSX,Hadoop,MapReduce
memcache,
Markdown,
Jekyll
VIM
Go,
Golang,
Redis
MacTeX,
CJK,
Tex
Tex,
LaTex
R,
Brew
Android,
Java
EC
Mou
GoAgentX,
GoAgent
Python
HBase
Markdown,Slide
Jenv
kerberos
Junit
Maven
虚拟化
LXC
Docker
bridge
AngularJS
PHPUnit
Android
composer
Golang
ReactNative,
项目管理
MAMP,
Memcache,
SecureCRT,
Zoc,
Mail,
GPG
Docker,
Supervisor
Test
Retail
Pay