寻觅生命中的那一片浅草......

每日存档 九月 24th, 2015

Time Machine Backup频繁创建新备份的问题

Time Machine Backup用起来比较方便,每个小时进行备份,文档、代码,再也不用频繁地提交到仓库。

但从使用至今,一直困扰我的是每隔一个月就要来一次新备份,说句实话,200G+的东西,完整备份要6-7个小时,真心伤不起,本来以为是为了安全,每月创建一个新备份,也就忍了,但最近更却每周就要来一次全新备份,实在无法忍受,前几天搜索到一篇文章,今天又要遇到这个问题,警告提示:

Time Machine 已完成备份验证。要提高可靠性,Time Machine 必须为您创建新的备份。

总结下来,所有的指令如下,所有指令都是用普通用户运行,10.10.5测试通过:

chflags -R nouchg /Volumes/{name of your network share}/{name of}.sparsebundle
hdiutil attach -nomount -noverify -noautofsck /Volumes/{name of your network share/{name of}.sparsebundle

上面的指令输入如下,我们需要Apple_HFSX前面的分区号,需要修改diskxs2中的x为对应的数字:

/dev/diskx Apple_partition_scheme
/dev/diskxs1 Apple_partition_map
/dev/diskxs2 Apple_HFSX

开始修复,这里大概需要1个小时

fsck_hfs -drfy /dev/diskxs2

卸载备份

hdiutil detach /dev/diskxs2     

最后,告诉TMB,备份已经修复了

vi /Volumes/{name of your network share/{name of}.sparsebundle/com.apple.TimeMachine.MachineID.plist

删除

<key>RecoveryBackupDeclinedDate</key>
<date>{whatever-the-date}</date>

修改

# 将
<key>VerificationState</key>
<integer>2</integer>
# 修改为
<key>VerificationState</key>
<integer>0</integer>

对了,我用的是穷人家的备份服务器:Western Digital Cloud,可能频繁要重新备份,是这个引起

参考文章:Fix Time Machine Sparsebundle NAS Based Backup Errors

通过浏览器管理多台Android设备

相关介绍

软件安装

基础环境

zypper -n in make gcc gcc-c++ protobuf-devel ncurses-devel \
           jemalloc-devel boost-devel tar wget m4 which \
           openssl-devel libcurl-devel automake autoconf \
           libtool libicu-devel git libsodium-devel

node-v4.1.0-linux-x64

直接下载二进制文件

# 安装
tar xf /dist/dist/stf/node-v4.1.0-linux-x64.tar.gz
mv node-v4.1.0 node
ln -s /usr/local/node/bin/* /usr/bin/

android-sdk_r24.3.4-linux

现在的sdk包已经不包含adb这个命令,需要额外安装

# 下载链接
wget http://dl.google.com/android/android-sdk_r24.3.4-linux.tgz
# 软件包解压缩到/usr/local
# 列出所有sdk
./android list sdk --all
# 安装指定版本的sdk,其中2,3位上面指令输出的sdk编码
./android update sdk -u -a -t 2,3

protobuf_v2.5.0

先git下来,再切换到tags为v2.5.0的版本, 这里好像会依赖于gtest,这文件在墙外,如果不具备翻墙环境,会比较麻烦

git clone https://github.com/google/protobuf.git
cd protobuf
git checkout v2.5.0
./configure && make && make install

rethinkdb-2.1.4

tar xf rethinkdb-2.1.4.tgz
cd rethinkdb-2.1.4
./configure -dymanic jemalloc —prefix=/usr/local/rethinkdb
make && make install
mkdir -p /etc/rethinkdb/instances.d/
/bin/cp packaging/assets/config/default.conf.sample /etc/rethinkdb/
/bin/cp packaging/assets/config/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
sed -i 's/# bind=127.0.0.1/bind=127.0.0.1/' /etc/rethinkdb/instances.d/instance1.conf
chown -R rethinkdb.rethinkdb /var/run/rethinkdb
ln -s /usr/local/rethinkdb/bin/rethinkdb /usr/bin/

GraphicsMagick-1.3.21

tar xf GraphicsMagick-1.3.21.tar.gz
cd GraphicsMagick-1.3.21
./configure && make && make install

zeromq-4.1.3

tar xf zeromq-4.1.3.tar.gz
cd zeromq-4.1.3
./configure && make && make install

stf安装

看起来很简单,但好像会依赖大量第三方包,而我们的墙。。。

npm install -g stf

其他辅助

/etc/init.d/rethinkdb

见链接

rethinkdb

进程管理:supervisor

安装

pip install supervisor

/etc/init.d/supervisord

见链接

opensuse-garymonson

supervisord.conf

[unix_http_server]
file=/tmp/supervisor.sock

[supervisord]
logfile=/data/logs/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=info                ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=65535                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock

[program:stf]
command = /usr/bin/stf local --public-ip 192.168.xx.xx 
numprocs = 1
autostart = true
autorestart = true
redirect_stderr = true
stdout_logfile=/data/logs/stf.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=5
stdout_capture_maxbytes=10MB
stderr_logfile=/data/logs/stf_error.log
stderr_logfile_maxbytes=50MB
stderr_logfile_backups=5
stderr_capture_maxbytes=10MB
2015年九月
« 8月   10月 »
 123456
78910111213
14151617181920
21222324252627
282930